Caps and progression-free sets in $\mathbb{Z}_m^n$

We study progression-free sets in the abelian groups $G=(\mathbb{Z}_m^n,+)$. Let $r_k(\mathbb{Z}_m^n)$ denote the maximal size of a set $S \subset \mathbb{Z}_m^n$ that does not contain a proper arithmetic progression of length $k$. We give lower bound constructions, which e.g. include that $r_3(\mathbb{Z}_m^n) \geq C_m \frac{((m+2)/2)^n}{\sqrt{n}}$, when $m$ is even. When $m=4$ this is of order at least $3^n/\sqrt{n}\gg \vert G \vert^{0.7924}$. Moreover, if the progression-free set $S\subset \mathbb{Z}_4^n$ satisfies a technical condition, which dominates the problem at least in low dimension, then $|S|\leq 3^n$ holds. We present a number of new methods which cover lower bounds for several infinite families of parameters $m,k,n$, which includes for example: $r_6(\mathbb{Z}_{125}^n) \geq (85-o(1))^n$. For $r_3(\mathbb{Z}_4^n)$ we determine the exact values, when $n \leq 5$, e.g. $r_3(\mathbb{Z}_4^5)=124$, and for $r_4(\mathbb{Z}_4^n)$ we determine the exact values, when $n \leq 4$, e.g. $r_4(\mathbb{Z}_4^4)=128$.


Introduction
There has been great interest in finding progression-free sets in Z n m := (Z/(mZ)) n , especially when m = 3 or 4. When m = 3, 4, 5 the properties "no arithmetic progression of length 3 modulo m" and "no 3 points on any line" are equivalent. The last property is also well known under the name cap-sets. In spite of this great interest in progression-free sets and caps there is not much literature on progression-free sets in Z n m , in the case of general m > 3, and of general progressions of length k, and hardly any explicit values of the maximal size of such sets is known. 1 This paper intends to fill this gap and provides several new techniques to find lower bounds, and even to find exact values in the case m = 4, which are comparable to the known values for m = 3.
However, before we come to this, we briefly summarize a number of related questions. The problem of finding sets S ⊂ Z n m with, or without, a given property has been investigated frequently. Often one is actually interested in the maximal size of |S|. Also, often even the one-dimensional case has been of fundamental interest. Let us recall some of the properties that have been investigated. [28] raised the problem of studying the maximal size r k (N ) of sets in {1, . . . , N } without an arithmetic progression of length k. There are important contributions by Behrend, Bloom and Sisask, Bourgain, Gowers, Green, Roth, Salem and Spencer, Sanders, Szemerédi, Tao [6,7,30,32,49,50,52,54]. In particular, the proof of r k (N ) = o(N ), as N tends to infinity, and quantitative versions thereof, proved to be very influential in this area. It is interesting to note that the size of progression-free sets even enters the complexity of matrix multiplication, see [13,57].

