Sparse affine-invariant linear codes are locally...

27
Sparse affine-invariant linear codes are locally testable Eli Ben-Sasson Noga Ron-Zewi Madhu Sudan April 27, 2012 Abstract We show that sparse affine-invariant linear properties over arbitrary finite fields are locally testable with a constant number of queries. Given a finite field F q and an extension field F q n , a property is a set of functions mapping F q n to F q . The property is said to be affine-invariant if it is invariant under affine transformations of F q n , and it is said to be sparse if its size is polynomial in the domain size. Our work completes a line of work initiated by Grigorescu et al. [RANDOM 2009] and followed by Kaufman and Lovett [FOCS 2011]. The latter showed such a result for the case when q was prime. Extending to non-prime cases turns out to be non-trivial and our proof involves some detours into additive combinatorics, as well as a new calculus for building property testers for affine-invariant linear properties. Department of Computer Science, Technion, Haifa, Israel and Microsoft Research New-England, Cambridge, MA. [email protected]. The research leading to these results has received funding from the European Community’s Seventh Framework Programme (FP7/2007-2013) under grant agreement number 240258. Department of Computer Science, Technion, Haifa. [email protected]. Research was conducted while the author was an intern at Microsoft Research New-England, Cambridge, MA, and supported by the Israel Ministry of Science and Technology. Microsoft Research New-England, Cambridge, MA. [email protected] 1

Transcript of Sparse affine-invariant linear codes are locally...

Page 1: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Sparse affine-invariant linear codes are locally testable

Eli Ben-Sasson∗ Noga Ron-Zewi † Madhu Sudan‡

April 27, 2012

Abstract

We show that sparse affine-invariant linear properties over arbitrary finite fields are locallytestable with a constant number of queries. Given a finite field Fq and an extension field Fqn ,a property is a set of functions mapping Fqn to Fq. The property is said to be affine-invariantif it is invariant under affine transformations of Fqn , and it is said to be sparse if its size ispolynomial in the domain size. Our work completes a line of work initiated by Grigorescu et al.[RANDOM 2009] and followed by Kaufman and Lovett [FOCS 2011]. The latter showed such aresult for the case when q was prime. Extending to non-prime cases turns out to be non-trivialand our proof involves some detours into additive combinatorics, as well as a new calculus forbuilding property testers for affine-invariant linear properties.

∗Department of Computer Science, Technion, Haifa, Israel and Microsoft Research New-England, Cambridge, [email protected]. The research leading to these results has received funding from the European Community’sSeventh Framework Programme (FP7/2007-2013) under grant agreement number 240258.

†Department of Computer Science, Technion, Haifa. [email protected]. Research was conducted while theauthor was an intern at Microsoft Research New-England, Cambridge, MA, and supported by the Israel Ministry ofScience and Technology.

‡Microsoft Research New-England, Cambridge, MA. [email protected]

1

Page 2: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Contents

1 Introduction 2

1.1 The problem and main result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Comparison with previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Technical contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.5 Organization of rest of the paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Preliminaries 5

2.1 Establishing the k-single-orbit characterization property is sufficient for k-local testability 52.2 Degree sets of affine-invariant linear properties . . . . . . . . . . . . . . . . . . . . . 62.3 The border set of affine-invariant linear properties . . . . . . . . . . . . . . . . . . . 7

3 Proof of Main Theorem 7

3.1 Pseudo-tests suffice for local testability . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Overview of the proof of Main Technical Theorem 3.5 . . . . . . . . . . . . . . . . . 93.3 Covering the (q, n)-shift representative sets . . . . . . . . . . . . . . . . . . . . . . . 93.4 Separating a pair of sets with disjoint p-shifts . . . . . . . . . . . . . . . . . . . . . . 103.5 Separating a pair of degrees in the same p-shift . . . . . . . . . . . . . . . . . . . . . 113.6 A Calculus for composing pseudo-tests . . . . . . . . . . . . . . . . . . . . . . . . . . 113.7 Completing the proof of Theorem 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Separating pairs of degrees in the same p-shift — Proof of Lemma 3.9 12

5 Separating a pair of sets with disjoint p-shifts — Proof of Lemma 3.8 15

5.1 Proof of Lemma 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6 A calculus for composing pseudo-tests — Proof of Lemma 3.10 20

7 Equivalence of basic and general single-orbit characterizations 22

1

Page 3: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

1 Introduction

This paper investigates property testing in the context of linear, affine-invariant properties andproves that all sparse properties in this class are testable. We describe these notions more preciselybelow, before explaining the context and motivation for this study.

1.1 The problem and main result

Given finite sets D and R (for domain and range), a property of functions mapping D to R is simplygiven by a subset F ⊆ {D → R} (F is the subset of functions that satisfy the property). Propertytesting investigates the possibility of efficient algorithms that make few queries to an oracle forf : D → R and accepts f ∈ F while rejecting f that is very far from F with constant probability.Distance here is measured in normalized Hamming distance and so δ(f, g) = 1

|D| · |{x|f(x) 6= g(x)}|

and δ(f,F) = ming∈F{δ(f, g)}. A property F is said to be k-locally testable if there exists a testermaking at most k queries to a function f : D → R, that accepts f ∈ F with probability 1, whilerejecting all f with probability at least δ(f,F).

A large, and very important, class of properties, namely the algebraic ones, are abstracted bestby the features of being linear and affine-invariant. In such settings the range of the property isa (small) finite field Fq (where Fq denotes the field of size q) and the domain is a (large) finiteextension Fqn . A property F ⊆ {Fqn → Fq} is linear if it is an Fq-vector space, i.e., ∀f, g ∈ F andα ∈ Fq we have αf + g ∈ F . The property F is said to be affine-invariant if it is invariant underaffine-transformations of the domain, i.e., ∀α, β ∈ Fqn with α 6= 0, and ∀f ∈ F it is the case thatfα,β given by fα,β(x) = f(α · x+ β) is also in F .

Finally, we say that F is sparse if it contains only polynomially many functions in its domainsize. More precisely, we say that F ⊆ {Fqn → Fq} is t-(size-)sparse if |F| ≤ qnt. Our main theoremshows that all sparse properties are testable with a constant number of queries.

Theorem 1.1 (Main). For every q and t there exists k = kq,t such that for every n, every t-sparse,linear, affine-invariant property F ⊆ {Fqn → Fq} is k-locally testable.

Our work extends prior work of Grigorescu et al. [GKS09] and Kaufman and Lovett [KL11].The latter, in particular, proved the above theorem when q is prime, leaving open the case of allextensions of prime fields. We describe the relationship to previous work and explain our technicalcontributions after discussing the motivation for studying affine-invariant linear properties.

1.2 Motivation

Property Testing: The general motivation to understand linear, affine-invariant, properties isthat they form the most natural abstraction of some of the most useful class of property tests thathave played a role in the construction of locally testable codes and probabilistically checkable proofs.Some central properties that have been utilized in such constructions have been the “linearity”property and the “low-degree” property. Affine-invariant properties abstract such properties inas natural a manner as “graph properties” abstract specific properties such as triangle-freeness orbipartiteness. Given the major role played by algebraic properties, understanding their testabilityseems as important as understanding testability of, say, graph properties.

Locally testable codes: If the study of affine-invariance is natural in the context of propertytesting, the restriction to linearity is as natural in the context of error-correcting codes. Most well-studied error-correcting codes are linear and the locally testable ones are usually derived from linear

2

Page 4: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

locally testable properties. We note that the very fact that a property is linear, affine-invariant andlocally testable implies that it is an error-correcting code. By the work of Ben-Sasson et al. [BHR05]it is known that all locally testable codes must be what are known as “LDPC codes”, where thecode is defined by a collection of local constraints. However it is also known, from the work ofBen-Sasson et al. [BGK+05] that in order to be locally testable the LDPC code must have aredundant collection of local constraints. Redundancy among local constraints is a relatively rarephenomenon and imposing some symmetry (such as affine-invariance) is one way of getting suchredundancy. Indeed the symmetry offered by affine-invariance is the only setting where (with someadditional features) the redundancy is known to lead to testable codes. Thus affine-invariant linearproperties lead to some of the most natural and broad classes of locally testable codes.

In spite our relatively good understanding of the structure of affine-invariant linear propertieswe do not yet have a characterization of what makes such properties locally testable, as is the casefor graph properties [AFNS06, BCL+06]. The current belief seems to be that a k-query testableproperty F ⊂

{

Fnq → Fq

}

is a combination of a constant number of “base-properties” where base-properties are of two kinds — “low-degree” properties (also known as Reed-Muller codes of constantdegree) and “sparse” ones. (For a detailed description of this belief and its ensuing conjecturessee Section 5 in Ben-Sasson et al. [BGM+11a].) But our limited understanding of affine-invariantlinear locally testable codes means that we cannot rule out the existence of some other property,neither “low-degree” nor “sparse”, that nevertheless is locally testable. And till this work, it wasnot even known that every combination of “base-properties” does indeed lead to testability. Thusthis work finally completes the “easy direction” of the project aiming to characterize affine-invariantlinear locally testable properties, and does this by showing that all finite combinations of “base-properties” that are believed to be testable are indeed so. What is still lacking now is a limitationresult saying that the remaining classes of affine-invariant linear properties are not testable.

1.3 Comparison with previous work

The task of testing sparse codes was initiated in Kaufman and Litsyn [KL05], and then pursuedfurther in Kaufman and Sudan [KS07b] and most recently by Kopparty and Saraf [KS10]. All theabove results show that if a code is sparse and of very high distance then it is testable. ([KL05],[KS07b] only deal with binary codes. The results of [KS10] seems to extend to prime-alphabetcodes, or even q-ary alphabet case, though the results are not stated so.)

The task of testing sparse affine-invariant linear properties was initiated by [GKS09]. Theyshowed that in some special cases binary sparse affine-invariant linear properties were testable.[KL11] extended the result vastly — they showed that every sparse affine-invariant linear propertyover a prime field Fp is testable. The main ingredient in the proofs of the above results shows thatsparse affine-invariant linear properties satisfy the sufficient condition (high-distance) required inthe results mentioned in the previous paragraph. While they also give “nice” tests in the process,this may be viewed as a bonus, but not necessary for testability.

Testing over non-prime finite fields turns out to be more involved for a fundamental reason.Codes over Fq where q = ps, p is a prime and s > 1, have decent distance, but certainly nowhereclose to being “excellent” in the sense required in all the previous works. Indeed previous resultsrelied crucially on the fact that every non-zero function from the sparse property in question wasroughly balanced (took on every value in the range roughly the same number of times). Such astatement is simply not true in our setting. The reason is not just that Fq contains Fp as a subfield,but moreover that Fq contains many vector spaces over the prime subfield Fp. Indeed for everysuch subspace V of Fq it is possible to create sparse properties that contain functions which take onvalues only from V , and take on every value in V roughly the same number of times. This obstacle

3

Page 5: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

turns out to be sufficient enough to derail the previous proof techniques (which are still useful, butinsufficient).