1) Erdős and Turán
The question of arithmetic progressions has also been studied modulo m, see e.g. Croot [14]. In this setting "modulo m" one has to clarify if elements of the progression can occur more than once. For example (1,3,1,3) can possibly be considered as a progression of length 4 modulo m = 4. In this paper, however, we study "proper arithmetic progressions" meaning that all elements in the progression are distinct, unless otherwise stated.
2) Assume that S does not have k elements x 1 , . . . , x k ∈ Z n m that satisfy (for fixed constants a 1 , . . . , a k ∈ Z) a linear equation (a) The case n = 1, k = m, a 1 = a 2 = · · · = a k = 1 was first investigated by Erdős, Ginzburg and Ziv [26], who proved that for any 2m − 1 elements in Z m , where in this problem repetition is allowed, there exists a subset of m elements with sum 0 ∈ Z m . (There are hundreds of papers on generalizations and variants, the general topic is called "zero sums in finite abelian groups").
(b) The case x 1 + x 2 − x 3 = 0, x i ∈ S corresponds to sum-free sets. In the one-dimensional case S ⊂ {1, . . . , m} it is known that the maximal size is |S| ≤ ⌊ m 2 ⌋ + 1, if all x i are distinct, or |S| ≤ ⌊ m+1 2 ⌋ if x 1 = x 2 is allowed. In the case modulo a prime m it follows from the Cauchy-Davenport theorem that the maximal size satisfies |S| ≤ m+1 3 (x i all distinct). In the multidimensional case of an integer grid there are results by Cameron [9], Elsholtz and Rackham [25].
3) The case of no geometric line (of m points) in the integer grid {1, . . . , m} n is known as Moser's cube problem, see [40,44]. Closely related is the question of finding the maximal number of lattice points in the same cube {1, . . . , m} n , but without any combinatorial line. The famous theorem of Hales-Jewett [33] of o(m n ) points, when m is fixed and n tends to infinity, became very influential.
In this paper we concentrate on sets S ⊂ Z n m of maximal size |S| = r k (Z n m ) with no k ≤ m elements in arithmetic progression. Observe that an arithmetic progression of length k can be expressed by means of k−2 linked linear conditions x i −2x i+1 +x i+2 = 0, i = 1, . . . , k − 2.
Meshulam's [39] long-standing bound r 3 (Z n m ) = O( m n n ) for odd values of m ≥ 3 was extended by Lev [37] to even values m ≥ 4. Improving this, Sanders [51] proved the following result: for some positive c. Green and Tao [32] write that c = 2 −22 is admissible. Introducing an entirely new approach, based on the polynomial method rather than Fourier techniques, Croot, Lev and Pach [15] proved that r 3 (Z n 4 ) ≤ 4 γn = 3.61 . . . n , where γ ≈ 0.926. The new methods introduced in [15] also led to the result in the case r 3 (Z n 3 ) ≤ 2.756 n by Ellenberg and Gijswijt [23]. Again, the case of cap sets has applications to the complexity of matrix multiplication, see [3,5].
The corresponding problem on lower bounds of progression-free sets in G = (Z n 3 , +) has also been studied in detail. It is known (see [18] for the history and current record) that there is a set S with |S| > 2.217389 n = |G| β with β = log 2.217389 log 3 ≈ 0.724851). The currently strongest lower bound example comes from a product construction, based on an example in dimension 480.
For a lower bound when m = 4 Sanders [51] proved: there exists S ⊂ G = (Z n 4 , +) which does not contain a proper three term arithmetic progression with |S| ≫ |G| 2/3 ≈ 2.519 n . This result follows from finding an example in Z 3 4 with 16 elements and using a product construction. ( [51,15], and for primes p ≥ 3 and some positive constant δ p r 3 (Z n p ) ≤ (p − δ p ) n , [23].
Remark 1.1. From this one can conclude that for every m ≥ 3 there exists a positive δ m such that For powers of 2 this follows from [15], all other values have an odd prime factor such that it follows from [23].
There are only very few explicit values known. In the case of cap sets modulo m = 3 the following is known: The author of the 6-dimensional result (Potechin [45]), and the authors of the classification of the unique 5-dimensional maximum cap [21], (required for the 6-dimensional case by Potechin) mentioned they used computer calculations. We would like to thank Y. Edel for informing us that for the paper [21] the computation time was a few weeks. The remaining part of the paper is organized as follows: After some necessary notation and describing the results we first prove the asymptotic lower bounds in Section 4, as these proofs are shorter. In Section 5 we give a reformulation for the problem of finding r 3 (Z n 4 ) and r 4 (Z n 4 ). In Section 6 we give a lower bound for r 3 (Z n 4 ), we then prove that this construction gives the exact values up to dimension 5 (Sections 7 and 8), which require some detailed case studies. Finally, in Section 9 we prove the exact values for r 4 (Z n 4 ) up to dimension 4.

Notation
We use the Landau O and o-notation such as f (n) = O t (g(n)), where the O-constant depends at most on a parameter t. We also use the Vinogradov notation, where f (n) ≪ t g(n) or g(n) ≫ t f (n) has the same meaning as the O-expression above. In Sections 7, 8, 9 we will work with linear and affine subspaces of F n 2 . If L is a linear subspace of dimension d, for brevity we will say that L is a d-subspace. The smallest linear subspace containing the vectors v 1 , . . . , v k will be denoted by v 1 , . . . , v k .
Similarly, if L is an affine subspace of dimension d, we will say that L is an affine d-subspace and the smallest affine subspace containing v 1 , . . . , v k will be denoted by v 1 , . . . , v k af f . Throughout the paper for a subset A ⊆ F n 2 we use the notation A + A = {a + a ′ : a, a ′ ∈ A} for the sumset and A+A = {a + a ′ : a, a ′ ∈ A, a = a ′ } for the restricted sumset. We give quite uniform proofs for all these dimensions. The value r 3 (Z 3 4 ) = 16 was stated before by Sanders [51] (and was indeed a computer calculation by O. Sisask), and the value r 3 (Z 4 4 ) = 42 was determined in a Masters' Thesis by Lawrence Newcombe [42] (a student of the first author). From that proof it was already apparent that r 3 (Z n 4 ) could be much smaller than 4 n , due to a Z n 2 -substructure of Z n 4 , but proceeding to higher dimension might have been very tedious.

Results and methods
Next we give a lower bound on r 3 (Z n 4 ). In the construction we use binary codes with certain minimum distances. Let C(m, d) denote the largest possible size of a (possibly non-linear) code in F m 2 with minimum distance at least d. (In the literature, this is often denoted with A(m, d).) Note that C(m, 1) = 2 m (all vectors can be taken) and C(m, 2) = 2 m−1 (all codewords can be taken with even Hammingweight). Here are links to tables of exact values of maximal codes or bounds: https://www.win.tue.nl/~aeb/codes/binary-1.html and http://www.codetables.de/ As a consequence of this result one can prove a quite good lower bound.
which implies that there exists a progression-free set S ⊂ Z n 4 with |S| ≫ 4 0.7924n .
As this Corollary is the first nontrivial case of the lower bound constructions and is suitable for discussing various methods we give two proofs of it. The first one is a direct application of Theorem 3.2.
Proof of Corollary (Proof 1). Calculations show that the optimal choice for t in Theorem 3.2 satisfies t ∼ 2n/3. In particular, for 2 ≤ n ≤ 10 the optimal choice is t = ⌈(2n − 5)/3⌉. Note that the sum of only the first two terms in the lower bound n i=t+1 n i C(i, i − t), with an optimal value of t, is The total sum is not much larger as it is bounded above by 3 √ π · 3 n √ n (see also [11]).
Here we give a brief sketch of the second proof, full details and more motivation is in section 4. We consider all elements in Z n 4 with exactly ⌊n/3⌋ entries being 1, and the remaining entries being 0 or 2. This gives n ⌊n/3⌋ 2 n−⌊n/3⌋ ≫ 3 n √ n elements. The reason why this set is progression-free is that there is a unique middle-point of a putative progression and that the boundary points cannot use their 1-entries in a nontrivial way, such that a progression pattern 012 cannot occur. But then there cannot be progressions of three distinct points, a contradiction.
Finally, we found a third proof, based on weighted Sperner capacity of the 2vertex graph with one directed edge, and vertex weights 1 and 2, but decided not to include it.
Theorem 3.5. For sets without arithmetic progression of length 4 we have the following results: It is well known that results of this type can be lifted to higher dimensions and yield asymptotic results by a simple product construction, compare also Proposition 3.5 [20] in the similar setting of zero-sum free sets. Lemma 3.6. a) Let S 1 ⊂ Z n 1 m and S 2 ⊂ Z n 2 m be k-progression-free sets, then S 1 × S 2 ⊂ Z n 1 +n 2 m is also k-progression-free.
b) A repeated application of part a) gives: Lifting the largest known exact values r 3 (Z 5 4 ) = 124 and r 4 (Z n 4 ) gives: The first result is considerably weaker than Corollary 3.3, while the second one is the strongest that is currently known. The product construction only makes use of "local" information from small dimensions. The "relative density" for the high dimensional problem is the same as for the low dimensional base-example that was lifted. Lifting for example the bound r 3 (Z 10 4 ) ≥ 22232 gives a better estimate r 3 (Z n 4 ) ≫ 2.720 . . . n . For k = 3 it is better to use the "global" information from the digits giving the lower bound 3 n √ n . But for k = 4 we do not know how to replace the product construction by a better strategy.
In many cases we present constructions much better than the product construction. These make use of "global" properties i.e. making full use of the actual dimension n. With our current understanding this only works when k < m. For k = m the product construction appears to be the strongest available method, see also Edel [18].
These proofs describe a set explicitly in terms of its coordinate entries, similar to the constructions by Salem and Spencer [50], and Behrend [6]. Salem and Spencer constructed progression-free sets in the integers by representing integers in an m-ary digit system, m odd, and using the digits 0 ≤ a i ≤ (m−1)/2 a fixed number of times, namely with frequency n/d for integers of length n. Restricting the digits avoids wrapping over modulo m. Behrend constructed large progression-free sets in the integers by mapping a high-dimensional sphere, which by convexity is progressionfree, to the integers. He also represented integers in an m-ary system with digits 0 ≤ a i ≤ (m − 1)/2, where m is odd, and fixed value n i=1 a 2 i . In the integer case the optimization of the values of m and n shows that Behrend's construction is greatly superior. In our setting we make use of both ideas, and observe that m, n are fixed by the problem, and the method of Behrend, when applicable, is only slightly stronger, but a bit more complicated. It follows from Theorems 3.10, 3.11 that ⌈ m+1 2 ⌉ ≤ α k,m ≤ m, and also α k,m < m, when k = 3.
In view of the above results, and also in view of an upper bound in a relevant case, see Theorem 3.17, we state the following conjecture:  [38] proved the following: If m is a prime and k ≤ m Their proof makes use of a product construction, as explained in Lemma 3.6. They also have some results, when m is a pure prime power, but this refers to finite fields F m , which are different from Z m . In particular, when m is prime and m k−1 is large, and n increases, the exponential growth of the lower bound is based on the constant m k−1 k , compared to ⌊ m+2 2 ⌋ here. We now give our general theorems, which improve the above lower bound and remove the prime condition on m: Theorem 3.10. Let m ≥ 5 be odd. There exists some C m > 0 such that In the case m = 3 this would give a lower bound of ≫ 2 n √ n only which is smaller than the trivial lower bound by taking all 2 n elements with coordinate entries 0 or 1. Also note that in view of r k (Z n m ) ≥ r 3 (Z n m ) the Theorem trivially induces lower bounds for any k ≥ 3 (also in the theorem below).
A crucial idea again is to avoid any product construction and to use one more digit than Tao and Vu [56, exercise 10.1.3] used, with some extra constraints, which are less costly (if m is constant and n increases). Their lower bound m n 2 n · 1 m 2 n 2 in case m = 4 would also be weaker than the trivial progression-free set {0, 1} n with 2 n elements.
Theorem 3.11. Let m ≥ 4 be even. There exists some C m > 0 such that (A version of this result, in the special case m = 8 has also been observed in [43], having seen a precursor of this manuscript. Their main concern is an improvement of the upper bound.) As is well known from Behrend's construction there are good reasons to restrict to half of the available digits. In the above cases we go up to one element more than half of the digits. In the cases of even m one additionally has to study progressions of type 0 m 2 0 carefully. In the examples below we go even further, and note that those progressions which actually use the reduction modulo m cause quite a bit of extra work. (For example, in the case r 4 (Z n 11 ) we have to care about progressions of type 1, 6, 0, 5 modulo 11.) Theorem 3.12. The following holds r 4 (Z n 11 ) ≫ 7 n n 3 .
(No attempt was made to reduce the exponent 3.) For comparison Lin and Wolf [38] have a lower bound of about about 6.04 n . (For fixed k the improvement increases, as m increases.) It is clear that on a case by case study one can prove related results for several individual values of m and k. Here we present two further cases where these ideas are generalized to infinite families m = p s , k = p s−1 +1 (or k = p s−2 +1 respectively), where p is prime. It should be noted that in this case the set of digits used is not consecutive, but makes use of the structure of orbits of length p, and hence the algebraic structure. As can be seen, several good properties are preserved: many progression types can be excluded by the Salem-Spencer "same-frequency property", and the "all-elements-distinct" property, (i.e. proper progressions).
Theorem 3.13. Let m = p s be a pure prime power, s ≥ 2. Let k = p s−1 + 1. Then there exist constants C m > 0 and 0 < c m ≤ m/2 such that the following holds: Corollary 3.14. There exist positive constants C m and c m ≤ m/2 such that the following holds: Theorem 3.15. Let m = p s be a pure prime power, s ≥ 3. Let k = p s−2 + 1. Then there exist constants C m > 0 and 0 < c m ≤ m/2 such that the following holds: For p = 2, this is certainly not best possible. By Theorem 3.11 for m = 8, k = 3 one can use 5 digits, rather than 4.  We are not aware of any earlier results of this type.
We now briefly discuss some aspects of the proofs of the exact values, and of a conditional upper bound. For the estimations of r 3 (Z n 4 ) we shall need a reformulation of the problem which is presented in Section 5. Let us say that a system of subsets A(x) ⊆ F n 2 (x ∈ F n 2 ) satisfies property ( * ), if the following implication holds: In Lemma 5.1 we will show that the answer to this question is exactly r 3 (Z n 4 ), that is, estimating the maximal total size of a system of subsets {A(x) : x ∈ F n 2 } satisfying ( * ) is equivalent with our original question.
As it turns out it is very useful that we can reduce the case of arbitrary subsets to the case of subspaces. We do not know, if this can be done for higher dimension, but for the low dimensions studied here explicitly this is a quite powerful method. In this case, the upper bound O(3 n ) is quite close to the general lower bound in the unrestricted case, namely r 3 (Z n 4 ) ≫ 3 n / √ n. This is the heuristic reason why we state conjecture 3.9. Note that for n = 1 any 2-element subset forms a progression-free subset in Z n 4 . If n ∈ {2, 3, 4}, then the extremal construction is also unique in the following sense: x ∈ F n 2 } both have total size r 3 (Z n 4 ) and they satisfy ( * ), then there is an invertible affine linear transformation ϕ : Z n 2 → Z n 2 and vectors c(x) ∈ Z n 2 (x ∈ Z n 2 ) such that A ′ (x) = A(ϕ(x)) + c(x) for every x ∈ Z n 2 .

Proofs of the asymptotic lower bounds
We will use several times that the central multinomial coefficients can be approximated by Stirling's formula: Here we give a geometrically inspired proof of Corollary 3.3, which is independent of Theorem 3.2.