To overcome this obstacle we revisit the structure of affine-invariant linear properties and in-troduce a simple calculus for building tests for such properties. Our final tests also use some of thealgebraic machinery coming from the proofs of the sum-product theorems to build the necessarytests.

1.4 Technical contributions

Previous works on testing affine-invariant linear properties have already shown that it suffices toconsider tests that distinguish some “basic” functions. Specifically, if we let Trace : Fqn → Fq

denote the standard trace map given by Trace(x) = x+ xq + · · ·+ xqn−1

, then it (roughly) sufficesto build “tests” that simultaneously accept some good functions, of the form Trace(xd) with d ∈ G,while rejecting all bad ones, of the form Trace(xe) for e ∈ B. For simplicity think of a “test” of arityk as specified by a tuple α1, . . . , αk ∈ Fqn in conjunction with a Fq-linear form (λ1, . . . , λk) ∈ F

kq .

The “test” accepts d if∑k

i=1 λiTrace(αdi ) = 0 and it rejects e if

∑ki=1 λiTrace(α

ei ) 6= 0. The sets

G and B depend on the property F being tested. Previous analysis, especially [KL11], picked arandom test of constant size that accepted all the good functions and were able to claim that with(overwhelmingly) high probability such a test would reject all bad functions. This claim relied onthe fact that all non-zero functions (good/bad) took on each value in the range roughly equallyoften. This fact is no longer true in our case and translates into an algebraic challenge. For somed ∈ G and e ∈ B it is no longer the case that a random “test” that accepts Trace(xd) will rejectTrace(xe) with high probability. A particularly challenging case for us is when e = pid, where p isthe characteristic of the field we are working with. For this specific case, we manage to “handcraft”a test, using some methods from additive combinatorics, that accepts Trace(xd) while rejectingTrace(xp

id). This is the central technical contribution of this work and we give some insight into itnext.

If we are so lucky as to have an element α in Fqn such that λ , αd is contained in Fq but notcontained in Fpi then we are in good shape: The “test” that checks whether “λ · f(1) = f(α)?”

accepts f(x) = Trace(xd) while rejecting f(x) = Trace(xpid). In general we cannot guarantee the

existence of such a lucky α. Therefore we consider the set A ={

αd | α ∈ Fqn}

and its ℓ-wise sum-set ℓA = {a1 + . . .+ aℓ | ai ∈ A}. If we could prove that ℓA contains an element λ ∈ Fq \ Fpi forsome constant ℓ (possibly depending on the sparsity of F and q) we would still be okay. This alsoseems plausible, since the set A is completely closed under multiplication and so the sum-productestimates [BGK06] show that |ℓA| ≫ |A|. Thus it is conceivable that the larger set ℓA mightcontain a nice λ, and if so we would have a constraint of arity roughly ℓ separating Trace(xd) fromTrace(xp

id).Determining the smallest ℓ for which ℓA is closed under addition (for a given d) is well-studied

as Waring’s problem for finite fields. The best bound, due to Cochrane and Cipra, is roughly of theform ℓ ≤ d1/ log |A| [CC11] (see [Cip10] for more information). For general d, the parameter ℓ mayneed to grow with n, however in our case d is restricted (due to the sparsity of F), so the abovebound gives constant ℓ. For the sake of presenting a simple and self-contained proof, we provide asolution to a problem that is somewhat more specific than Waring’s problem, yet suffices for ourpurposes and lends more easily to analysis. Based on the simplified analysis of the sum-producttheorem in [BIW06], we consider sets Aℓ of the form Aℓ = (ℓA−ℓA)/(ℓA−ℓA) (i.e., sets containingratios of two elements each of which is expressible as the difference of two elements of ℓA). Weshow, with a self-contained elementary proof, that for sufficiently large ℓ the set Aℓ is closed under

4

Page 6: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

addition, hence contains a λ ∈ Fq \ Fpi. With some additional work we are then able to mimic the

“lucky” case above to get a constraint of arity O(ℓ) separating Trace(xd) from Trace(xpid).

Unfortunately, while the handcrafted test manages to settle the toy challenge for a single paird, e, it fails to build a single test that simultaneously accepts all the good functions Trace(xd), d ∈ G,while rejecting all the bad functions. In particular, the literature on affine-invariant property testingthat reduced testing to distinguishing basic functions seemed to crucially rely on the fact that thetests simultaneously accepted all the functions Trace(xd) for d ∈ G. Tests that accept just oneof the basic functions seem to be useless in their setting. Indeed we call our tests distinguishingTrace(xd) from Trace(xe) “pseudo-tests” due to this reason. To use our pseudo-tests, we build acalculus for combining pseudo-tests which allows us to build larger pseudo-tests which combinesmaller pseudo-tests to either enlarge the set of good functions being accepted or to enlarge the setof bad functions being rejected. Other than the “handcrafted” pseudo-test mentioned above, wealso use the proof method of Kaufman and Lovett to find pseudo-tests distinguishing other pairsof good and bad functions. We then combine them using our calculus till we get a “pseudo-test”which does accept all the good functions, and rejects all the bad functions. At this stage we cannow apply the previous works to get a tester for the family F .

1.5 Organization of rest of the paper

In Section 3 we prove our main theorem after recalling in Section 2 the required tools from previousworks. In Section 4 we use additive combinatorics to construct a “pseudo-test” for the mostchallenging case of separating xd from xe for e = pid (see the discussion in the previous subsection).Section 5 generalizes the main theorem of [KL11] and constructs a “pseudo-test” for separating xd

from xe for other e’s of interest. In Section 6 we introduce our calculus for composing “pseudo-tests”. Section 7, though not needed for obtaining our main result, is worth noting. It contains auseful simplification of the constraints used in the study of affine-invariant property testing.

2 Preliminaries

We start by recalling the notions of k-single-orbit characterizability, the degree set and theborder set of an affine-invariant linear family and their role in the testing of these prop-erties. All information presented in this section has already appeared in previous works[KS08, GKS08, GKS09, BS11, BGM+11a]. We follow the presentation in [BGM+11a, Sections2, 3].

2.1 Establishing the k-single-orbit characterization property is sufficient for k-

local testability

Our tester for sparse affine-invariant linear properties comes from a structural theorem which showsthat every such property has a “single-orbit characterization”. To describe this notion we need acouple of definitions.

Definition 2.1 (k-(basic)-constraint, k-characterization). A k-constraint C = (α,{

λi

}r

i=1) over

Fqn is given by a vector α = (α1, . . . , αk) ∈ Fkqn together with r vectors λi = (λi,1, . . . λi,k) ∈ F

kq for

1 ≤ i ≤ r. We say that the constraint C accepts a function f : Fqn → Fqn if∑k

j=1 λi,jf(αj) = 0 forall 1 ≤ i ≤ r. Otherwise we say that C rejects f . We say a constraint is basic if r = 1.

Let F ⊆ {Fqn → Fq} be a linear property. A k-characterization of F is a collection of k-constraints C1, . . . , Cm such that f ∈ F if and only if Cj accepts f , for every j ∈ {1, . . . ,m}.

5

Page 7: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

It is well-known [BHR05] that every k-locally testable linear property must have a k-characterization. In the case of affine-invariant linear properties some special characterizationsare known to lead to k-testability. We describe these special characterizations next.

Definition 2.2 (k-single-orbit characterization (k-s-o-c)). Let C =(

α,{

λi

}r

i=1

)

be a k-constraintover Fqn . The orbit of C under the set of affine transformations is the following set of k-constraints

{T ◦ C}T ={

(

(T (α1), . . . , T (αk)),{

λi

}r

i=1

)

| T : Fqn → Fqn is an affine transformation}

.

We say that C is a k-single-orbit characterization (k-s-o-c) of F if the orbit of C forms a k-characterization of F .

We say that F has a basic k-s-o-c if the constraint C above is a basic one. (One of thesimplifications proved in this work is that basic single-orbit characterizations are equivalent togeneral single-orbit characterizations, cf. Section 7.) A theorem due to Kaufman and Sudan[KS08] (see also [KS07a]) says that k-s-o-c implies local testability.

Theorem 2.3 (k-s-o-c implies local testability,[KS07a] Theorem 2.9.). Let F ⊆ {Fqn → Fq} be anaffine-invariant linear property. If F has a k-single-orbit characterization, then F is also poly(k)-locally testable.

2.2 Degree sets of affine-invariant linear properties

Let F ⊆ {Fqn → Fq} be a linear affine-invariant property of functions. Note that every member of{Fqn → Fq} can be written uniquely as a polynomial of degree at most qn − 1 from Fqn [x]. Thusfor a function f : Fqn → Fq we define its support, denoted supp(f), to be the set of exponentsin the support of the associated polynomial. I.e., supp(f) = {d ∈ {0, . . . , qn − 1}|cd 6= 0} wheref(x) =

d cdxd. The degree set of F is simply the union of the supports of the functions in F :

Deg(F) = ∪f∈Fsupp(f).

Conversely, for a set of degrees D ⊆ {0, . . . , qn − 1} let

Famq(D) = {f | f : Fqn → Fq, supp(f) ⊆ D} .

Affine-invariant linear properties are characterized in terms of their degree-sets (this is statedformally in the next lemma) and these degree-sets have a special structure — they are “closed”under “p-shadows” and “(q, n)-shifts” as explained next.

Define the p-shadow of an integer d to be the set of integers whose base-p representation isnot larger, point-wise, than the base-p representation of d. More precisely, writing d in base p as∑

i≥0 dipi we define

Shadowp(d) =

i≥0

eipi | ei ∈ {0, 1, . . . , di} ∀i ≥ 0

.

It is known from [KS08] that whenever d ∈ Deg(F) for some affine-invariant linear propertyF then q · d mod qn − 1 also belongs to Deg(F). This motivates the following definition of the(q, n)-shift of an integer d as

Shiftq,n(d) =