Proof of Corollary 3.3 (Proof 2):
The crucial idea is that an arithmetic progression of length 3 (with 3 distinct points) in Z n 4 has a uniquely defined middle point. For comparison, this is not the case in Z n 3 . We relate the problem to a problem posed by Leo Moser [40]. Find in H = {0, 1, 2} n the maximal set of elements without "three on a line". (which is also known as Moser's cube problem). Observe that in this case there is no reduction modulo 3. Let f (n) denote the largest such number in H = {0, 1, 2} n . It is known that f (1) = 2, f (2) = 6, f (3) = 16, (see Chvátal [12]), f (4) = 43 (see Chandra [10]), f (5) = 124, f (6) = 353 [44]. In dimensions 1, 2, 3 and 5 these values are the same as r 3 (Z n 4 ), but in dimension 4 one has that r 3 (Z 4 4 ) = 42 < f (4) = 43. A simple observation by Komlós [36] shows that f (n) ≫ 3 n √ n , and the implicit constant was refined again by Chvátal [11]. The construction by Chvátal relates the problem to coding theory and gives f (5) ≥ 124, for example.
Let us adapt Komlós' [36]  elements. When n ≡ 1, 2 mod 3 we have the same order of magnitude, up to a constant factor, for example, by filling the extra 1 or 2 coordinates with entries from {0, 1}. Further observe that for three points P 1 , P 2 , P 3 to be on a line (in this order), one would need, in each coordinate, that i) all entries are the same, or ii) the entries are 0, 1, 2 or 2, 1, 0 (in this order). Since the number of "middle entries 1" is constant for all points, there cannot be an arithmetic progression of three distinct digits. Let us embed the set S from {0, 1, 2} n canonically into G = (Z n 4 , +). Think of G as the lattice points {0, 1, 2, 3} n but now with reduction modulo 4 in each coordinate. Observe that the set S does not have a single "3"-entry. An arithmetic progression of length 3 modulo 4 that does not make use of x i = 3 in any coordinate must be of one of the types below, in a given coordinate. The digits are: i) the same, ii) or are 0, 1, 2 or 2, 1, 0 in this order, iii) or 0, 2, 0, or 2, 0, 2.
We will show that the set S ⊂ Z n 4 does not contain a proper 3-progression. Suppose S does contain three distinct points P 1 , P 2 , P 3 in arithmetic progression. The case i) where all entries are the same does not play any role. Let us look at those coordinates where the entries differ. Since all points have the same number of 1 entries, let us study, where one of the three elements uses a "1", but another point does not: For this, the only possibilities are 0, 1, 2 and 2, 1, 0. But here only the middle point P 2 can make use of a 1. So, the two points P 1 and P 3 cannot make use of their ones, unless all three entries are identically 1. This means that all three points have their ones in exactly the same position, and that there is no coordinate with a progression 012 or 210. So, let us look at the other coordinates. The only possibilities left are 020 or 202. But then P 1 and P 3 would be the very same point, a contradiction to the definition of a proper progression.
Proof of Proposition 3.8. The idea of this proof might go back to Shannon [53], see also Davis and Maclagan [16]. Let α k,m (n) = (r k (Z n m )) 1/n , so that we have the following properties: By the product construction (Lemma 3.6) we have i.e. α k,m (n 1 ) n 1 α k,m (n 2 ) n 2 ≤ α k,m (n 1 + n 2 ) n 1 +n 2 and therefore Therefore, the sequence {n log α k,m (n)} ∞ n=1 is superadditive. By Fekete's Lemma on superadditive sequences the limit lim n→∞ log α k,m (n) exists and equals sup n log α k,m (n).
By Theorems 3.10 and 3.11 (proofs below) we know that it follows for all m ≥ 3 that α 3 < m, for example by applying Ellenberg and Gijswijt [23] to any odd prime divisor of m, and Croot, Lev and Pach [15] otherwise.
Proof of Theorem 3.10: We first prove a slightly weaker result based on the Salem-Spencer construction [50] for sets of integers without arithmetic 3-progression. Recall that m is odd and that we only need to study k = 3. Assume first that n is a multiple of (m + 1)/2. Choose vectors with digits The number of such vectors is maximized when n i = n m+1 2 for every i. This gives at least C m ( m+1 2 ) n 1 n cm points, for positive constants C m , c m . If n is not a multiple of (m + 1)/2 one can fill the remaining coordinates with entries 0 ≤ a i < k, which slightly weakens the constant C m . We show that there is no arithmetic 3-progression: by the choice of the allowed digits, if the digit a > 0 occurs, then the digit m − a ≡ −a mod m is forbidden, so 0 is never in the centre of a proper 3-progression. As all vectors have the same number of 0-entries, all of these digits 0 must occur in the same coordinate position, giving a trivial 000-progression. One then continues: All nontrivial 3-progressions, without the digit 0 do not have a digit 1 in the centre, and hence the digit 1 can only come from a 111-progression.
As there are three distinct points, there must be a proper 3-progression of 3 distinct digits abc. As the digit 0 is never in the centre of any of these nontrivial 3-progressions, and as all vectors have the same number of 0-entries, the digit can only occur in the trivial way: 000. This leaves the following shorter list of nontrivial 3-progressions: 123, 135, 234, 321, 345, 432, 531, 543.
Now the digit 1 is never in the centre, and 1 can only occur in the trivial 111 progression. leaving the list 234, 345, 432, 543. Now, the digit 2 is never in the centre, so 2 can only occur as 222, leaving 345, 543. Now 3 is never in the centre, which gives the final contradiction.
Note that initially we have restricted the frequency of all digits 0, 1, 2, 3, 4, 5, but we can now observe that restricting the frequency of the digits 0, 1, 2, 3 is enough.
We now prove the theorem in its full strength, based on Behrend's construction. The number of elements used is larger by a factor n c only.
Let m be odd, and n be a multiple of (m + 1)/2. Let Here S R can be thought of as a sphere about centre ((m − 1)/4, . . . , (m − 1)/4)) with R as squared radius. We prove that all S R are progression-free and there exists an Suppose there are three distinct points P 1 , P 2 , P 3 in arithmetic progression. None of the progressions in a fixed coordinate makes use of the reduction modulo m, so that convexity of the geometric sphere gives a contradiction. But let us look at this arithmetically: Let the progression in the i-th coordinate be In other words, the three points are identical, which is a contradiction. The size of large sets S R follows from the observation that most elements in (a 1 , . . . , a n ) in an interval of size the standard deviation around the mean value. To make this more precise, we follow Elkin [22] and consider a i − m−1 4 as independent where σ m depends only on m. By Chebychev's inequality As the proof only makes use of effective bounds, the result is valid for all odd m ≥ 5 and all n. If the odd value m tends to infinity, then, asymptotically σ m ∼ m 2 24 √ 5 holds, giving the claimed value of C m .
Remark. While the Salem-Spencer type construction with all frequencies of the digits being constant is completely explicit, the above Behrend-type proof uses the pigeonhole principle, which is not explicit, and in algorithmic terms slowly, as one would need to search for a good value R. However, a result of Rankin [46] gives entirely explicit bounds on the number of representations of numbers as a sum of n squares of bounded size. In particular this shows that not only there are good values R but that all values R in the interval are good, when weakening the constant C m by a small factor only. In particular, one can choose R = ⌊µn⌋. In another direction, as the above argument does not make use of reduction modulo m, it seems possible to implement the improvement by Elkin [22], which might gain extra factor, maybe of size n c . Elkin observed that 3-progressions in a suitable union of spheres (annulus) are geometrically quite restricted. One can then prove that there is a large subset of this union which is progression-free.
Proof of Theorem 3.11: Again, we first prove a sightly weaker version based on the Salem-Spencer construction. This proof is similar to the previous case, but as m is even there is one extra complication to care for. Assume first that n is a multiple of (m + 2)/2, and that there is an arithmetic progression of three distinct points. Choose vectors with exactly n i entries of digit i, where i ∈ {0, 1, 2, . . . , m 2 }. The number of such vectors is maximized when n i = n m+2 2 for every i. This gives at least ( m+2 2 ) n C ′ m n cm points. If n is not a multiple of (m + 2)/2 one can fill the remaining coordinates with 0-entries, which will slightly weaken the constant C By definition of a 3-progression we search for three distinct points, this means there must be somewhere another nontrivial progression abc with three distinct digits in {1, 2, . . . , m 2 − 1}. One can then continue iteratively as before, and concludes there is no nontrivial 3-progression of 3 distinct points. Let us define the Behrend-sphere: We prove that S R is 3-progression-free in Z n m . The estimate on the number of points is as in the case of odd m above.
Suppose there are three distinct points P 1 , P 2 , P 3 in arithmetic progression. The non-constant progressions in a fixed coordinate do not make use of the reduction modulo m, with the two exceptions of 0 m 2 0 and m 2 0 m 2 . Let n 1 , n 2 , . . . , n s denote the number of coordinates with a fixed progression-pattern such as 000, 012, 024 etc. Of these, let n 1 count the pattern 0 m 2 0 and and let n 2 count the pattern m 2 0 m 2 . As all other patterns do not wrap over modulo m let n i count the pattern Hence s i=1 n i = n. The points (a 1 , . . . , a n ) in S R lie on a sphere with centre (m/4, . . . , m/4). Let the progression pattern of the j-th coordinates be p j −d j , p j , p j + d j . Then for the three points P 1 , P 2 , P 3 one has that n 1 This gives i n i 2d 2 i = 0. Hence for all patterns with d i = 0 one has that n i = 0. The three points only consist of patterns aaa, 0 m 2 0 or m 2 0 m 2 . Therefore the first and the third point are exactly the same point, in contradiction to the assumption.
We estimate C m as above: and V ar(Z) = nV ar(Z i ). The standard deviation is σ m = V ar(Z i ) and σ Z = V ar(Z) = σ m √ n, where σ m depends only on m. By Chebychev's inequality which implies: As 1234 is the only nontrivial progression with digit 4 in the last position, all 4's must occur in form of a trivial progression, 4444. Therefore This leaves only the following nontrivial progressions.