{

{0} d = 0{

c ∈ {1, . . . , qn − 1} | c ≡ qi · d mod qn − 1 for some 0 ≤ i ≤ n}

1 ≤ d ≤ qn − 1

6

Page 8: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

The reason for treating 0 differently than qn − 1 is that these two exponents induce somewhatdifferent functions, namely 00 = 1 but 0q

n−1 = 0.The p-shadow of a set of integers D is Shadowp(D) =

d∈D Shadowp(d). We say D is p-shadowclosed if D = Shadowp(D). The (q, n)-shift of D is similarly defined and we say D is (q, n)-shiftclosed if D = Shiftq,n(D).

The following lemma is [BGM+11a, Lemma 2.11]. It says that an affine-invariant linear propertyin {Fqn → Fq} is characterized by its degree-set, and this degree-set is p-shadow and (q, n)-shiftclosed.

Lemma 2.4 (Characterization of affine-invariant linear properties by degree-sets). let F ⊆{Fqn → Fq} be an affine-invariant linear property. Then Deg(F) is (q, n)-shift-closed, p-shadow-closed, and F = Famq(Deg(F)). Conversely, suppose that D is a (q, n)-shift-closed and p-shadow-closed set of degrees. Then Famq(D) is an affine-invariant linear property and D = Deg(Famq(D)).

Remark 2.5 (The role of p and q in Lemma 2.4). We point out that the characteristic p of the fieldFq and its size q play different roles in the lemma above. The shadow of an integer is with respectto base-p representations, whereas the shift of an integer is computed by taking q-multiples of it.

2.3 The border set of affine-invariant linear properties

The fact that the degree sets of affine-invariant linear properties are p-shadow closed motivates thefollowing definition of the Border introduced in [BGM+11a]. This notion will play a central role inconstructing our tester for sparse affine-invariant linear properties.

Definition 2.6 (Border). The border of an affine-invariant linear property F ⊂ {Fqn → Fq}, whereq is a power of a prime p, is the set of degrees e that are “just outside” of Deg(F), meaning that eis not in Deg(F) but every element in the p-shadow of e is:

Border(F) = {e ∈ {0, . . . , qn − 1} | e 6∈ Deg(F) but (Shadowp(e) \ {e}) ⊆ Deg(F)} .

In what follows, we say that a constraint C over Fqn accepts the degree d if it accepts the functionf(x) = xd, otherwise we say that C rejects the degree d. For a set of degrees D ⊆ {0, 1, . . . , qn − 1},we say that the constraint C accepts D if it accepts all degrees in D. In our proof of Theorem 1.1we shall use the following equivalent definition of k-single-orbit characterization via the notion ofthe border.

Lemma 2.7 (Equivalent definition of k-single-orbit characterizable property via the border,[BGM+11b], Lemma 3.2.). Let F be an affine-invariant linear property, and let C be a k-constraint.Then C forms a k-single-orbit characterization of F if and only if C accepts all degrees in Deg(F)and rejects all degrees in Border(F).

3 Proof of Main Theorem

In this section we prove our main theorem (Theorem 1.1) and along the way explain the main newingredients and the need for them. Like all previous works on k-local testability of affine-invariantlinear properties, our main theorem is obtained from showing the existence of the k-s-o-c property.

Theorem 3.1 (Sparse affine-invariant linear properties have a k-single-orbit characterization). Forevery q that is a power of a prime p and every integer t there exists an integer k = k(t, q) such thatthe following holds. If F ⊆ {Fqn → Fq} is a t-sparse linear affine-invariant property then F has ak-single-orbit characterization.

Proof of Main Theorem 1.1. Follows immediately from Theorem 3.1 and Theorem 2.3.

7

Page 9: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

3.1 Pseudo-tests suffice for local testability

Our single-orbit characterizations are obtained by introducing a notion that we call a “pseudo-test”,which we define below.

Definition 3.2 (Pseudo-test). For disjoint sets D,B ⊆ {0, . . . , qn − 1}, and a k-constraint C =(α,

{

λi

}r

i=1), we say that C is a k-pseudo-test separating D from B if C accepts all degrees in D

and rejects all degrees in B. We say that C is a basic-pseudo-test if it is a basic-constraint. (Whenthe arity k is clear from context we will often drop it, calling it simply a “pseudo-test”.)

As such the pseudo-test above need not satisfy any semantic properties. While the test itselfaccepts every function in the span of the monomials {xd|d ∈ D} it clearly accepts a vast numberof other functions (since it is a single deterministic test and hence accepts a subspace of dimensionqn − r). So it is far from being sound. Our intent is to use the orbit of the pseudo-test as the test,but then this orbit is now not complete! It may not accept xd with probability 1, even for d ∈ D.Thus pseudo-tests seem to be completely irrelevant to the task at hand.

However as we note below in the next corollary, in some circumstances they do work well astests. Furthermore, somewhat surprisingly it is possible to take two pseudo-tests each of which isincomplete, or unsound, and combine them to get something that is complete and sound. Indeedthe value of the pseudo-tests are that they can be composed together nicely. Some of the basic stepsare given later on in Propositions 6.2 and 6.4 and the resulting “broad” Composition Lemma 3.10says that it is possible to construct (“nice”) pseudo-tests “piecemeal” from (not so nice but) simplerpseudo-tests.

The relation between pseudo-tests and single-orbit characterizability is given by the followingCorollary which is an immediate consequence of Lemma 2.7 and the definition of a pseudo-test.

Corollary 3.3 (Equivalent definition of k-single-orbit characterizable property via pseudo-tests).Let F be an affine-invariant linear property, and let C be a k-constraint. Then C forms a k-single-orbit characterization of F if and only if F is a pseudo-test separating Deg(F) from Border(F).

When applying the above corollary it will be useful for us to use the following simple lemmawhich says that a constraint over Fqn accepts a degree d if and only if it accepts all degrees in its(q, n)-shift.

Lemma 3.4. Let d be a degree in {0, 1, . . . , qn − 1}, and let C be a k-constraint over Fqn. Then Caccepts d if and only if it accepts all degrees in Shiftq,n(d).

Proof. Let d′ ∈ Shiftq,n(d) be such that d′ ≡ d · qℓ mod qn− 1. Then for all 1 ≤ i ≤ r we have that

( k∑

j=1

λi,jαdj

)qℓ

=

k∑

j=1

λqℓ

i,jαd·qℓ

j =

k∑

j=1

λi,jαd′j ,

where the first equality is due to the fact that raising to the power qℓ is a linear operation over Fqn ,

while the second equality is due to the fact that λi,j ∈ Fq, and hence λqℓ

i,j = λi,j . Thus we have that∑k

j=1 λi,jαdj = 0 if and only if

∑kj=1 λi,jα

d′j = 0.

Given the notion of pseudo-test we can state the main technical theorem whose proof occupiesthe rest of this paper. In what follows we say D′ is a (q, n)-shift representative set for a (q, n)-shiftclosed set D if Shiftq,n(D

′) = D.

8

Page 10: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Theorem 3.5 (Main Technical — Sparse affine-invariant linear properties have a k-pseudo-test).For every q that is a power of a prime p and every integer t there exists an integer k = k(t, q)such that the following holds. Let F ⊆ {Fqn → Fq} be a t-sparse affine-invariant linear propertyand let D′, B′ be (q, n)-representative sets of Deg(F), Border(F) respectively. Then there exists ak-pseudo-test that separates D′ from B′.

Proof of Theorem 3.1. Follows immediately from Theorem 3.5, Corollary 3.3 and Lemma 3.4.

3.2 Overview of the proof of Main Technical Theorem 3.5

Fix (q, n)-shift representative sets D′, B′ for Deg(F) and Border(F) respectively. We construct apseudo-test that separates D′ from B′ in three steps as follows.

1. Cover D′ ×B′ by a constant number of product sets

D′ ×B′ = D′0 ×B′

0 ∪ . . . ∪D′ℓ ×B′

ℓ (1)

where the constant ℓ depends only on t and q, and, crucially, is independent of n.

2. For each i = 1, . . . , ℓ construct a k′-pseudo-test that separates D′i from B′

i, where k′ does notdepend on n (it, too, depends on q and t).

3. Show that all ℓ of the k′-pseudo-tests can be “composed” to derive a single k-pseudo-test thatseparates D′ from B′ with k = k(k′, t, ℓ). This separates D′ from B′ by a pseudo-test of sizethat depends only on q and t and is independent of n and thereby proves Theorem 3.5.

We now elaborate on each of the steps. The second step will be broken up into two sub-stepsbecause there are two very different kinds of pair-sets that we need to consider, and each requiresits own set of tools.

3.3 Covering the (q, n)-shift representative sets

First we define the cover of D′ × B′ by set-pairs and then bound the number of set-pairs in ourcover in Lemma 3.7. (Inspection reveals that our cover is actually a partition of D′ × B′ but therest of our proofs only need the weaker assumption of a cover.)

Definition 3.6 (Cover). Given D′, B′ that are (q, n)-shift representative sets of Deg(F) andBorder(F) respectively, where q = ps for a prime p, partition B′ into

B0 = B′ \ Shiftp,sn(D′); B1 = B′ ∩ Shiftp,sn(D

′). (2)

Set D′0 = D′ and B′

0 = B0. Order the pairs in D′ × B1 arbitrarily as {(d1, b1), . . . , (dℓ, bℓ)} whereℓ = |D′| · |B1| and let D′

i = {di} and B′i = {bi} for all i = 1, . . . , ℓ.

Notice that although elements of Border(F) do not belong to Deg(F) (cf. Definition 2.6), theycan potentially belong to Shiftp,sn(Deg(F)), so the set B1 can indeed be nonempty.

Inspection reveals that the above set of pairs in Definition 3.6 covers D′ × B′. The followinglemma bounds the number of pairs by bounding |D′| · |B1|. The second part of the lemma will beused soon and since its proof relies on the first part we find it convenient to include it here. Tostate the second part we define the p-weight wtp(d) of an integer d as the sum of digits of the base-prepresentation of d. Formally, if d =

i≥0 dipi then wtp(d) =

i≥0 di.

9

Page 11: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Lemma 3.7 (t-sparse properties have sparse representative sets). Suppose that F ⊆ {Fqn → Fq}is a t-sparse affine-invariant linear property. Then the following holds:

1. There exist (q, n)-shift representative sets D′, B′ for Deg(F), Border(F) respectively suchthat |D′| ≤ 2t+ 1, and assuming q = ps where p is a prime, B1 = Border(F) ∩ Shiftp,sn(D

′)is of size at most s(2t+ 1).

2. All integers in Deg(F) have p-weight at most 2t and those of Border(F) have p-weight atmost 2t+ 1.

Proof. Our starting point is Lemma 2.15 from [BGM+11a]. It says that if F is t-sparse then ithas a (q, n)-shift representative set D′ of size at most 2t + 1. The border could be potentially ofmuch larger size but if we restrict our attention only to the elements that lie in Shiftp,sn(D

′), thenthey can be represented by a set B1 of size at most s|D′| because for each nonzero d ∈ D′ the(q, n)-shifts of d, dp, . . . , dps−1 cover the (p, sn)-shift of d.

To prove the second part we claim that Deg(F) contains integers of p-weight at most 2t. Bydefinition, this will immediately imply (cf. Definition 2.6) that the p-weight of every element ofBorder(F) is at most 2t+1. To see that Deg(F) cannot contain an integer of p-weight greater than2t notice that Lemma 2.4 implies that if an integer of p-weight r belongs to Deg(F) then there areintegers of p-weight r′ in Deg(F) for every r′ = 0, 1, . . . , r − 1. Since the (q, n)-shift of an integerd contains only integers of the same p-weight as d, this implies that |D′| > r. The assumption|D′| ≤ 2t + 1 therefore shows that no integer in Deg(F) has p-weight greater than 2t as claimedand this completes our proof.

3.4 Separating a pair of sets with disjoint p-shifts

We now turn to the task of separating individual pairs of sets from our cover given in Definition 3.6.We start by showing a pseudo-test which separates a pair of sets D, B such that B does not containany p-shift of a degree in D. This pseudo-test will be used for separating the sets D′

0 from B′0 and

in addition for separating all pairs (di, bi) such that the degree bi does not belong to a p-shift ofthe degree di. Our proof method uses the work of Kauffman and Lovett [KL11]. Stated usingour language of pseudo-tests, they proved that for every t-sparse affine-invariant linear propertyF ⊆ {Fpn → Fp} over a prime field Fp there exists a k(t)-pseudo-test that separates D′ fromB′, where D′, B′ are (p, n)-shift representative sets of Deg(F), Border(F) respectively. And byCorollary 3.3 and Lemma 3.4. this readily implies F is also k(t)-single-orbit characterizatable. Weobserve that the proof method of [KL11] actually gives the following more general pseudo-test.

Lemma 3.8 (Separation of distinct (p, n)-shifts). For every t, w and prime p there exists k = k(t, w)such that the following holds for sufficiently large n: Let D,B ⊆ {0, . . . , pn − 1} such that |D| ≤ t,B does not contain any (p, n)-shift of a degree in D and in addition wtp(d) ≤ w for every degreed ∈ D ∪B. Then there exists a single (basic) k-pseudo-test C that separates D from B.

We prove this lemma in Section 5. To see that the result of [KL11] is a special case of it note thatif F ⊆ {Fpn → Fp} is a t-sparse affine-invariant linear property over a prime field Fp then Lemma3.7 implies that Deg(F) has a (p, n)-shift representative set D′ of size at most 2t + 1. Moreover,Part 2 of the same Lemma implies that if B′ is a (p, n)-shift representative set of Border(F) thenwtp(d) ≤ 2t+1 for every d ∈ D′∪B′. Finally, note that the fact that F is an affine-invariant linearproperty over Fp implies that it is (p, n)-shift-closed and hence B′ does not contain any (p, n)-shiftof a degree in D′.

10

Page 12: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

3.5 Separating a pair of degrees in the same p-shift

Lemma 3.8 only gives a pseudo-test which separate pairs of degrees that belong to different (p, n)-shifts. As explained above, this suffices in order to prove single-orbit characterizability of affine-invariant linear properties over a prime field Fp since the degree sets of such properties are (p, n)-shiftclosed. However, in the case of non-prime fields of size q = ps affine-invariant linear properties arenot necessarily (p, sn)-shift closed, and thus we need to be able to separate also pairs of degreesthat belong to the same (p, sn)-shift. The following lemma covers this case.

Lemma 3.9 (Separation of two degrees in the same (p, sn)-shift). Let q = ps for a prime p, andlet d ∈ {0, . . . , qn−1}, b ∈ Shiftp,sn(d)\Shiftq,n(d) be a pair of degrees of p-weight at most w. Then

there exists a single (basic) k-pseudo-test C that separates {d} from {b} for k = 4 · 84w+1

.

As mentioned earlier this is the case where we have to design the pseudo-tests explicitly. Weprove this lemma, using machinery that comes from the proofs of the sum-product theorem, inSection 4 .

3.6 A Calculus for composing pseudo-tests

So far we have managed to find a separating pseudo-test for each pair of sets in our cover of D′×B′

given in Definition 3.6. In order to obtain a single pseudo-test that separates all of D′ from all ofB′ and thereby prove Theorem 3.5 we introduce a natural calculus for composing pseudo-tests thatseparate distinct pairs of degree-sets. Suppose C1 is a k1-pseudo-test that separates D1 from B1

and C2 is a k2-pseudo-test that separates D2 from B2. One of the basic operations in our calculustakes the “union” of C1 and C2 and gives a (k1 + k2)-pseudo-test that separates D1 ∩ D2 fromB1 ∪ B2 (cf. Proposition 6.2). The second operation takes the “tensor” of C1 and C2 and gives a(k1 ·k2)-pseudo-test which separates D1∪D2 from B1∩B2 (cf. Proposition 6.4). The combination ofthe two operations yields the following result that allows us to combine many different pseudo-testsinto one.

Lemma 3.10 (Composition of pseudo-tests). For every k′, t and ℓ, there exists k = k(k′, t, ℓ)such that the following holds. Let D,B ⊆ {0, . . . , qn − 1} be disjoint sets with |D| ≤ t and letD×B = D1 ×B1 ∪ . . .∪Dℓ ×Bℓ be a cover of D×B. Suppose that for all i = 1, . . . , ℓ there existsa k′-pseudo-test Ci which separates Di from Bi. Then there exists a k-pseudo-test C that separatesD from B.

The proof of the lemma, along with a detailed description of the calculus of “unions” and“tensors” that underlie it, appears in Section 6.

3.7 Completing the proof of Theorem 3.5

We are now in the position to complete the formal proof of the main technical theorem.

Proof of Main Technical Theorem 3.5. Let q = ps for a prime p and let F ⊆ {Fqn → Fq} bea t-sparse affine-invariant linear property. Let B′,D′ be the (q, n)-shift representative sets forDeg(F),Border(F) respectively guaranteed by Lemma 3.7. By the lemma we have |D′| ≤ 2t + 1and |B′ ∩ Shiftp,sn(D

′)| ≤ s(2t+1) and all integers in D′ have p-weight at most 2t and those of B′

have p-weight at most 2t+ 1. Cover D′ ×B′ as in Definition 3.6 and notice the number of sets inthis cover is bounded by 1 + |D′| · |B1| ≤ s(2t+ 1)2 + 1.

Apply Lemma 3.8 to conclude that D′0 can be separated from B′

0 by a k1-pseudo-test C0 fork1 that depends only on t. Apply Lemma 3.8 also to each pair D′

i × B′i, i = 1, . . . , ℓ which satisfy

11

Page 13: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Shiftp,sn(di) ∩ Shiftp,sn(bi) = ∅ to obtain a k1-pseudo-test Ci that separates D′i from B′

i. Finally,apply Lemma 3.9 to each pair D′

i × B′i, i = 1, . . . , ℓ that satisfy Shiftp,sn(di) ∩ Shiftp,sn(bi) 6= ∅ to

obtain a k2-pseudo-test Ci that separates D′i from B′

i where k2 depends only on t.Apply the composition Lemma 3.10 to C0, . . . , Cℓ and, recalling ℓ is bounded by a polynomial

in s, t and |D′| ≤ 2t+ 1 we conclude the existence of a k-pseudo-test C that separates D′ from B′

where k depends only on t and q. This completes the proof of Theorem 3.5.

4 Separating pairs of degrees in the same p-shift — Proof of

Lemma 3.9

In this section we prove Lemma 3.9, showing for every pair of degrees d ∈ {0, . . . , qn − 1}, b ∈Shiftp,sn(d) \Shiftq,n(d) of constant p-weight the existence of a k-constraint which separates d fromb.

The proof idea of Lemma 3.9 is the following. Suppose we wish to find a constraint whichseparates the degree d from the degree d · pi ∈ Shiftp,sn(d) \Shiftq,n(d). Let A =

{

αd|α ∈ Fqn}

, and

assume for simplicity that A∩ (Fq \Fpi) 6= ∅. Then in this case there exists a constraint C = (α, λ)of arity 2 which separates d from d · pi: Let γd ∈ A∩ (Fq \Fpi) and α = (α1, α2) = (1, γ) ∈ F

2qn , and

let λ = (λ1, λ2) = (−1, γ−d) ∈ F2q (the fact that γ−d , 1/γd is in Fq follows from our assumption

that γd ∈ Fq). Then for the degree d we have that

λ1αd1 + λ2α

d2 = −1 + γ−dγd = 0, (3)

and hence C accepts d. On the other hand, for the degree d · pi we have that

λ1αd·pi

1 + λ2αd·pi

2 = −1 + γ−dγd·pi. (4)

Note that (4) equals zero if and only if (γd)pi= γd. But by assumption γd /∈ Fpi , and hence

(γd)pi6= γd which implies in turn that (4) is non-zero.

However, our assumption that A ∩ (Fq \ Fpi) 6= ∅ was too optimistic. To resolve this we resortto the closure F(A) of A in Fqn , defined as the smallest subfield of Fqn containing A. Note thatFp ⊆ F(A) ⊆ Fqn . We first prove (in Lemma 4.1) that F(A) ∩ (Fq \ Fpi) 6= ∅. Then in Lemma 4.2we prove, using machinery developed for the proof of a version of the sum-product theorem from[BIW06], that if d ≤ q(1−ǫ)n then every element γ ∈ F(A) can be written as γ = γ1

γ2where both γ1

and γ2 are the sum of a constant number of elements in A (this constant depends only on ǫ). Thisgives in turn the desired constraint C = (α, λ) which separates d from d · pi.

We start by claiming that F(A) contains an element in Fq \ Fpi .

Lemma 4.1. Let q = ps for some prime p, and let d ∈ {0, . . . , qn − 1} be such that d · pi /∈Shiftq,n(d). Let A =

{

αd|α ∈ Fqn}

, and let F(A) be the smallest subfield of Fqn containing A. ThenF(A) ∩ (Fq \ Fpi) 6= ∅.

Proof. Let F(A) = Fpm , and suppose by way of contradiction that Fpm ∩ (Fq \ Fpi) = ∅. ThenFpm ∩ Fq ⊆ Fpi. In order to arrive at a contradiction, we will show that d · pi is a (q, n)-shift of dcontradicting our assumption.

Let r = gcd(s,m). Then we have Fpm ∩ Fq = Fpr ⊆ Fpi and hence r divides i. Our firstobservation is that since r = gcd(s,m) there exists a pair of integers t, ℓ such that tm+ ℓs = r. Lett′ = it

r , ℓ′ = iℓ

r . Since r divides i we have that t′, ℓ′ are integers and

t′m+ ℓ′s =it

rm+

iℓ

rs =

i

r(tm+ ℓs) = i. (5)

12

Page 14: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Our second observation is that since F(A) = Fpm then for every α ∈ Fqn we have that (αd)pm=

αd and hence the polynomial xd·pm− xd is identically zero over Fqn . This implies in turn that

d · pm ≡ d mod qn − 1. (6)

From (5) and (6) we have

d · pi ≡ d · pt′m+ℓ′s mod qn − 1 (From (5))

≡ d · pℓ′s mod qn − 1 (From (6))

≡ d · qℓ′

mod qn − 1 (Since q = ps)

Thus we have that d · pi is a (q, n)-shift of d — a contradiction.

We now prove that if d is not too large then every element γ ∈ F(A) can be written in the formγ = γ1

γ2where both γ1 and γ2 are sums of a constant number of elements in A.

Lemma 4.2. Let d ∈ {0, 1, . . . , qn − 1} be a degree which satisfies d ≤ q(1−ǫ)n, let A ={

αd|α ∈ Fqn}

, and let F(A) be the smallest subfield of Fqn containing A. Then F(A) ⊆ ℓA−ℓAℓA−ℓA

for ℓ = 84⌈1/ǫ⌉

.

Using [CC11, Theorem 1.2] the bound on ℓ above can be improved to exponential in 1/ǫ, i.e.,ℓ = 2O(1/ǫ). For the sake of presenting a simple self-contained proof, we prove the above lemmausing the following theorem from [BIW06] which was proved there as a step towards a simplifiedversion of the sum-product theorem of [BKT04]. For a set A and ⊙ an arithmetic operation in{+,−,÷,×} let A⊙A = {a⊙ a′|a, a′ ∈ A}.

Theorem 4.3 ([BIW06], Claim A.4.). Let F be a finite field, and let A ⊆ F and k ∈ N (with k ≥ 2)be such that |F|1/k < |A| ≤ |F|1/(k−1). Then |A−A

A−A | ≥ |F|1/(k−1).

Proof of Lemma 4.2. Apply Theorem 4.3 iteratively. Set A0 := A and for i = 1, 2, 3, . . . let A′i =

Ai−1−Ai−1

Ai−1−Ai−1, and Ai = A′

i + A′i · A

′i. The proof consists of two main steps. In the first step we will

argue that there exists t ≤ ⌈1/ǫ⌉ + 1 for which F(A) ⊆ At. In the second step we will prove by

induction on i that Ai ⊆84

i−1A−84

i−1A

84i−1A −84i−1Afor every i = 1, 2, 3, . . .. Lemma 4.2 follows from the i = t

case.We start by showing the existence of t ≤ ⌈1/ǫ⌉ + 1 for which F(A) ⊆ At. To see this note first

that since d ≤ q(1−ǫ)n, for every β ∈ Fqn there are at most q(1−ǫ)n solutions in x to the equationxd = β. Thus |A0| ≥

qn

q(1−ǫ)n = qǫn. Choose k = ⌈1ǫ ⌉+ 1, and note that ǫ > 1k . Theorem 4.3 implies

that |A′1| = |A0−A0

A0−A0| ≥ (qn)1/(k−1). If A′

1 is a field then we are done since it can be verified thatA ⊆ A′

1 (since 0 ∈ A) and hence F(A) ⊆ A′1 from the minimality of F(A). Otherwise we have that

|A1| = |A′1 +A′

1 ·A′1| is strictly greater than (qn)1/(k−1), and thus we can apply Theorem 4.3 again

to the set A1. Continuing this process iteratively we have that at the i-th step either A′i is a field

and hence F(A) ⊆ A′i ⊆ Ai or that |Ai| > |A′

i| ≥ (qn)1/(k−i). Since Ai ⊆ Fqn for all i, this processmust terminate after at most k = ⌈1ǫ ⌉+ 1 steps, and thus we have that F(A) ⊆ At for t ≤ ⌈1ǫ ⌉+ 1.

Next we show by induction on i that Ai ⊆84

i−1A−84

i−1A

84i−1A −84i−1Afor every i = 1, 2, 3, . . .. This will

imply in turn that

F(A) ⊆ At ⊆84

⌈1/ǫ⌉A − 84⌈1/ǫ⌉A

84⌈1/ǫ⌉A − 84

⌈1/ǫ⌉A

13

Page 15: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Base case — i = 1. Noting that A is closed under multiplication, in this case we have that

A1 = A′1 +A′

1 ·A′1 =

A−A

A−A+

A−A

A−A·A−A

A−A⊆

A−A

A−A+

2A− 2A

2A− 2A⊆

8A− 8A

4A− 4A⊆

8A− 8A

8A− 8A

Induction step. Suppose that the claim holds for index i and we will prove that it holds forindex i+ 1 as well.

Ai+1 = A′i+1 +A′

i+1 ·A′i+1 =

Ai −Ai

Ai −Ai+

Ai −Ai

Ai −Ai·Ai −Ai

Ai −Ai

⊆84

i−1A− 84

i−1A

84i−1A − 84i−1A+

84i−1

A− 84i−1

A

84i−1A − 84i−1A·84

i−1A− 84

i−1A

84i−1A − 84i−1A(Induction hypothesis)

⊆84

i−1A− 84

i−1A

84i−1A − 84i−1A+

2 · 82·4i−1

A− 2 · 82·4i−1

A

2 · 82·4i−1A− 2 · 82·4i−1A

⊆8 · 83·4

i−1A− 8 · 83·4

i−1A

4 · 83·4i−1A − 4 · 83·4i−1A

⊆84

iA− 84

iA

84iA − 84

iA

In our proof of Lemma 3.9 we would like to apply Lemma 4.2 to the degree d. In order to applythis lemma we need d to be small. However, all we know about d is that it has small p-weightand this does not guarantee that d is small. In order to deal with this we shall first prove thatsince d has a small p-weight, it has a degree d′ in its (q, n)-shift that is small. We will then show aconstraint over Fqn which separates d′ from d′ · pi. From Lemma 3.4 this will also imply that theconstraint C separates d from d · pi. The following lemma says that every degree of small q-weighthas a degree in its (q, n)-shift that is small.

Lemma 4.4. For every degree d ∈ {0, 1, . . . , qn − 1} there exists a degree d′ ∈ Shiftq,n(d) such thatd′ ≤ q(1−1/wtq(d))n+1

Proof. Let t = wtq(d), and let d =∑n−1

i=0 diqi be the representation of d in base-q. Since

wtq(d) ≤ t the pigeonhole principle implies that d has at least n−tt = n

t − 1 consecutivedigits dj , dj+1 mod n, . . . , dj+n

t−2 mod n which equal zero. Let d′ ∈ Shiftq,n(d) be such that

d′ ≡ d · qn+1−n/t−j mod qn − 1. Then d′ satisfies that all indices d′n−nt+1, . . . , d

′n−1 equal zero,

where d′ =∑n−1

i=0 d′iqi is the representation of d′ in base-q. But this implies in turn that

d′ ≤∑n(1−1/t)

i=0 (q − 1)qi ≤ qn(1−1/t)+1.

We now proceed to the proof of Lemma 3.9

Proof of Lemma 3.9. Suppose that b ∈ Shiftq,n(d) such that b ≡ d · pi mod qn − 1. Since wtq(d) ≤wtp(d) ≤ w, from Lemma 4.4 we have that there exists a degree d′ ∈ Shiftq,n(d) such that d′ ≤q(1−1/w)n+1 ≤ q(1−1/(w+1))n for sufficiently large n. Let b′ ∈ Shiftq,n(d

′) such that b′ ≡ d′ · pi

mod qn − 1 and note that b′ ∈ Shiftp,sn(d′) \ Shiftq,n(d

′). From Lemma 3.4 it suffices to show ak-constraint which separates d′ from b′.

Let A ={

αd′ |α ∈ Fqn

}

, and let F(A) be the smallest subfield of Fqn containing A. From

Lemma 4.1 we have that F(A)∩ (Fq \Fpi) 6= ∅, let γ ∈ F(A)∩ (Fq \Fpi). From Lemma 4.2 and since

14

Page 16: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

d′ ≤ q(1−1/(w+1))n we have that F(A) ⊆ ℓA−ℓAℓA−ℓA for ℓ = 84

w+1, and thus γ ∈ ℓA−ℓA

ℓA−ℓA . In particularthere exist β1, . . . , β4ℓ ∈ Fqn such that

γ =(βd′

1 + . . . + βd′

ℓ )− (βd′

ℓ+1 + . . .+ βd′

2ℓ)

(βd′2ℓ+1 + . . .+ βd′

3ℓ)− (βd′3ℓ+1 + . . .+ βd′

4ℓ)(7)

The constraint C = (α, λ) will be the (4ℓ)-constraint defined by α = (α1, . . . , α4ℓ) ∈ F4ℓqn and

λ = (λ1, . . . λ4ℓ) ∈ F4ℓq , where αi = βi for all 1 ≤ i ≤ 4ℓ, and

λi =

−1 1 ≤ i ≤ ℓ1 ℓ+ 1 ≤ i ≤ 2ℓγ 2ℓ+ 1 ≤ i ≤ 3ℓ−γ 3ℓ+ 1 ≤ i ≤ 4ℓ

.

It remains to show that the constraint C accepts d′ and rejects b′. For the degree d′ we havefrom (7) that

4ℓ∑

i=1

λiαd′

i = −

( ℓ∑

i=1

βd′

i −2ℓ∑

i=ℓ+1

βd′

i

)

+ γ

( 3ℓ∑

i=2ℓ+1

βd′

i −4ℓ∑

i=3ℓ+1

βd′

i

)

= 0

On the other hand, for the degree b′ we have

4ℓ∑

i=1

λiαb′

i =4ℓ∑

i=1

λiαd′·pi

i (Since b′ ∈ Shiftq,n(d′) such that b′ ≡ d′ · pi mod qn − 1)

= −

( ℓ∑

i=1

βd′·pi

i −2ℓ∑

i=ℓ+1

βd′·pi

i

)

+ γ

( 3ℓ∑

i=2ℓ+1

βd′·pi

i −4ℓ∑

i=3ℓ+1

βd′·pi

i

)

= −

( ℓ∑

i=1

βd′i −

2ℓ∑

i=ℓ+1

βd′i

)pi

+ γ

( 3ℓ∑

i=2ℓ+1

βd′i −

4ℓ∑

i=3ℓ+1

βd′i

)pi

(Since the mapping y 7→ ypiis linear)

=

( ℓ∑

i=1

βd′

i −2ℓ∑

i=ℓ+1

βd′

i

)pi

(−1 + γ · γ−pi) (From (7))

To see that the above equation is non-zero note that γ /∈ Fpi and hence γpi6= γ. This implies in

turn that −1+γ ·γ−pi 6= 0. Also, since γ 6= 0, from (7) we have that

(

∑ℓi=1 β

d′i −

∑2ℓi=ℓ+1 β

d′i

)pi

6= 0.

Hence the above equation is non-zero which concludes the proof of the lemma.

5 Separating a pair of sets with disjoint p-shifts — Proof of Lemma

3.8

In this section we prove Lemma 3.8 which shows the existence of a k-constraint which separatesdegree sets with disjoint (p, n)-shifts. We will prove Lemma 3.8 using probabilistic argumentsfollowing the proof method of [KL11]. More precisely, we will show that if we choose λ ∈ (F∗

p)k,

α ∈ (Fpn)k uniformly and independently at random for sufficiently large k, then with sufficiently

high probability the constraint C = (α, λ) will accept the set D and will reject the set B. In orderto prove this we first compute bounds on the probability that such a random constraint accepts alldegrees in an arbitrary degree set D ⊆ {0, 1, . . . , pn − 1}.

15

Page 17: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Lemma 5.1. Let p be a prime, and let D ⊆ {0, 1, . . . , pn − 1} be such that D has a (p, n)-shiftrepresentative set of size t, and wtp(d) ≤ w for every d ∈ D . Let λ ∈ (F∗

p)k, α ∈ (Fpn)

k be chosenuniformly and independently at random. Then if 0 /∈ D,

Prλ∈(F∗

p)k, α∈(Fpn )k

[C = (α, λ) accepts D]− p−|Shiftp,n(D)|

≤ |Fpn |−k/(2w22wt),

while if 0 ∈ D,

Prλ∈(F∗

p)k, α∈(Fpn )k

[C = (α, λ) accepts D]−

(

1+ (−1)k(

1

p− 1

)k−1)

p−|Shiftp,n(D)|

≤ |Fpn |−k/(2w22wt).

The proof of the above lemma appears in Section 5.1. Before proving this lemma, we presentthe proof of Lemma 3.8 based on it.

Proof of Lemma 3.8. Suppose first that 0 /∈ B, we will deal with the case in which 0 ∈ B later.Choose k = 2w22w(t + 1) + 2 (note that k is even), and let λ ∈ (F∗

p)k, α ∈ (Fpn)

k be chosenuniformly and independently at random. Denote by P (D,B) the probability that the randomconstraint C = (α, λ) accepts all degrees in D and rejects all degrees in B. Our goal will be to showthat P (D,B) is at least (p − 1)−kp−nk, the probability assigned under the uniform distributionto a fixed pair of vectors λ ∈ (F∗

p)k, α ∈ (Fpn)

k. This will imply the existence of a k-constraint

C = (α, λ) which accepts all degrees in D and rejects all degrees in B. We compute a lower boundon P (D,B) using Lemma 5.1.

P (D,B) ≥ Prλ∈(F∗

p)k, α∈(Fpn)k

[C = (α, λ) accepts D]−∑

b∈B

Prλ∈(F∗

p)k, α∈(Fpn )k

[C = (α, λ) accepts D ∪ {b} ]

≥ p−|Shiftp,n(D)| − p−nk/(2w22wt) −∑

b∈B

(

p−|Shiftp,n(D∪{b})| + p−nk/(2w22w(t+1))

)

(from Lemma 5.1 and since k is even)

= p−|Shiftp,n(D)| − p−nk/(2w22wt) −∑

b∈B

(

p−(|Shiftp,n(D)|+|Shiftp,n(b)|) + p−nk/(2w22w(t+1))

)

(b /∈ Shiftp,n(D))

≥ p−|Shiftp,n(D)|

(

1−∑

b∈B

p−|Shiftp,n(b)|

)

− (|B|+ 1)p−nk/(2w22w(t+1)) (8)

In order to bound the above expression we bound the sizes of Shiftp,n(D), Shiftp,n(b) and B.The size of Shiftp,n(D) can be bounded easily noting that |D| ≤ t and |Shiftp,n(d)| ≤ n for everyd ∈ D which yields

|Shiftp,n(D)| ≤ tn. (9)

Next we bound Shiftp,n(b) from below for b ∈ B. Let b =∑n−1

i=0 bipi be the base-p representation

of b. From our assumption that 0 /∈ B we have that b 6= 0 and hence bi 6= 0 for some 0 ≤ i ≤ n− 1.Suppose that |Shiftp,n(b)| = r, note that this implies that r divides n. But this implies that pjr ·b ≡ bmod pn − 1 for every integer 0 ≤ j ≤ n

r which implies in turn that bi ≡ bi+jr mod n for everyinteger 0 ≤ j ≤ n

r . Thus we have that wtp(b) ≥nr which gives

|Shiftp,n(b)| ≥n

w. (10)

16

Page 18: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Finally, we bound the size of B. Since all degrees in B have p-weight at most w, we can boundthe size of B for sufficiently large n by

|B| ≤w∑

i=0

(

n+ w − 1

w − 1

)

≤ (w + 1) · (n+ w − 1)w−1. (11)

Plugging Equations (9), (10) and (11) into (8) we obtain

P (D,B) ≥ p−tn(

1− (w + 1) · (n+ w − 1)w−1 · p−n/w)−(

(w + 1) · (n+ w − 1)w−1 + 1)

p−nk/(2w22w(t+1))

≥1

2p−tn (due to our choice of k = 2w22w(t+ 1) + 2 and for sufficiently large n)

≥ (p− 1)−kp−nk

It remains to deal with the case in which 0 ∈ B. The same calculations as above show theexistence of a k-constraint C which is a pseudo-test separating D from B \ {0}. Note also that the1-constraint C ′ = (α, λ) defined by α = 0, λ = 1 rejects the degree 0 and accepts all degrees in Dand thus forms a pseudo-test separating D from {0}. Thus the union constraint C ′′ = C ′ ∪ C (cf.Definition 6.1) forms a (k + 1)-constraint which is a pseudo-test separating D from B.

5.1 Proof of Lemma 5.1

In order to prove this lemma we first show that the task of computing the probability that a randomconstraint satisfies a degree set D can be reduced to the task of computing the expected bias ofthe trace of sparse polynomials supported on degrees in D. We will then use a special bound onthe distribution of the image of sparse polynomials from [KL11] in order to compute this latterexpectation.

Recall that the trace operator over Fqn is the function Traceqn→q : Fqn → Fq defined as

Traceqn→q(x) =∑n−1

i=0 xqi. The following are well-known facts regarding the trace function that we

shall use for the proof of Lemma 5.1.

Fact 5.2. The trace operator is Fq-linear, i.e. for α, β ∈ Fqn and γ ∈ Fq, Traceqn→q(α + β) =Traceqn→q(α) + Traceqn→q(β) and Traceqn→q(γα) = γTraceqn→q(α). Moreover, it is a qn−1-to-1map, i.e., for every α ∈ Fq, |Trace

−1qn→q(α)| = qn−1.

Fact 5.3 (Trace of linear functions is unbiased). Let p be a prime. Then for every α1, α2, . . . , αn ∈Fpn not all zero we have that

Ex1,x2,...,xn∈Fpn

[

ωTracepn→p(

∑ni=1 αixi)

p

]

= 0,

where ωp = e2πi/p is the complex p-root of unity.

For a degree set D ⊆ {0, 1, . . . , pn − 1} and a vector β = (βd)d∈D ∈ (Fpn)|D| let fβ(x) =

d∈D βdxd. For a function g : Fpn → Fp, let Biasp(g) =

Prα∈Fpn[g(α)=0]−1/p

1−1/p .

Lemma 5.4. Let p be a prime, and let D ⊆ {0, 1, . . . , pn − 1}. Let λ ∈ (F∗p)

k, α ∈ (Fpn)k be chosen

uniformly and independently at random. Then

Prλ∈(F∗

p)k, α∈(Fpn )k

[C = (α, λ) accepts D] = Eβ∈(Fpn )|D|

[

Biasp(Tracepn→p(fβ))]k.

17

Page 19: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Proof. Our first observation is that

Prλ∈(F∗

p)k , α∈(Fpn )k

[C = (α, λ) accepts D] = Eβ∈(Fpn )|D|,λ∈(F∗p)

k, α∈(Fpn)k

[

ωTracepn→p(

∑d∈D βd(

∑ki=1 λiα

di ))

p

]

.

To see this let µ(β, α, λ) = ωTracepn→p(

∑d∈D βd(

∑ki=1 λiαd

i ))p . Note that for every α, λ such that

C = (α, λ) accepts D we have that∑k

i=1 λiαdi = 0 for all d ∈ D, and hence µ(β, α, λ) = 1 for all

β ∈ (Fpn)|D|. In particular, in this case Eβ∈(Fpn)|D|µ(β, α, λ) = 1. On the other hand, for every α, λ

such that C = (α, λ) does not accept D there exists d ∈ D such that∑k

i=1 λiαdi 6= 0, and hence

Tracepn→p(∑

d∈D βd(∑k

i=1 λiαdi )) is distributed uniformly over Fp when β is distributed uniformly

over (Fpn)|D|. This implies in turn that Eβ∈(Fpn )|D|µ(β, α, λ) = 0.

Thus we have

Prλ∈(F∗

p)k , α∈(Fpn )k

[C = (α, λ) accepts D] = Eβ∈(Fpn)|D|,λ∈(F∗p)

k , α∈(Fpn )k

[

ωTracepn→p(

∑d∈D βd(

∑ki=1 λiα

di ))

p

]

= Eβ∈(Fpn)|D|,λ∈(F∗p)

k , α∈(Fpn )k

[

ω

∑ki=1 λiTracepn→p(fβ(αi))

p

]

= Eβ∈(Fpn)|D|,λ0∈F∗p, α0∈Fpn

[

ωλ0Tracepn→p(fβ(α0))p

]k

= Eβ∈(Fpn)|D| [Biasp(Tracepn→p(fβ))]k

To see the last equality let ρ(λ0, α0) = ωλ0Tracepn→p(fβ(α0))p . Note that for every α0 ∈ Fpn such

that Tracepn→p(fβ(α0)) = 0 we have that ρ(λ0, α0) = 1 for all λ0 ∈ Fp. In particular, in this caseEλ0∈Fpρ(λ0, α0) = 1. On the other hand, for every α0 ∈ Fpn such that Tracepn→p(fβ(α0)) 6= 0 wehave that λ0Tracepn→p(fβ(α0)) is distributed uniformly over Fp when λ0 is distributed uniformlyover Fp and hence Eλ0∈Fpρ(λ0, α0) = 0. This implies in turn that

Eλ0∈Fp, α0∈Fpnρ(λ0, α0) = Pr

α0∈Fpn[Tracepn→p(fβ(α0)) = 0],

and hence

Eλ0∈F∗p, α0∈Fpn

ρ(λ0, α0) =Prα0∈Fpn

[Tracepn→p(fβ(α0)) = 0]− 1/p

1− 1/p= Biasp(Tracepn→p(fβ)).

In order to compute the expectation in the right-hand side of Lemma 5.4 we shall use thefollowing special bound on the distribution of the image of sparse polynomials from [KL11] (seealso [KL10]).

Theorem 5.5 (Bounds on the image distribution of sparse polynomials, [KL10], Theorem 1.3.).Let p be a prime, and let f(x) be a univariate polynomial over Fpn. Suppose that f(x) is the sum ofat most t monomials over Fpn, each of degree if p-weight at most w with respect to p. Then eitherTracepn→p(f(x)) is constant for every x ∈ Fpn, or

Ex∈Fpn

[

ωTracepn→p(f(x))p

]∣

≤ |Fpn |−1/(2w22wt).

18

Page 20: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Note that the above bound applies only if Tracepn→p(f(x)) is non-constant, and hence in orderto compute the expectation in the right-hand side of Lemma 5.4 we shall also need to computethe probability, over all vectors β ∈ (Fpn)

|D|, that the function fβ(x) =∑

d∈D βdxd is the constant

function. This is done in the following lemma.

Lemma 5.6. Let p be a prime, and let D be a subset of {0, 1, . . . , pn − 1} which satisfies thatShiftp,n(d) ∩ Shiftp,n(d

′) = ∅ for every distinct d, d′ ∈ D. Then

Prβ∈(Fpn)|D|

[Tracepn→p(fβ) is the zero function] = p−|Shiftp,n(D)|.

In addition, for every c ∈ F∗p,

Prβ∈(Fpn )|D|

[Tracepn→p(fβ) ≡ c] =

{

p−|Shiftp,n(D)|, 0 ∈ D0, otherwise

Proof. Our first observation is that Tracepn→p(fβ) is the zero function if and only if the polynomial

Tracepn→p(fβ) mod xpn− x is the zero polynomial. Note that

Tracepn→p(fβ) = Tracepn→p

(

d∈D

βdxd

)

=∑

d∈D

Tracepn→p

(

βdxd)

.

Our second observation is that since all degrees in D lie in distinct (p, n)-shifts then all mono-mials in Tracepn→p

(

βdxd)

mod xpn− x are distinct from all monomials in Tracepn→p

(

βd′xd′)

mod xpn− x for all distinct d, d′ ∈ D.

One last observation is that if d ∈ D satisfies |Shiftp,n(d)| = ℓ then all monomials in

Tracepn→p

(

βdxd)

mod xpn− x are of the form xd·p

i mod pn−1, 0 ≤ i ≤ ℓ − 1, where the coeffi-

cient of the monomial xd·pi mod pn−1 is (Tracepn→pℓ(βd))

pi . Note that (Tracepn→pℓ(βd))pi equals

zero if and only if (Tracepn→pℓ(βd))pj equals zero, and that the number of elements βd ∈ Fpn

which satisfy (Tracepn→pℓ(βd))pi = 0 is exactly pn−ℓ. Thus the probability that a random element

βd ∈ Fpn satisfies that Tracepn→p

(

βdxd)

mod xpn− x is the zero polynomial is exactly p−ℓ.

Concluding, we have that for every d ∈ D the probability that a random element βd ∈ Fpn

satisfies that Tracepn→p

(

βdxd)

mod xpn− x is the zero polynomial equals p−|Shiftp,n(d)|. Since all

polynomials of the form Tracepn→p

(

βdxd)

mod xpn− x for d ∈ D have distinct monomials, this

implies in turn that

Prβ∈(Fpn )|D|

[Tracepn→p(fβ) is the zero function] =∏

d∈D

p−|Shiftp,n(d)| = p−∑

d∈D |Shiftp,n(d)| = p−|Shiftp,n(D)|.

The second part of the lemma can be proved similarly by observing that Tracepn→p(fβ) ≡ c

if and only if the polynomial Tracepn→p(fβ) mod xpn− x equals c, and that this happens if and

only if the coefficient of the monomial 1 in Tracepn→p(fβ) mod xpn− x equals c while all other

coefficients equal 0.

We are now ready for the proof of Lemma 5.1.

19

Page 21: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Proof of Lemma 5.1. Let S be a set of (p, n)-shift representative set of D, |S| = t. Lemma 3.4implies that the constraint C accepts D if and only if it accepts S, and thus it suffices to prove thelemma for the set S. From Lemma 5.4 we have that

Prλ∈(F∗

p)k , α∈(Fpn )k

[C = (α, λ) accepts S] = Eβ∈(Fpn )|S| [Biasp(Tracepn→p(fβ))]k.

Suppose first that 0 /∈ D. Note that fβ is a univariate polynomial over Fpn which is the sumof at most t monomials, each of degree of p-weight at most w. Thus from Theorem 5.5 we havethat the function Tracepn→p(fβ) is either the zero function, in which case its bias equals 1, or it isa non-constant function, in which case it satisfies

|Ex∈Fpn

[

ωTracepn→p(fβ)p

]

| ≤ |Fpn |−1/(2w22wt),

and in particular|Biasp(Tracepn→p(fβ))| ≤ |Fpn |

−1/(2w22wt).

Moreover, from Lemma 5.6 we have that the probability over all β ∈ (Fpn)|S| that Tracepn→p(fβ)

is the zero polynomial is p−|Shiftp,n(S)| = p−|Shiftp,n(D)|. Concluding, we have that

Prλ∈(F∗

p)k, α∈(Fpn )k

[C = (α, λ) accepts D]− p−|Shiftp,n(D)|

=

Eβ∈(Fpn )|S| [Biasp(Tracepn→p(fβ))]k − p−|Shiftp,n(D)|

≤ |Fpn |−k/(2w22wt)

Next suppose that 0 ∈ D. From Theorem 5.5 we have that the function Tracepn→p(fβ) is eitherthe zero function, in which case its bias equals 1, or a constant non-zero function, in which case itsbias equals − 1

p−1 , or it satisfies

|Biasp(Tracepn→p(fβ))| ≤ |Fpn |−1/(2w22wt).

Moreover, from Lemma 5.6 we have that for every c ∈ Fp the probability over all β ∈ (Fpn)|S|

that Tracepn→p(fβ) ≡ c is p−|Shiftp,n(S)| = p−|Shiftp,n(D)|. Concluding, we have that

Prλ∈(F∗

p)k , α∈(Fpn )k

[C = (α, λ) accepts D]− p−|Shiftp,n(D)| − (p − 1)

(

−1

p− 1

)k

p−|Shiftp,n(D)|

=

Eβ∈(Fpn )|S|[Biasp(Tracepn→p(fβ))]k −

(

1 + (−1)k(

1

p− 1

)k−1)

p−|Shiftp,n(D)|

≤ |Fpn |−k/(2w22wt)

6 A calculus for composing pseudo-tests — Proof of Lemma 3.10

Below we introduce two operations on constraints, each operation combines two constraints tocreate a single constraint (of larger arity). We describe the property of these combination operatorsin the language of pseudo-tests. For a pair of vectors γ = (γ1, . . . , γk) and γ′ = (γ′1, . . . , γ

′k) let

γ ◦ γ′ = (γ1, . . . , γk, γ′1, . . . , γ

′k) denote their concatenation. Let 0k denote the all-zeros vector of

length k.

20

Page 22: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Definition 6.1 (Union of constraints). Let C1 =

(

α(1),{

λ(1)i

}r1

i=1

)

be a k1-constraint and let

C2 =

(

α(2),{

λ(2)i

}r2

i=1

)

be a k2-constraint. Their union C = C1 ∪ C2 is the (k1 + k2)-constraint

C =

(

α,{

λ′(1)i

}r1

i=1∪{

λ′(2)i

}r2

i=1

)

defined by

α = α(1) ◦ α(2),

λ′(1)i = λ

(1)i ◦ 0k2 for all 1 ≤ i ≤ r1,

and

λ′(2)i = 0k1 ◦ λ

(2)i for all 1 ≤ i ≤ r2.

Proposition 6.2. Let C1 be a pseudo-test separating D1 from B1 and let C2 be a pseudo-testseparating D2 from B2. Then C1 ∪ C2 is a pseudo-test separating D1 ∩D2 from B1 ∪B2.

Proof. For every degree d,

k1+k2∑

j=1

λ′(1)i,j αd

j =

k1∑

j=1

λ(1)i,j

(

α(1)j

)dfor all 1 ≤ i ≤ r1,

and similarly

k1+k2∑

j=1

λ′(2)i,j αd

j =

k2∑

j=1

λ(2)i,j

(

α(2)j

)dfor all 1 ≤ i ≤ r2.

Thus the constraint C accepts the degree d if and only if both C1 and C2 accept the degree d.Hence C accepts all degrees in D1 ∩D2 and rejects all degrees in B1 ∪B2.

Definition 6.3 (Tensor of constraints). Let C1 =

(

α(1),{

λ(1)i

}r1

i=1

)

be a k1-constraint and let

C2 =

(

α(2),{

λ(2)i

}r2

i=1

)

be a k2-constraint. Their tensor product C = C1 ⊗ C2 is the (k1 · k2)-

constraint C =(

α,{

λ(i1,i2)

}r1,r2

i1=1,i2=1

)

, where α ∈ (Fqn)k1×k2 and λ(i1,i2) ∈ (Fq)

k1×k2 for all 1 ≤ i ≤

r1, 1 ≤ i ≤ r2, and are defined as follows:

α(j1,j2) = α(1)j1

· α(2)j2

,

andλ(i1,i2),(j1,j2) = λ

(1)i1,j1

· λ(2)i2,j2

for all 1 ≤ j1 ≤ k1, 1 ≤ j2 ≤ k2, 1 ≤ i1 ≤ r1, 1 ≤ i2 ≤ r2.

Proposition 6.4. Let C1 be a pseudo-test separating D1 from B1 and let C2 be a pseudo-testseparating D2 from B2. Then C1 ⊗ C2 is a pseudo-test separating D1 ∪D2 from B1 ∩B2 .

21

Page 23: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

Proof. For every degree d, and for every 1 ≤ i1 ≤ r1, 1 ≤ i2 ≤ r2 we have that

k1∑

j1=1

k2∑

j2=1

λ(i1,i2),(j1,j2)(α(j1,j2))d =

k1∑

j1=1

k2∑

j2=1

λ(1)i1,j1

· λ(2)i2,j2

·(

α(1)j1

)d·(

α(2)j2

)d

=

( k1∑

j1=1

λ(1)i1,j1

(

α(1)j1

)d)

·

( k2∑

j2=1

λ(2)i2,j2

(

α(2)j2

)d)

.

Thus the constraint C accepts the degree d if and only if at least one of the constraints C1, C2

accepts d. Hence C accepts all degrees in D1 ∪D2 and rejects all degrees in B1 ∩B2.

The above, simple constructions, result in the Composition Lemma 3.10, which allows to de-compose a testing problem into simpler ones.

Proof of Lemma 3.10. Fix d ∈ D and let S ⊆ [ℓ] be the set {j ∈ [ℓ]|∃b ∈ B s.t. Cj is a pseudo-testseparating {d} from {b}}. Let Cd be the union of all constraints indexed by indices in S. ThenCd is at most a (k′ · ℓ)-constraint and by Proposition 6.2 above Cd is a pseudo-test separating {d}from B.

Now let C be the tensor of all constraints Cd for d ∈ D. The constraint C is of size at most(k′ · ℓ)t and by Proposition 6.4, C is a pseudo-test separating D from B . The lemma thus holdsfor k = (k′ℓ)t.

7 Equivalence of basic and general single-orbit characterizations

Recall that an affine-invariant linear property F is k-single-orbit characterizable if there exists ak-constraint C = (α,

{

λi

}r

i=1) which forms a k-single-orbit characterization of F . We say that F

has a basic k-single-orbit characterization if r = 1.A natural question is whether every affine-invariant linear property which has a single-orbit

characterization with r > 1 and of small locality also has a basic single-orbit characterization ofsmall locality. In this section we answer this question in the affirmative by showing that everyk-single-orbit characterization of an affine-invariant linear property F can be transformed into abasic k′-single-orbit characterization of F , where k′ depends only on k.

Theorem 7.1 (Equivalence of basic and general single-orbit characterizations). For every integerk there exists an integer n0 = n0(k) such that the following holds for all n ≥ n0. If an affine-invariant linear property F ⊆ {Fqn → Fq} has a k-single-orbit characterization then it also has abasic k2-single-orbit characterization.

For the proof of the above theorem we shall use the following theorem from [BS11] (see also[BS10]) which gives a bound on the q-weight of degrees in the degree set of affine-invariant linearproperties which are accepted by a k-constraint.

Theorem 7.2 (Weight-degree of affine-invariant linear properties accepted by a k-constraint,[BS10], Theorem 2.9.). Suppose that F ⊆ {Fqn → Fq} is an affine-invariant linear property, whereq = ps for a prime p. Suppose furthermore that there exists a k-constraint which accepts all func-tions f ∈ F . Then wtq(d) ≤ (k − 1)q/p for every degree d ∈ Deg(F).

22

Page 24: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

We shall also use the following well-known Schwartz-Zippel lemma that bounds the number ofzeros of multivariate polynomials.

Lemma 7.3 (Schwartz-Zippel, [Sch80, Zip79]). Let p ∈ F[x1, . . . , xn] be a polynomial of degree dover a finite field F. Then

Prx1,x2,...,xn

[p(x1, x2, . . . , xn) = 0] ≤ d/|F|

Proof of Theorem 7.1. Since F is k-single-orbit characterizable there exists a k-constraint C =(

α,{

λi

}r

i=1

)

that forms a k-single-orbit characterization of F . Without loss of generality we may

assume that all vectors λ1, λ2, . . . , λr are linearly independent and hence r ≤ k.We will show that for all sufficiently large n there exists a choice of elements γ1, γ2, . . . , γr ∈ Fqn

such that the (k ·r)-basic-constraint C ′ = (α, λ), α ∈ (Fqn)r×k, λ ∈ (Fq)

r×k, defined by αi,j = αj ·γiand λi,j = λi,j for all 1 ≤ i ≤ r, 1 ≤ j ≤ k forms a single-orbit characterization of F . Note thatthe fact that r ≤ k implies that C ′ is indeed a k2-constraint.

Let B′ be a (q, n)-shift representative set for Border(F) which contains the minimal degree fromeach (q, n)-shift in Border(F). From Lemmas 2.7 and 3.4 it suffices to show that C ′ accepts alldegrees in Deg(F) and rejects all degrees in B′.

For every degree d ∈ {0, 1, . . . , qn − 1} let Pd(x1, x2, . . . , xr) be the polynomial in the variablesx1, x2, . . . , xr, defined as follows.

Pd(x1, x2, . . . , xr) =r

i=1

k∑

j=1

λi,j ·(

αj · xi)d

=r

i=1

xdi

( k∑

j=1

λi,jαdj

)

Note that for every choice of elements γ1, γ2, . . . , γr ∈ Fqn , the constraint C ′ accepts the de-gree d if and only if Pd(γ1, γ2, . . . , γr) = 0. Thus we need to show that there exists a choice ofelements γ1, γ2, . . . , γr ∈ Fqn such that Pd(γ1, γ2, . . . , γr) = 0 for every degree d ∈ Deg(F) andPb(γ1, γ2 . . . , γr) 6= 0 for every degree b ∈ B′.

We first observe that Pd(γ1, . . . , γr) = 0 for every degree d ∈ Deg(F) and for every choiceof elements γ1, . . . , γr ∈ Fqn . To see this recall that the constraint C accepts d and therefore∑k

j=1 λi,jαdj = 0 for all 1 ≤ i ≤ r.

It remains to show that there exists a choice of elements γ1, . . . , γr ∈ Fqn such that Pb(γ1, . . . , γr)is non-zero for all b ∈ B′. In order to show this we shall bound the probability that random elementsγ1, . . . , γr ∈ Fqn satisfy Pb(γ1, . . . , γr) = 0 for some b ∈ B′. By union bound,

Prγ1,...,γr∈Fqn

[Pb(γ1, . . . , γr) = 0 for some b ∈ B′] ≤∑

b∈B′

Prγ1,...,γr∈Fqn

[Pb(γ1, . . . γr) = 0]

≤ |B′| ·maxb∈B′

Prγ1,...,γr∈Fqn

[Pb(γ1, . . . γr) = 0](12)

In what follows we show an upper bound on the size of B′ and on the probabilityPrγ1,...,γr∈Fqn

[Pb(γ1, . . . γr) = 0] for b ∈ B′ based on Lemmas 7.2 and 7.3.We start with bounding the probability Prγ1,...,γr∈Fqn

[Pb(γ1, . . . γr) = 0] for b ∈ B′. Since Cis a k-constraint which accepts all degrees in Deg(F), from Theorem 7.2 we have that wtq(d) ≤(k − 1)q/p for every d ∈ Deg(F). From the definition of the border this implies that wtq(b) ≤(k − 1)q/p + 1 ≤ kq/p for all b ∈ Border(F). Since B′ contains the minimal degree from each(q, n)-shift in Border(F), Lemma 4.4 implies that b ≤ q(1−p/(qk))n+1 for every b ∈ B′. Thus we

23

Page 25: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

have that for every b ∈ B′ the degree of the polynomial Pb(x1, . . . , xr) is at most q(1−p/(qk))n+1, andhence the Schwartz-Zippel Lemma (Lemma 7.3) implies that

Prγ1,...,γr∈Fqn

[Pb(γ1, . . . γr) = 0] ≤q(1−p/(qk))n+1

qn. (13)

Next we bound the size of B′. This can be done by noticing that the fact that all degrees inBorder(F) are of q-weight at most kq/p implies that

|B′| ≤ |Border(F)| ≤

kq/p∑

i=0

(

n

i

)

qi ≤kq

pqkq/pnkq/p + 1. (14)

Plugging (13) and (14) into (12) we obtain

Prγ1,...,γr∈Fqn

[Pb(γ1, . . . , γr) = 0 for some b ∈ B′] ≤

(

kq

pqkq/pnkq/p + 1

)

q(1−p/(qk))n+1

qn.

This implies in turn that for sufficiently large n there exists a choice of elements γ1, . . . , γr ∈ Fqn

such that Pb(γ1, . . . , γr) is non-zero for all b ∈ B′ which concludes the proof of the theorem.

References

[AFNS06] Noga Alon, Eldar Fischer, Ilan Newman, and Asaf Shapira. A combinatorial character-ization of the testable graph properties: it’s all about regularity. In Jon M. Kleinberg,editor, STOC, pages 251–260. ACM, 2006.

[BCL+06] Christian Borgs, Jennifer T. Chayes, Laszlo Lovasz, Vera T. Sos, Balazs Szegedy, andKatalin Vesztergombi. Graph limits and parameter testing. In Jon M. Kleinberg,editor, STOC, pages 261–270. ACM, 2006.

[BGK+05] Eli Ben-Sasson, Venkatesan Guruswami, Tali Kaufman, Madhu Sudan, and MichaelViderman. Locally testable codes require redundant testers. SICOMP: SIAM Journalon Computing, 39(7):3230–3247, 2005.

[BGK06] J. Bourgain, A. A. Glibichuk, and S. V. Konyagin. Estimates for the number of sumsand products and for exponential sums in fields of prime order. Journal of the LondonMathematical Society, 73(2):380–398, 2006.

[BGM+11a] Eli Ben-Sasson, Elena Grigorescu, Ghid Maatouk, Amir Shpilka, and Madhu Sudan.On sums of locally testable affine invariant properties. In Approximation, Random-ization and Combinatorial Optimization. Algorithms and Techniques, volume 6845 ofLNCS, pages 400–411, 2011.

[BGM+11b] Eli Ben-Sasson, Elena Grigorescu, Ghid Maatouk, Amir Shpilka, and Madhu Sudan.On sums of locally testable affine invariant properties. Electronic Colloquium on Com-putational Complexity (ECCC), 18:79, 2011.

[BHR05] Eli Ben-Sasson, Prahladh Harsha, and Sofya Raskhodnikova. Some 3CNF propertiesare hard to test. SICOMP: SIAM Journal on Computing, 35, 2005.

24

Page 26: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

[BIW06] Boaz Barak, Russell Impagliazzo, and Avi Wigderson. Extracting randomness usingfew independent sources. SICOMP: SIAM Journal on Computing, 36, 2006.

[BKT04] J. Bourgain, N. Katz, and T. Tao. A sum-product extimate in finite fields, andapplications. GAFA, 14:27–57, 2004.

[BS10] Eli Ben-Sasson and Madhu Sudan. Limits on the rate of locally testable affine-invariantcodes. Electronic Colloquium on Computational Complexity (ECCC), 17:108, 2010.

[BS11] Eli Ben-Sasson and Madhu Sudan. Limits on the rate of locally testable affine-invariantcodes. In Leslie Ann Goldberg, Klaus Jansen, R. Ravi, and Jose D. P. Rolim, editors,APPROX-RANDOM, volume 6845 of Lecture Notes in Computer Science, pages 412–423. Springer, 2011.

[CC11] Todd Cochrane and James Cipra. Sum-product estimates applied to Waring’s problemover finite fields. INTEGERS, 11, 2011.

[Cip10] James Arthur Cipra. WARING’S NUMBER IN FINITE FIELDS. PhD thesis,KANSAS STATE UNIVERSITY, Manhattan, Kansas, USA, 2010.

[GKS08] Elena Grigorescu, Tali Kaufman, and Madhu Sudan. 2-transitivity is insufficient forlocal testability. In IEEE Conference on Computational Complexity, pages 259–267.IEEE Computer Society, 2008.

[GKS09] Elena Grigorescu, Tali Kaufman, and Madhu Sudan. Succint representation of codeswith applications to testing. In Proceedings of RANDOM-APPROX 2009, volume5687 of Lecture Notes in Computer Science, pages 534–547. Springer, 2009.

[KL05] Tali Kaufman and Simon Litsyn. Almost orthogonal linear codes are locally testable.In FOCS, pages 317–326. IEEE Computer Society, 2005.

[KL10] Tali Kaufman and Shachar Lovett. Testing of exponentially large codes, by a newextension to Weil bound for character sums. Electronic Colloquium on ComputationalComplexity (ECCC), 17:65, 2010.

[KL11] Tali Kaufman and Shachar Lovett. New extension of the weil bound for character sumswith applications to coding. In The 52nd Annual IEEE Symposium on Foundationsof Computer Science (FOCS 2011), 2011.

[KS07a] Tali Kaufman and Madhu Sudan. Algebraic property testing: The role of invariance.Electronic Colloquium on Computational Complexity (ECCC), 14(111), 2007.

[KS07b] Tali Kaufman and Madhu Sudan. Sparse random linear codes are locally decodableand testable. In FOCS, pages 590–600. IEEE Computer Society, 2007.

[KS08] Tali Kaufman and Madhu Sudan. Algebraic property testing: the role of invariance.In Cynthia Dwork, editor, STOC, pages 403–412. ACM, 2008.

[KS10] Swastik Kopparty and Shubhangi Saraf. Local list-decoding and testing of randomlinear codes from high error. In ACM, editor, Proceedings of the 2010 ACM Interna-tional Symposium on Theory of Computing: June 5–8, 2010, Cambridge, MA, USA,pages 417–426, pub-ACM:adr, 2010. ACM Press.

25

Page 27: Sparse affine-invariant linear codes are locally testablepeople.csail.mit.edu/madhu/papers/2012/sparse-affine-full.pdf · Sparse affine-invariant linear codes are locally testable

[Sch80] J. T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities.J. ACM, 27(4):701–717, 1980.

[Zip79] R. Zippel. Probabilistic algorithms for sparse polynomials. In ISSAC ’79: Proc.Int’l. Symp. on Symbolic and Algebraic Computation, Lecture Notes in ComputerScience, Vol. 72. Springer-Verlag, 1979. Zippel discusses probabilistic methods fortesting polynomial identities and properties of systems of polynomials.

26