0123, 1605, 3210, 5061
Here we observe that there are no digits 2 or 6 at the boundary, and also no digits 3 or 5 in the positions 2 and 3. So, in each coordinate there can only be a constant progression, which contradicts that we have a proper progression of distinct points in S. The number of elements in S is the multinomial coefficient n n/7,n/7,n/7,n/7,n/7,n/7,n/7 = n! ((n/7)!) 7 ∼ C 7 n n 3 for some constant C > 0, by Stirling's formula. If n is not a multiple of 7, say n = 7r + i, one adds i ≤ 6 further coordinates with constant digits, which weakens the overall lower bound by a small factor.
Proof of Theorem 3.13. In this situation we do not take the digits consecutively, but make use of the algebraic structure of (Z m , +). In particular p s−1 generates a subgroup of order p, and k-progressions in Z m with gap size divisible by p have the property that the first element is the same as the last element. We choose the digits as follows: Observe that D contains p s−1 − 1 complete cycles of length p, and one extra element, and so |D| = (p s−1 − 1)p + 1 = p s − p + 1. There are three types of progressions of length k = p s−1 + 1 in D: 1. Type I progressions have a non-zero gap size divisible by p. In this case the first element and the last element of the progression are the same.
2. For Type II progressions the gap size is not divisible by p. In this case all residue classes modulo p s−1 occur, and the first and last element are the same modulo p s−1 , but cannot be the same modulo m = p s . The residue class p s−1 − 1 mod m must occur, as D contains only one element −1 mod p s−1 . We observe that no such k-progression can start with p s−1 − 1, as it would have to end at another element −1 mod p s−1 , which is impossible.
3. Type III progressions are constant.
So far this was the part which generalized the algebraic situation from m = 4 to prime powers. The last part is the set-theoretic trick inspired by Salem and Spencer. Let |D| | n and let S = (a 1 , . . . , a n ) : a i ∈ D, ∀d ∈ D : |{j ∈ [1, n] : a j = d}| = n |D| .
The number |S| of elements is the multinomial coefficient n n/|D|,...,n/|D| ∼ C m |D| n n (|D|−1)/2 according to Lemma 4.1. Suppose that S contains a proper arithmetic progression of length k = p s−1 + 1.
Let us study the occurrence of the digit p s−1 − 1 in the first vector. It cannot be part of a type I or type II progression, and hence must be a constant type III progression. Therefore all coordinate entries p s−1 − 1 in all vectors occur in the same positions. In all other coordinates we only have type I and type III progressions. For these the first and the last elements are the same, modulo m. Hence there cannot be a proper arithmetic progression of length k, which by definition consists of k distinct elements.
and D 3 = {0, 1, 2, , . . . , p − 1}. Choose the digits: 1, 2, 4, 5, 7, 8, 13, 14, 16, 17, 22, 23, 25, 26}. There are four types of progressions of length k = p s−2 + 1 in D: Type I progressions with gap size p t , 2 ≤ t < s, which therefore contain a cycle of length p s−t . Here the first element and the last element is the same. Note that the class 0 cannot be part of such a progression, as the element Type II: progressions of gap size p. They must use exactly one of the digits in D 3 \ {0}, but cannot use it in the first or last position: starting with d ∈ D 3 \ {0} and gap size p the longest progression size is k − 1, as otherwise a digit in D 2 would be needed, which is impossible. Also the progression cannot contain 0, as it would then also contain p · p s−2 , which is impossible. (Example, m = 27: the longest progression with gap size 3 is: 22, 25, 1, 4, 7.) Type III progressions have a gap size coprime to p, and do not contain any cycle. They consist of k = p s−2 + 1 distinct digits, and in particular go through all residue classes modulo p s−2 , and therefore contain the special element 0. But note that no such progression can start with 0, as it would also have to end at another element 0 mod p s−2 , which is impossible. Type IV progressions are constant.
The number |S| of elements is the multinomial coefficient n n/|D|,...,n/|D| ∼ C m |D| n n (|D|−1)/2 . As all elements contain the same number of 0-entries, the constant progressions (type IV) are the only ones that contain any 0-entry. Now suppose that S has a proper progression of length k = p s−2 + 1. All k elements contain in n |D| positions an entry d ∈ D 3 . Looking at the first element of the progression we see that these progressions starting with d ∈ D 3 can only be of type IV, i.e. constant. Hence all digits D 3 cannot take part in any nontrivial progression. With all other digits in Z m \ (D 1 ∪ D 2 ) and with all progression types we observe that the first and the last elements are the same. Altogether, the set S of vectors does not have a proper arithmetic progression of length k, which by definition consists of k distinct elements.

Subset reformulation
In this section we give a "subset formulation" for the question of determining r 3 (Z n 4 ) and r 4 (Z n 4 ). As an application of the former one, we give another proof for Theorem 3.3, then we prove Theorem 3.17.

Reformulation for 3AP-free-ness
Let us say that a system of subsets A(x) ⊆ F n 2 (x ∈ F n 2 ) satisfies property ( * ), if the following implication holds: The proof of Lemma 5.1 (below) shows that property ( * ) nicely captures the condition that the "corresponding" A ⊆ Z n 4 is 3AP-free.
Every element a ∈ Z n 4 can be written as a = f + r (f ∈ F, r ∈ R) in a unique way. Let A ⊆ Z n 4 . Let us assign to every x = 2r ∈ F (where r ∈ R) a subset A(x) ⊆ F in the following way: form an arithmetic progression (in this order) if and only if a 1 + a 3 = 2a 2 , that is, if f 1 + f 3 + r 1 + r 3 = 2r 2 . As f 1 , f 3 , 2r 2 ∈ F , this implies r 1 = r 3 , so the condition gives 2r 2 = 2r 1 + f 1 + f 3 . Such elements exist if and only if for distinct x = 2r 1 , y = 2r 2 ∈ F we have y ∈ x + A(x)+A(x) and A(y) = ∅. Note that F ∼ = F n 2 , and this is equivalent with the condition that the system of subsets satisfies property ( * ). Furthermore, |A| = |A(x)|, so the maximal possible size of a 3AP-free subset of Z n 4 is equal to the maximal possible total size of a system of subsets A(x) satisfying property ( * ).

3AP-free sets: lower bound and subspace version
In this subsection, first, as an illustration, we give an alternative -different from the proof presented in Section 4 -proof (using the subset reformulation) for Theorem 3.3, then we prove Theorem 3.17.
The total size of the subsets A(x) is n r 2 r . The optimal choice is r = ⌈2n/3⌉ yielding r 3 (Z n 4 ) ≥ n r 2 r ≫ 3 n / √ n.
Proof of Theorem 3.17. For 0 ≤ k ≤ n let X k contain those x for which A(x) is a subspace of codimension k. If there is an A(x) of codimension 0, that is, A(x) = F n 2 , then all the other A(y) sets are empty, thus the total size of the subsets is only 2 n . From now on, we assume that each nonempty subset is a subspace of positive codimension.
Let us fix k. For x ∈ X k let x (1) , . . . , x (k) be a basis for the orthogonal complement of A(x), that is, . Now, for every x ∈ X k we havexx (i) = 1. If x = y ∈ X k , then y / ∈ x + A(x)+A(x), thus for some 1 ≤ i ≤ k we have (x + y)x (i) = 1. However, this implies that (x +ŷ)x (i) = 1, that is, ) ⊗k . If x, y ∈ X k , then u(x)v(y) = δ xy , so the vectors (u(x), v(x)) (with x ∈ X k ) form a biorthogonal system of vectors, specially, the u(x) vectors are linearly independent. However, all the u(x) vectors lie in a subspace of dimension i . Therefore, the total size of the subsets A(x) is at most n k=1 k i=1 n+1 i 2 n−k ≤ 6 · 3 n . Now we use the tensor power trick to get rid of the factor 6. Let us assume that in F n 2 the system of subsets A(x) satisfies ( * ) and all the non-empty subsets are subspaces. Let S = |A(x)|. Now, we can define a system of subsets in F nt 2 as follows.
It is easy to check that this system satisfies ( * ), all the non-empty subsets are subspaces and the total size of the subspaces is S t . Therefore, S t ≤ 6 · 3 nt , thus S ≤ 6 1/t 3 n . This holds for every t, so the statement is proven.

Reformulation for 4AP-free-ness
Let us say that a system of subsets A(x) ⊆ F n 2 (x ∈ F n 2 ) satisfies property ( * * ), if the following implication holds: Proof. Similarly to the proof of Lemma 5.1 let us write every element a ∈ Z n 4 in the Let us assign to every x = 2r ∈ F (where r ∈ R) a subset A(x) ⊆ F in the following way: Now four distinct elements a 1 = f 1 + r 1 , a 2 = f 2 + r 2 , a 3 = f 3 + r 3 , a 4 = f 4 + r 4 (where f i ∈ F, r i ∈ R) form an arithmetic progression (in this order) if and only if a 1 +a 3 = 2a 2 and a 2 +a 4 = 2a 3 , that is, if f 1 +f 3 +r 1 +r 3 = 2r 2 and f 2 +f 4 +r 2 +r 4 = 2r 3 . This implies r 1 = r 3 and r 2 = r 4 , so the condition gives 2r 2 = 2r 1 + f 1 + f 3 and 2r 1 = 2r 2 + f 2 + f 4 . Such elements exist if and only if for distinct elements x = 2r 1 , y = 2r 2 ∈ F we have y ∈ x + A(x)+A(x) and x ∈ y + A(y)+A(y). Note that Hence, A is 4AP-free if and only if the system of subsets {A(x) : x ∈ F } satisfies property ( * * ).
Furthermore, |A| = |A(x)|, so the maximal possible size of a progression-free subset of Z n 4 is the same as the maximal possible total size of a family of subsets A(x) satisfying property ( * * ).
6 Construction, Proof of Theorem 3.2 Proof of Theorem 3.2. According to Lemma 5.1 it suffices to show that r ′ 3 (n) ≥ n i=t+1 n i C(i, i − t) for every 0 ≤ t ≤ n. That is, our aim is to find a system of subsets A(x) ⊆ F n 2 (x ∈ F n 2 ) satisfying ( * ) and having total size . Let A(x) = ∅ if and only if the Hamming-weight of x ∈ F n 2 is at most t, that is: To guarantee the requirement ( * ), for every y ∈ F n 2 \ T we have to choose the subset A(y) in such a way that y + A(y)+A(y) ⊆ T . Let us assume that the Hammingweight of y is i (where i ∈ [t + 1, n]). Let I(y) = {j : y j = 1} be the support of y. Let us consider the i-dimensional subspace V (y) = {z ∈ F n 2 : z j = 0 for every j / ∈ I(y)}. According to the definition of C(i, i − t) there exists a code with minimal distance at least i − t and size C(i, i − t) in V (y). Let A(y) be the set of the codevectors (having 0 coordinates for every j / ∈ I(y)) of this code: A(y) ⊆ V (y) ⊆ F n 2 . If z 1 and z 2 are distinct elements of A(y), then the support of each of them is a subset of I(y): I(z 1 ), I(z 2 ) ⊆ I(y). Furthermore, the Hamming-weight of their sum z 1 + z 2 is at least i − t, since the minimum distance of the code is at least i − t. Therefore, the Hamming-weight of y + z 1 + z 2 is at most i − (i − t) = t, which implies that y + z 1 + z 2 ∈ T , as needed. Hence, the system of subsets defined this way satisfies ( * ). Also, the total size of the subsets A(y) is  Now, we are ready to prove Theorem 3.1. In this section we give a proof for n ≤ 4, the case n = 5 is covered in the next section. Before starting the proof we give a brief outline of the main strategy. If we take a look at condition ( * ) or ( * * ), then heuristically it seems to be a good idea to use sets with small doubling, since ( * ) and ( * * ) seem to be less restrictive for sets with a small doubling. Subspaces have a small doubling, and working with them is easier, an important step will be to show that it can be assumed (up to n ≤ 5) that in a maximal configuration all the (non-empty) subsets are subspaces. To arrive at this all-subspace state, we can use arguments of the following type. If A(x) + A(x) ⊇ V for a large subspace V (where "large" means that |V | ≥ |A(x)|), then we can replace A(x) by V , since ( * ) (or ( * * )) remains true (that is, the corresponding subset is still 3AP/4AP-free) and the total size of the subsets is larger (not smaller). So the general plan is to replace the subsets with subspaces, and then solve the subspace version of the problem. If the dimension is small, then for almost all subsets A(x) we can do this reduction step easily, there are just a few cases, when A(x) + A(x) does not contain a sufficiently large subspace. However, even in these exceptional cases A(x) + A(x) turns out to be too large, so these cases can be excluded, as well. As the dimension increases, both the reduction step and both handling the allsubspace problem is getting more difficult. The 5-dimensional case is considerably more difficult than the previous cases, the proof of it is presented in the next section. Now, we continue with the proof of the cases 1 ≤ n ≤ 4.

Proof of Theorem 3.1 in the cases n ≤ 4. According to Lemma 5.1 and Corollary 3.4 it suffices to show that r
Case 1: n = 1. If the dimension is 1, then it is trivial that every 2-element subset of Z 4 is 3AP-free and any three elements form a 3AP, so r 3 (Z 4 ) = 2.
We continue with some general observations that are going to be used when the dimension is at least 2. Let us take a system of subsets A(x)(⊆ F n 2 ) (indexed by elements x ∈ F n 2 ) satisfying ( * ). For brevity let S = x∈F n 2 |A(x)|.
Observation 1. If 2 n−1 < |A(x)| for some x ∈ F n 2 , then by the pigeon-hole principle x + A(x) + A(x) = F n 2 . Since, for every y ∈ F n 2 we have (x + A(x)) ∩ (y + A(x)) = ∅, so, for some a 1 , a 2 ∈ A(x) we have x + a 1 = y + a 2 , that is, y = x + a 1 + a 2 ∈ x + A(x) + A(x). Therefore, x + A(x)+A(x) = F n 2 \ {x}, so all the subsets are empty except A(x), thus S = |A(x)| ≤ 2 n . Hence, in this case the statement holds.
From now on, let us assume that |A(x)| ≤ 2 n−1 for every x. Observation 2. Let A(x) be a nonempty subset: 0 < |A(x)| ≤ 2 n−1 . It can be assumed that 0 ∈ A(x), since changing A(x) to a translate of itself, A(x) + c, preserves A(x) + A(x).
Observation 3. If |A(x)| ∈ {1, 2}, then A(x) is automatically a subspace, as 0 ∈ A(x). If |A(x)| ∈ {3, 4}, let u and v be two different nonzero elements of A(x), that is, , so we may replace A(x) by the 2-dimensional linear subspace A ′ (x). This way ( * ) is still satisfied, and either S does not change or it increases by 1. Now we consider the cases n = 2, 3, 4 one by one.
Case 2: n = 2. Now, we continue with the case when the dimension is 2. If none of the subsets is empty, then all of them can have size at most 1, thus S ≤ 4. Otherwise, by Observation 1 we can assume that every nonempty subset has size at most 2, thus S ≤ 6, since there must be an empty set.
If the dimension is 3, then let e 1 , e 2 , e 3 be a basis for F 3 2 . According to Observations 1-3 we can assume that all subsets have size at most 4 and every nonempty subset is a subspace (of dimension at most 2).
Let k denote the number of 2-subspaces and l the number of empty sets. If k = 0, then S ≤ 2 · 8 = 16, and we are done. Note that in fact S < 16, since either all subsets have size at most 1 or at least one of them is empty.
So we can assume that k > 0. If A(x) = u, v a 2-subspace, then A(x + u), A(x + v), A(x + u + v) are all empty, that is, we can assign an "empty triple" {x + u, x + v, x + u + v} to each 2-subspace. To different 2-subspaces we assign different triples, as the sum of the elements in the triple is x. That is, k ≤ l 3 . We have S ≤ 4k + 2(8 − k − l) = 16 + 2k − 2l ≤ 16 + 2 l 3 − 2l ≤ 16, if l ≤ 4, equality holds if and only if l = 4. If 5 ≤ l, then S ≤ 3 · 4 = 12. Therefore, S ≤ 16 is shown and the maximum occurs when k = l = 4.
We continue with the 4-dimensional case.
Case 4: n = 4. We will show that if the system of subsets {A(x) ⊆ F 4 2 | x ∈ F 4 2 } satisfies ( * ), then At first it is going to be shown that "in most of the cases" it can be assumed that all the nonempty A(x) subsets are linear subspaces, then we will prove the statement for the special case when the non-empty A(x) subsets are all linear subspaces and finally we will also cover the remaining cases.
By Observations 1-3 we can assume that all subsets have size at most 8 and every nonempty subset of size at most 4 is a subspace (of dimension at most 2).
Let 5 ≤ |A(x)| ≤ 8. As dim A(x) ≥ 3, we may choose three linearly independent vectors from A(x). Let these be f 1 , f 2 , f 3 and let A ′ (x) = f 1 , f 2 , f 3 . As 0, contains all the elements of the subspace f 1 , f 2 , f 3 , possibly with the exception of f 1 + f 2 + f 3 .
Step 1. Assuming that A(x) is not a subspace, and any four vectors in A(x)\{0} are linearly independent we prove S < 42 under the additional assumption that at most two subsets have size 8.
Without loss of generality it can be assumed that {0, f 1 , f 2 , f 3 , f 4 } ⊆ A(x), where f 1 , f 2 , f 3 , f 4 is a basis. The 3-subspaces spanned by three out of these basis vectors cover F 4 2 with the exception of can be replaced by a "translate" of itself: {A ′ (y) | y ∈ F 4 2 } where A ′ (y) = A(y + c) for some fixed c ∈ F 4 2 (not depending on y). So by taking c = x we may suppose that A(0) = {0, f 1 , f 2 , f 3 , f 4 }. Then |0 + A(0)+A(0)| = 10, so at least 10 subsets are empty. The size of A(0) is 5 and the size of the other five (possibly) nonempty subsets is at most 8. If at least two out of these five subsets have size at most 5, then S ≤ 5 + 5 + 5 + 3 · 8 = 39 < 42. If this does not hold, then at least four of them are of size 8. We will cover this case later: indeed, it is going to be shown that if at least three subsets are of size 8, then S < 42.
Step 2. From now on, we will assume that • either all the nonempty A(x) sets are linear subspaces of dimension at most 3, or • some of the subsets are of size 5 but there are at least three subsets of size 8, and show that S ≤ 42 in these cases, too. Let h be the number of 3-subspaces. We distinguish 4 subcases.

Subcase 1 (h = 0) In this case all of the subsets are of size at most 4. If
we can assign an "empty triple", since the subsets assigned to the elements of x + A(x)+A(x) are all empty. Moreover, the triple {x + u, x + v, x + u + v} determines x, since the sum of the vectors in the triple is x. Let k be the number of 2-subspaces and l be the number of empty subsets (among the A(x) sets). As empty triples can be assigned to the 2-subspaces by an injective mapping, we have k ≤ l 3 . Hence, S ≤ 4k + 2(16 − k − l) = 32 + 2k − 2l ≤ 32 + 2 l 3 − 2l. If l ≤ 4, then this yields S ≤ 32. Moreover, for l = 5 we obtain that S ≤ 42. If l ≥ 6, then S ≤ 10 · 4 = 40. In all cases we obtained that S ≤ 42. Subcase 2 (h = 1) Let |A(0)| = 8. As |0 + A(0)+A(0)| = 7, at least 7 subsets are empty and consequently S ≤ 8 + (16 − 1 − 7) · 4 = 40.
Subcase 4 (h ≥ 3) Finally, let us assume that A(u), A(v), A(w) are 3-subspaces. Note that in this case it can happen that some of the nonempty subsets are not subspaces (these sets have size 5 and contain 5 affine independent vectors). According to Subcase 3, at least 10 subsets are empty. If at least 11 subsets are empty, then S ≤ 5·8 = 40, and we are done. So it can be assumed that exactly 10 subsets are empty.
Since there are only 10 empty subsets, from the argument of Subcase 3 it follows that these are exactly the 10 subsets A(x) which are assigned to the 10 elements x ∈ (U ∪ V ) \ {u, v}. However, U, V, U ∩ V are all affine subspaces, so the sum of the vectors in U adds up to 0 and the same holds for V and U ∩ V . Thus the sum of the vectors in U ∪ V is also 0. Hence, the sum of all vectors to which the empty set is assigned is u + v. However, we can repeat this argument with U and W and get that the sum is also equal to u + w, which is a contradiction. We are done.
Proof of Theorem 3.18. We are going to use the implications of the previous proof. When n = 2, one of the sets must be empty and all other sets must have size 2 in order to get 6 elements. If, say, A(x 0 ) = ∅, then for any x = x 0 the set A(x) must contain two elements whose difference is x. Two such configurations always can be mapped to each other in the required way.
When n = 3, then we need four empty sets and four 2-subspaces to get the total size of 16. Assume that A( We claim that x 1 , x 2 , x 3 , x 4 are affine independent. Otherwise they form an affin 2-subspace, however, taking some x / ∈ {x 1 , x 2 , x 3 , x 4 } the affine 2-subspace x+A(x)+A(x) would have to contain exactly three of x 1 , x 2 , x 3 , x 4 (and x as the fourth element) which is impossible. Therefore, x 1 , x 2 , x 3 , x 4 are affine independent, and by some affine linear transformation ϕ these can be mapped to 0, e 1 , e 2 , e 3 , for simplicity. Now, we can assume that 0 is contained in every nonempty A(x) (by suitable translations). Then it follows that A(e i + e j ) = e i , e j , for 1 ≤ i < j ≤ 3 and A(e 1 + e 2 + e 3 ) = e 1 + e 2 , e 2 + e 3 .
From the proof it follows that S = 42 is possible only if there are exactly five empty sets, ten 2-subspaces and one 1-subspace. Moreover, if u 1 , u 2 , u 3 , u 4 , u 5 are the vectors to which the empty set is assigned, then the 3-term sums made out of these 5 vectors have to be all distinct. Clearly, by applying a suitable affine linear transformation ϕ we can assume that u 1 = 0 and u 2 , u 3 , u 4 are linearly independent. If u 5 ∈ u 2 , u 3 , u 4 , then all the 10 triple sums lie in a 3-subspace, so they can not be all distinct. Thus u 2 , u 3 , u 4 , u 5 are linearly independent. Therefore, by renaming u 1 , . . . , u 5 (if necessary), let A(0) = A(e 1 ) = A(e 2 ) = A(e 3 ) = A(e 4 ) = ∅, where e 1 , e 2 , e 3 , e 4 is a basis. The set A(e 1 + e 2 + e 3 + e 4 ) can not be a 2-subspace, since all vectors in it must have Hamming-weight at least 3 to satisfy e 1 + e 2 + e 3 + e 4 + A(e 1 + e 2 + e 3 + e 4 )+A(e 1 + e 2 + e 3 + e 4 ) ⊆ {0, e 1 , e 2 , e 3 , e 4 }. So it is the unique 1-subspace, for instance A(e 1 + e 2 + e 3 + e 4 ) = e 1 + e 2 + e 3 + e 4 is an appropriate choice, but e i + e j + e k is also fine with any 3-subset {i, j, k} of {1, 2, 3, 4}. By permuting 0, e 1 , e 2 , e 3 , e 4 with a suitable affine linear transformation we might assume that A(e 1 + e 2 + e 3 + e 4 ) = e 1 + e 2 + e 3 + e 4 .
The remaining 10 sets need to be 2-subspaces. For A(e i + e j ) the unique appropriate choice is A(e i + e j ) = e i , e j , with this choice e i + e j + A(e i + e j )+A(e i + e j ) = {0, e i , e j } holds. For A(e i + e j + e k ) the unique appropriate choice is A(e i + e j + e k ) = e i + e j , e i + e k = {0, e i + e j , e j + e k , e k + e i }, with this choice e i + e j + e k + A(e i + e j + e k )+A(e i + e j + e k ) = {e i , e j , e k } is satisfied.
We will show that if the system of subsets {A(x) ⊆ F 5 2 | x ∈ F 5 2 } satisfies ( * ), then S := Again, by Observations 1-3 we can assume that all subsets have size at most 16 and every nonempty subset of size at most 4 is a subspace (of dimension at most 2). Now, let us assume that 8 < |A(x)| ≤ 16. The set A(x) must contain at least 4 linearly independent vectors. (Note that by Observation 2 we have 0 ∈ A(x).) Step 1. First, let us assume that a set A(x) with size 8 < |A(x)| ≤ 16 spans a 4-dimensional subspace. Our aim is to show it can be assumed that A(x) itself is a 4-subspace. Let Now, let us assume that f 1 + f 2 + f 3 + f 4 / ∈ A(x). Let us call the 2-term sums f i + f j (with i = j) pairs and the 3-term sums f i + f j + f k (with i, j, k distinct) triples. The pair f i + f j can be identified with the set of indices {i, j}, let us call this subset {i, j} ⊆ {1, 2, 3, 4} also a pair, and similarly the 3-element subset {i, j, k} will be called a triple corresponding to the vector f i + f j + f k . As the size of A(x) is at least 9, the set A(x) must contain at least (9 − 4 − 1 =)4 elements among the six pairs and four triples.
As a first observation we check that in all of the following cases the equality A(x) + A(x) = f 1 , f 2 , f 3 , f 4 holds: In case (i) we have f 1 + f 2 + f 3 + f 4 = (f 1 + f 2 )+ (f 3 + f 4 ) and each triple contains either {1, 2} or {3, 4}, thus they can be expressed like In case (ii) we have In case (iii) all the triples can be written like Now let us assume that none of (i-iii) holds. Since we need at least four more vectors, at least one triple is contained in A(x), by symmetry we shall assume that . Also, A(x) must contain at least one pair. This pair must be a subset of {1, 2, 3}, otherwise it would intersect {1, 2, 3} in a single element, contradicting that (ii) does not hold. We can assume that . Therefore, to get at least 9 elements we have to take at least two vectors from can not be taken, since it intersects the two pairs, f 1 + f 3 and f 2 + f 3 , in a single element. Now, Thus in all cases we get is a set of size at least 9 (and at most 16) such that A(x) is not a 4-subspace, then we can assume that dim A(x) = 5.
In case (i) Finally, let us assume that (i-iii) do not hold. From (i) it follows that the pairs either form a star or a triangle. If they form a triangle, let us assume that it is . Furthermore, (iii) implies that none of the other triples is in A(x). Hence, we will refer to this as case (a). From now on, we assume that the pairs in A(x) form a star.
If this star contains 4 vectors, e.g.
can not contain any triples because of (iii). (Case (b).) If this star contains 3 vectors, e.g.
can not contain any triples because of (iii). (Case (c).) If this star contains 2 vectors, e.g. f 1 + f 2 , f 1 + f 3 . At least one triple must lie in A(x) and (iii) implies that this triple is If only one pair is in A(x), e.g. f 1 + f 2 ∈ A(x). There are at least two more vectors (thus triples) in A(x). If one of them is f 3 + f 4 + f 5 , then the other triple intersects the pair {1, 2} or the triple {3, 4, 5} in one element, contradicting (ii) or (iii). Thus, by (iii) these two triples must contain {1, 2}, which gives case (e).
If there are no pairs, then there are at least three triples. Any two of them have an intersection of size 2, giving case (f) or case (g).
We summarize this: Note that the size of A(x) is 10 in case (b) and 9 in the remaining cases (a) and (c-g). Also, the size of A(x)+A(x) is 21 in cases (b), (c), (e), (f) and 22 in cases (a), (d), (g).
Let us assume that there is at least one subset A(x) having size at least 9 and not being a 4-subspace. Then at least 21 subsets out of the 32 sets A(y) are empty, so at most 11 subsets are non-empty. Let k denote the number of 4-subspaces among the subsets A(x). Then S = |A(y)| ≤ 16k + 10(11 − k) = 110 + 6k. If k ≤ 2, then this is at most 122. So let us assume that there are at least three 4-subspaces, namely, A(y), A(z), A(u). Let K = y + A(y), L = z + A(z), M = u + A(u), then K, L, M are affine subspaces of dimension 4.
If two of them are disjoint, for instance K ∩ L = ∅, then K ∪ L = F 5 2 , giving that A(t) = ∅ for every t / ∈ {y, z}, which is a contradiction. So any two of them intersect nontrivially each other, and then any pairwise intersection is a 3-dimensional affine subspace. As y / ∈ L ∪ M , we have that ( Therefore, it can be assumed that all subsets having at least 9 elements are 4subspaces, moreover there are at most 2 such subsets. If there are 2 such subsets A(x) and A(y), then |A(x)∪A(y)| = |A(x)|+|A(y)|−|A(x)∩A(y)| ≥ 16+16−8 = 24, so at least 24 − 2 = 22 subsets are empty and S ≤ 2 · 16 + 8 · 8 = 96. Hence, it can be assumed that there is at most one 4-subspace.
Step 3. Now we show that if |A(x)| ∈ [5,8], then it can be assumed that A(x) is either a 3-subspace or a set of 5 or 6 affine independent points.
Let us assume that 4 < |A(x)| ≤ 8. If A(x) has dimension 3, then A(x) can be replaced with this 3-subspace. If dim A(x) = 4, then it can be assumed that 0, f 1 , f 2 , f 3 , f 4 ∈ A(x). If at least one more element is in A(x), then A(x) + A(x) contains a 3-subspace and we can replace A(x) by this 3-subspace, otherwise A(x) = {0, f 1 , f 2 , f 3 , f 4 }, we will refer to this case as case (A).
Hence, it can be assumed that if there is a subset A(x) (with size in [5,8]) which is not a subspace, then it contains 5 or 6 affine independent points: Note that the size of A(x) in these cases is either 5 or 6.
Step 4. We show that it can be assumed that all subsets have size at most 8. Note that we have already seen (in Step 2) that there can be at most one 4subspace, so let us assume that there exists a (unique) 4-subspace A(y). Then |A(y)+A(y)| = 15, so there are at least 15 empty subsets. All the other subsets are 3subspaces or have size at most 6. If there is no 3-subspace, then S ≤ 16+16·6 = 112, and we are done. Let A(x) be a 3-subspace and K = y + A(y), L = x + A(x). As |K ∩ L| ≤ 4, we have |K ∪ L| ≥ 16 + 8 − 4 = 20, so there are at least 20 − 2 = 18 empty subsets, thus at most 14 non-empty ones implying S ≤ 16 + 13 · 8 = 120, and we are done. Therefore, none of the subsets can be a 4-subspace, and consequently all the subsets have size at most 8.
Step 5. We show that it can be assumed that all nonempty subsets are subspaces of dimension at most 3 or a set of 5 or 6 affine independent points. Furthermore, the number of empty sets among the A(x) subsets is at most 16 and there exists a subset of size at least 5.
If 0 < |A(x)| ≤ 4, then by Observations 1-3 it can be assumed that A(x) is a subspace. Now, we can assume that all the subsets have size at most 8 and all those nonempty subsets that are not subspaces are of type (A) or (B).
If there are at least 17 empty subsets, then S ≤ 8 · 15 = 120, so it can be assumed that at most 16 subsets are empty.
If there is no subset with size larger than 2, then S ≤ 64. If there is no subset with size larger than 4, then there must be a subset with size 4 and there are at most 29 non-empty sets, so S ≤ 29 · 4 = 116. So there is a subset of size at least five, this can be either of type (A) or (B) or a 3-subspace. Now our aim is to show that we can assume that there is no subset of type (A) neither of type (B).
Hence, there exists some y / ∈ T such that A(y) = ∅, so the number of the empty subsets is at least 16. If the number of 3-subspaces is at most 14, then S ≤ 14 · 8 + 2 · 6 = 124, and we are done. So we can suppose that the number of 3-subspaces is at least 15 and one subset has size 6. The set A(e 1 + e 2 + e 3 + e 4 + e 5 ) is not a 3-subspace, since any affine 3-subspace containing e 1 + e 2 + e 3 + e 4 + e 5 contains at least 2 more elements that are not in T . Hence A(e 1 + e 2 + e 3 + e 4 + e 5 ) is the 16th empty subset. Now, we claim that A(e 1 + e 2 + e 3 + e 4 ) is not a 3-subspace. This holds, since any affine 3-subspace containing e 1 + e 2 + e 3 + e 4 has at least one more element outside of T ∪ {e 1 + e 2 + e 3 + e 4 + e 5 }.
Therefore, there is no subset of type (B).
For brevity let us write A(i 1 i 2 . . . i l ) for A(e i 1 + e i 2 + · · · + e i l ) if If A(z + e 5 ) is a 3-subspace, then K z = z + e 5 + A(z + e 5 ) is an affine 3-subspace containing z + e 5 . The 1-codimensional affine subspace R = {x : xe 5 = 1} contains either all 8 elements of K z or 4 elements of K z . In the first case we get 7 new empty subsets, so the total number of empty subsets is at least 17 and we are done: S ≤ 15 · 8 = 120. So for every 3-subspace K z exactly 4 elements of K z lie in R. The sum of these 4 vectors is 0, so the sum of the three vectors in (K z ∩ R) \ {z + e 5 } is z + e 5 . Hence, for every 3-subspace K z we get an "empty triple" of vectors from R, therefore, By (2) and (3) we obtain that l(l − 1)(l − 2)/2 ≥ 5l + 8, which yields l ≥ 6. Then (2) implies that k ≥ 13, which is a contradiction, since 6 + 13 > 16 = |R|. Hence, it can be assumed that the total size of the sets is at least 33, on the other hand, it is clearly at most 40. It follows that none of them is empty and at least three of them are 3-subspaces, so we can assume that A(123) is a 3-subspace. A(123) ≤ e 1 , e 2 , e 3 , e 4 is not possible, since then e 1 + e 2 + e 3 + A(123) would contain e 1 + e 2 + e 4 or e 1 + e 3 + e 4 or e 2 + e 3 + e 4 or e 1 + e 2 + e 3 + e 4 . Since, if an affine 3-subspace of e 1 , e 2 , e 3 , e 4 contains e 1 + e 2 + e 3 but none of the other 4 vectors, then it is e 1 , e 2 , e 3 , however, e 1 , e 2 , e 3 contains 0, as well, contradiction. So e 1 +e 2 +e 3 +A(123) intersects nontrivially R, so |(e 1 +e 2 +e 3 +A(123))∩R| = 4, thus at least 4 subsets (among subsets A(x) with x ∈ R) are empty: l ≥ 4. Note that that the sum of the four corresponding vectors is 0. Also, note that in this case (similarly to (2) in the previous case) we shall assume that Now (4) yields that at least 7 such subsets are 3-subspaces: k ≥ 7. Then (3) implies that the number of empty ones is at least 5. Again, by (4) we get k ≥ 9. If l = 5, then we have 5 3 = 10 triples, but there is a 4-term zero-sum, so 4 triples can not be "empty triples", thus there is a 6th empty subset: l ≥ 6, and by (4) we obtain that k ≥ intersects R in 4 vectors whose sum is 0. It can be checked that this set of 4 vectors can not be the same for all the 5 possible v-s. (Otherwise F 5 2 \ R would contain at least 15 vectors to which the empty set is assigned, however, there are only 10 such vectors.) So there must be at least two such 4-element sets. Their intersection has size at least 2, since we have only 6 vectors in R to which the empty set is assigned, and also at most 2, since otherwise they would be the same. Let A(z 1 + e 5 ), . . . , A(z 6 + e 5 ) be the empty ones, and let us assume that the two 4zero-sum-sets are {z 1 , . . . , z 4 } and {z 3 , . . . , z 6 }. Then z 1 + z 2 = z 3 + z 4 = z 5 + z 6 . 20 triples can be chosen out of these 6 vectors, but just 8 of them can be "empty triples", contradiction.
Therefore, we can assume that there is no subset of type (A), that is, all the nonempty subsets are subspaces of dimension at most 3. According to Step 5 there must be at least one 3-subspace among the subsets, as Steps 6-7 imply that all the sets of size at least 5 are 3-subspaces.
Step 8. We show that the number of empty subsets is at least 13. Let 1 ≤ k be the number of 3-subspaces and l the number of empty subsets. Let us colour the elements of Now, since each triple appears in at most two 3-subspaces, we obtain that implying that l ≥ 13. Therefore, k ≥ l ≥ 13, as we claimed.
Note that F 5 2 can be partitioned into 8 translates of L. Every affine 3-subspace contains the same number of vectors from those L-translates that has a nonempty intersection with it. That is, given a 2-subspace L, we can distinguish three types of affine 3-subspaces, we are going to say that a 3-subspace is of • type-1, if it contains 1-1 vector from each L-translate, • type-2, if it contains 2-2 vectors from four L-translates (and none from the remaining four L-translates), • type-4, if it contains 4-4 vectors from two L-translates (and none from the remaining six L-translates).
In M = L ∪ (L + x) ∪ (L + y) ∪ (L + z) there are 13 red elements, namely, all the vectors except x, y, z. If t / ∈ M is blue, thenÃ(t) is a 3-subspace of type-1, type-2 or type-4 which contains t and 7 seven red vectors.
If at least two L-translates do not contain any red vector, then the elements of these translates can not be blue, so k ≤ 11, contradiction. Hence, there is at most one L-translate without any red vector. In particular, this means that l ≥ 16, since there are 13 red vectors in M and at least 3 red vectors outside of M .
Thus k = l = 16. Let us assume that the red vectors outside of M are v 1 , v 2 , v 3 , these vectors must be in different L-translates. Let L ′ = {u 1 , u 2 , u 3 , u 4 } be the unique L-translate not containing any red vector. If v 1 + v 2 + v 3 ∈ L ′ , then at most one of the A(u i ) sets can be a 3-subspace (namely, A(v 1 + v 2 + v 3 )), contradiction. Now assume that v 1 + v 2 + v 3 / ∈ L ′ . By symmetry we can assume that v 1 + v 2 + v 3 / ∈ L + x also holds. But then the union of theÃ(u i ) = u i , v 1 , v 2 , v 3 af f sets (that are all affine 3-subspaces of type-1) cover L + x and the (unique) u i for which x ∈Ã(u i ) can not be blue (since x is not red). Hence, no three-wise intersection of 3-subspaces can be a 2-subspace.
Step 10. Now we know that 13 ≤ l ≤ k and no three-wise intersection of 3subspaces is a 2-subspace. We finish the proof of the upper bound 124 by verifying the statement in these cases.
Let N be the number of those pairs of 3-subspaces whose intersection is a 2subspace. Then since each of the k 3-subspaces contain 35 empty triples. Hence, for l < 16 we have N > 0, that is, two of the 3-subspaces assigned to blue vectors intersect each other in a 2-subspace. In the following subcases we always take two such subsets first. Subcase 1. If l = 13, then we can assume that L is a linear 2-subspace and A(x) = L ∪ (L + x),Ã(y) = L ∪ (L + y) are 3-subspaces corresponding to blue vectors x and y. At least 2 translates of L does not contain any red vector, and in these translates there can not be any blue vectors, either. So the number of blue vectors is at most 32 − 13 − 8 = 11, contradiction. Subcase 2. If l = 14, then again let L be a linear 2-subspace andÃ(x) = L ∪ (L + x),Ã(y) = L ∪ (L + y) be 3-subspaces corresponding to blue vectors x and y. Note that in L ∪ (L + x) ∪ (L + y) there are 10 red vectors. We have 4 more red vectors, say, v 1 , v 2 , v 3 , v 4 , which must lie in different L-translates. (Otherwise there would be two L-translates without any red vector, which would imply that the 8 vectors in these translates are not coloured, contradicting that that the number of non-coloured vectors is at most 4.) Note that all the 3-subspaces assigned to some blue vector different from x, y are of type-1 or type-2. To get a 3-subspace of type-2 we need to take 2-2 red vectors from L, L + x, L + y. Moreover, these pairs must determine parallel vectors in these three L-translates (that is, in each pair the sum of the two vectors is the same), so there are at most 6 such subspaces. A type-1 3-subspace must correspond to a (blue) vector from the last L-translate, so there are at most 4 such subspaces. Hence k ≤ 4 + 6 + 2 = 12, contradiction.
Subcase 3. Let us assume that l = 15. Again, we can assume that for some linear 2-subspace L the sets A(x) = L∪(L+x), A(y) = L∪(L+y) are two 3-subspaces. Let L 4 , . . . , L 8 be the remaining five L-translates. They contain altogether 5 red vectors. If at least two of them do not contain any red vector, then in these two L-translates there aren't any blue vectors either, so the number of blue vectors is at most 9, contradiction. So without the loss of generality it can be assumed that either (i) L 4 contains two red vectors and L 5 , L 6 , L 7 contain one-one red vector: In case (i) let α, β be the two directions that are different from the direction determined by the two red vectors of L 4 . That is, α and β are those two nonzero elements of L that are different from the sum of the two red vectors in L 4 . Let us consider the following 6 vectors in L 5 , L 6 , L 7 : v i + α, v i + β (for 5 ≤ i ≤ 7). If such a vector is blue, then the corresponding 3-subspace is of type-2, moreover, L 1 , L 2 , L 3 contain one-one red pair of this 3-subspace, and in each pair the sum is the same, either α or β. There are only 4 such triples (of pairs of vectors) meaning that at least two of the vectors v i + α, v i + β (5 ≤ i ≤ 7) are not blue. To get 15 blue vectors all vectors in L 8 must be blue (as there are at most 2 non-coloured vectors). Note that the corresponding 3-subspaces must be of type-1. If v 5 + v 6 + v 7 ∈ L 8 , then there can be at most one blue element in L 8 (namely v 5 + v 6 + v 7 ). If v 5 + v 6 + v 7 / ∈ L 8 , then by symmetry we can also assume that v 5 + v 6 + v 7 / ∈ L 2 . If t ∈ L 8 is blue, then the corresponding 3-subspace isÃ(t) = v 5 , v 6 , v 7 , t af f , but these four 3-subspaces cover L 2 , which contradicts that L 2 contains only 3 red vectors.
In case (ii) there are two 3-subspaces of type-4. To get a 3-subspace of type-2, we have to choose one-one red pair from L 1 , L 2 , L 3 in such a way that these pairs determine parallel directions. This can be done in 6 ways, and every affine 3-subspace is determined by 6 points of it, so there are at most six 3-subspaces of type-2. To get a 3-subspace of type-1 we have to choose a red vector from all but one of the L-translates. First assume that no four-element subset of {v 4 , . . . , v 8 } is a 2-subspace. Then the (at least) four red vectors chosen to be in this 3-subspace from {v 4 , . . . , v 8 } determine uniquely a 3-subspace, so the number of 3-subspaces of type-1 is at most 5, thus k ≤ 2 + 6 + 5 = 13, a contradiction. Now assume that a 4-element subset, say, {v 4 , v 5 , v 6 , v 7 } forms a 2-subspace. Each 3-subspace of type-1 contains at least 3 elements of {v 4 , v 5 , v 6 , v 7 }, hence all of them contain all these four vectors. Then the blue vector is in L 8 \ {v 8 }, so there are at most 3 such subspaces, thus, k ≤ 2 + 6 + 3 = 11, a contradiction.
Subcase 4. Finally, let us assume that l = k = 16, that is, all vectors are either red or blue. First we show that there are two 3-subspaces whose intersection is a 2-subspace. For the sake of contradiction, assume the contrary. Let S 1 , S 2 , S 3 , S 4 be four 3-subspaces assigned to blue vectors. If every pairwise intersection has size less than 4 (that is, the intersection is either empty or has size 2), then so S 1 ∪ S 2 ∪ S 3 ∪ S 4 contains at least 20 − 4 = 16 red vectors. Since there are only 16 red vectors, we must have equality in (6), so each pairwise intersection has size 2 and each triple-intersection has size 0. Clearly, these hold for any four 3-subspaces assigned to blue vectors. Pick such a 3-subspace, for instance, S 1 . Then the other fifteen 3-subspaces have to intersect S 1 in pairwise disjoint pairs, which is impossible. Therefore, there are two 3-subspaces whose intersection is a 2-subspace. Hence, we can assume that this 2-subspace is a linear 2-subspace L and the sets A(x) = L ∪ (L + x), A(y) = L ∪ (L + y) are two 3-subspaces corresponding to blue vectors x and y. Let L 4 , . . . , L 8 be the remaining five L-translates. These contain 6 more red vectors. As there can be at most one L-translate without any red vector, we can assume that the number of red vectors among them is i) 3-1-1-1-0 or ii) 2-2-1-1-0 or iii) 2-1-1-1-1.
In case (ii) let us assume that the direction 0 = α ∈ L is different from the direction(s) determined by the pairs in L 4 , L 5 . Let v 6 ∈ L 6 , v 7 ∈ L 7 be the red vectors in these translates. Consider the blue vectors v 6 + α and v 7 + α. The 3subspaces corresponding to them are of type-2, and both of them contain one-one pair from L 1 , L 2 , L 3 , moreover, all these pairs determine direction α. In L 2 and L 3 these pairs are uniquely determined. In L 1 there are two choices (two disjoint pairs). However, these two pairs in L 1 together with the pairs from L 2 and L 3 determine two pairs in the same L-translate, which contradicts the existence of such a pair in both L 6 and L 7 .
First assume that the L-translate containing 2 red vectors is L 4 , we can assume that these vectors are e 3 + e 4 and e 1 + e 3 + e 4 . Let t be a blue vector in one of the four L-translates L 5 , . . . , L 8 . ThenÃ(t) is either of type-2 or type-1. However, only L 1 , L 2 , L 3 , L 4 contain at least two red vectors, which means that any 3-subspace of type-2 must contain at least 6 vectors from L 1 ∪ L 2 ∪ L 3 ∪ L 4 , which is a 4-subspace, thus the remaining two vectors of the 3-subspace must also lie in this subspace, too. SoÃ(t) is of type-1. As L 5 ∪ L 6 ∪ L 7 ∪ L 8 is an affine 4-subspace, it intersectsÃ(t) in an affine 2-subspace. Therefore, if, say, t ∈ L 8 , then t and the red vectors from L 5 , L 6 , L 7 form an affine 2-subspace, that is, t is the sum of these three red vectors. But then in L 8 the only blue vector is t, contradiction.
Hence, L 4 contains one red vector. By symmetry, we can assume that L 5 contains 2 red vectors and these are e 5 and e 1 + e 5 . Let the red vector in L i be l i + t i for i ∈ {4, 6, 7, 8}.
Let i ∈ {6, 7, 8}. We claim thatÃ(l i + t i + e 2 ) andÃ(l i + t i + e 1 + e 2 ) must be of type-1. Otherwise,Ã(l i + t i + e 2 ) orÃ(l i + t i + e 1 + e 2 ) would contain at least two vectors from L 5 ∪ L 6 ∪ L 7 ∪ L 8 , so it would have to contain two more red vectors from one of the L-translates L 5 , L 6 , L 7 , L 8 , these could only be e 5 and e 5 + e 1 from L 5 . But then the blue vector l i + t i + e 1 would also lie in the 3-subspace (to get parallel pairs from the different translates), a contradiction. Hence,Ã(l i + t i + e 2 ) andÃ(l i + t i + e 1 + e 2 ) are of type-1.

Acknowledgements
C.E. was partially supported by FWF grant W1230, P.P.P. was supported by the National Research, Development and Innovation Office of Hungary (Grant Nr. PD115978 and K129335) and the János Bolyai Research Scholarship of the Hungarian Academy of Sciences.