Manuscript Offprint
arXiv:2610.19960Nonlinear fixed-distance codes via real lifts of moment configurations
Abstract
Let denote the largest size of a code of length and minimum Hamming distance over an alphabet of symbols. For fixed and we construct codes with redundancy for all large . No algebraic structure is imposed on the alphabet, and the codes are not linear. For and the coefficient of matches the Hamming bound, so the redundancy is determined up to lower-order terms. At distance four the codes are provably better than every linear code: by the polynomial-method bound for cap sets, -linear codes with require a strictly larger coefficient in front of .
The construction imposes moment checksums over an auxiliary finite field, as BCH codes do, but one fewer than the distance would normally require. The affine-line theorem from prior work describes the dependencies left by these checks. We exclude them by placing the code positions inside a specially structured subset of the field, built from Behrend's sphere construction with the help of algebraic number theory.
Keywords. Nonlinear codes, fixed minimum distance, redundancy, cap sets, Behrend construction, number fields, Chebotarev density theorem.
1 Introduction
Let denote the largest size of a code of length and minimum Hamming distance at least over an alphabet of symbols. Throughout, and are fixed integers and . The alphabet is ; is not assumed to be a prime power, and codes are not assumed to be linear. We measure a code by its redundancy and write
Unsubscripted logarithms are natural.
The fixed-distance problem asks how many check symbols are needed to protect a long word against a fixed number of errors. With , the Hamming bound
(1.1) gives . Over the binary alphabet, extended BCH codes attain the coefficient for every fixed . Over larger alphabets the picture is less complete [17], and that is the setting of this paper. Our main result imposes no algebraic structure on the alphabet.
Theorem 1.1. For every fixed pair of integers and there are constants and such that for all ,
In particular, .
Corollary 1.2. For every fixed integer ,
so the normalized redundancies at distances four and five converge to one and two.
Some words on what these statements do and do not say. The optimality in Corollary 1.2 is optimality of the coefficient of . The construction loses a factor in the number of codewords, so it does not give redundancy , positive packing density, or asymptotically perfect codes. At distance six, Theorem 1.1 gives coefficient three where the Hamming bound has two, and as grows the gap between and the Hamming coefficient grows linearly.
The Ellenberg–Gijswijt theorem [7] has the following consequence, proved in Section 2.
Proposition 1.3. For every prime power , one has and
For q = 3 the coefficient is approximately 1.084026.
Together with Corollary 1.2, this shows that for every prime power nonlinear codes achieve a leading redundancy coefficient that no linear family can. The ternary case is the most transparent: the columns of a parity-check matrix of a distance-four code form a subset of with no three-term arithmetic progression, and such sets have exponentially small density, whereas Behrend-type sets of integers lose only a subpolynomial factor.
1.2 Prior work and what is new
Extended BCH codes provide the classical benchmark. For a prime power q, their redundancy satisfies
see [17, eq. (3)]. For binary codes this meets the leading term of the Hamming bound. For alphabets large relative to the distance, namely , the BCH coefficient is , and Theorem 1.1 lowers it to . For smaller alphabets, BCH codes can match or improve on our bound. Combining the two constructions gives
for prime powers q.
Yekhanin and Dumer [17] developed the systematic study of the redundancy coefficient and proved
for all and . For , our result removes the additional . At distances four and five this reaches the Hamming coefficient over every alphabet.
Some of these coefficients were already attainable in special cases. Dumer's earlier constructions [6] give coefficient 7/3 at distance five and 3 at distance six, so the distance-six coefficient in Theorem 1.1 is not new. At distance five, ternary and quaternary linear codes already attain coefficient two [17, Section II]. Liu and Xing [12] construct nonlinear codes with redundancy and obtain finite-length improvements over linear codes.
Our contribution is a construction giving coefficient for every alphabet and every fixed distance . It builds on the algebraic structure identified by Yekhanin and Dumer, but uses a geometric restriction in place of an additional check. The resulting codes are nonlinear; at distance four, Proposition 1.3 shows that this is essential to the improvement over linear codes. The next subsection explains the construction and the role of the geometry.
1.3 Overview of the method
The basic idea is to impose fewer checks, but to be more selective about the field elements used to label the code positions. The checks leave a restricted family of troublesome configurations. We then choose a large set of labels containing none of them.
One fewer moment check. Assign a distinct element of an auxiliary field to each code position; these elements are the locators. Read each symbol as an integer. In addition to a symbol-sum check, record the moments
Words with the same check values form a code. The auxiliary field need not have any relation to the alphabet, so this construction makes sense even when q is not a prime power.
For sufficiently large characteristic, the usual Vandermonde argument shows that two distinct words with the same check values cannot differ in or fewer positions. To obtain distance , we must also rule out differences in exactly positions. One more moment check would do this, but would cost another leading term of in the redundancy. Instead, we restrict the locators to a set on which such a difference cannot occur.
What can still go wrong. A difference in positions that escapes the checks gives a short relation among the corresponding locators; we call it a dependency. Yekhanin and Dumer [17] show that, for suitable choices of and , all locators in such a dependency lie on one affine line over . Here we view as an -dimensional vector space over .
There is also strong control over the relative positions of these locators. After translating and scaling so that two of them become 0 and 1, the equations for a dependency leave only finitely many possible configurations of distinct locators. These normalized configurations are the shapes studied later. For our purposes, it is enough to control just one ratio,
The equations for the shapes restrict this ratio to roots modulo p of finitely many fixed polynomials, depending only on q and d. Thus the task is not to exclude arbitrary finite-field collinearity, but only triples with these particular ratios.
Why a sphere helps. Over the real numbers, there is a simple way to exclude all such triples at once: put the points on a sphere. A line meets a sphere in at most two points, so three distinct points of the sphere cannot satisfy for any real . Behrend's construction [2, 8] uses this observation to build large sets of integers containing no three-term arithmetic progression. We adapt the same idea to the ratios left by our checks.
The difficulty is that our locators live in a finite field, not in real space. A relation modulo p need not have held before reduction, and a root of a polynomial modulo p need not correspond to a real root of that polynomial. The number theory in the paper addresses precisely these two obstacles.
Bringing the real geometry into the finite field. First, we choose the auxiliary primes using Chebotarev's theorem so that every ratio arising from a dependency is the reduction of one of finitely many fixed real algebraic numbers. We call such a number a real lift of the ratio. Only the ratio of one triple needs a real lift; we do not need to lift the entire configuration.
Next, we work in a fixed number field contained in : a finite extension of containing these coefficients. We build the sphere using algebraic integers as coordinates and keep them small enough that the relevant congruences must already be equalities before reduction. The proof is an algebraic version of the elementary observation that an integer divisible by p and of absolute value less than p must be zero. Consequently, a prohibited triple in the reduced set would lift to three distinct collinear points on the real sphere, which is impossible.
The cost of restricting the locators. As in Behrend's construction, the sphere can be chosen to contain many points. With suitable parameters, we obtain locators in a field of size . The moment checks therefore contribute the leading redundancy ; the symbol-sum check and the restriction of the locator set together cost only . In this way, the geometric restriction replaces an entire moment check at only a lower-order cost.
At distance four, the argument can be carried out entirely over the integers. At distance five, the relevant ratios satisfy quadratic equations, and an elementary choice of primes suffices. A shorter proof of the distance-five bound would follow from a Sidon-type estimate recorded by Cilleruelo and Timmons [3, p. 2], but the required form of that estimate is attributed there to unpublished work and personal communication. We therefore give a direct proof that does not rely on it; see Remark 5.3 for details. The number-field construction allows the same geometric idea to work for general distance.
1.4 Organization
Section 2 establishes Theorem 1.1 for and proves Proposition 1.3. Section 3 sets up the moment checksums, records the finiteness of normalized configurations, and applies the Yekhanin–Dumer affine-line theorem. Section 4 develops the sphere construction over a number field and reduces the main theorem to a statement about affine ratios that we call a localization datum. Section 5 produces such a datum at distance five by elementary means. Section 6 does so in general, using one-variable polynomial relations and Chebotarev's theorem. Section 7 discusses limitations and questions.
1.5 Acknowledgement and disclosure of AI use
The author shared with GPT-6 (OpenAI) his research notes outlining possible approaches to the fixed-distance coding problem. Starting from those notes, GPT-6 developed the constructions and the proofs presented in the paper, and also assisted with the literature review, with checking the mathematics, and with preparing the manuscript. This was a substantive research contribution far beyond language editing. GPT's original approach has been simplified by the author. Claude Fable 5.1 (Anthropic) was used to revise the exposition and presentation. Sergey Yekhanin is the sole named author and takes responsibility for the final version.
2 Distance four
At distance four the construction is elementary, and it already shows the two ingredients of the general argument: a checksum that can be lifted from a congruence to an exact integer equality, and a locator set built from Behrend's sphere. Put and read the symbols of as integers. When two words differ in at most three positions, each nonzero coordinate difference is then an integer of absolute value at most , and the following notion is designed for exactly those differences.
Definition 2.1. A set is -weighted-average-free if, for all positive integers with , the only solutions of
are those with x = y = z. For K = 1 the condition is vacuous.
2.1 The construction
Lemma 2.2. Let be a K-weighted-average-free set of n distinct integers, and put and . Every fiber of the map
is a code of minimum distance at least four. Consequently .
Proof. Suppose two distinct words in one fiber differ on a support of size , with coordinate differences at locators . Then and . Since and , both congruences are equalities in . For the first is impossible. For the two together give , so . For , after reordering and possibly changing all signs, the coefficients are with and , and the second equality is a relation (2.1) on three distinct elements of , which does not exist. The number of fibers is at most .
The modulus is a constant because it only has to dominate the symbol sum of a short difference of two words, not of a whole word; this is why the first checksum costs only redundancy. The code has redundancy , and everything depends on how small can be made for a given .
Lemma 2.3. For integers , and there is a K-weighted-average-free set with
Proof. The construction is Behrend's: points on a sphere, written out in a large base. We go through it in four steps.
A large sphere. For a point of the grid , the squared Euclidean norm is an integer between 0 and , so it takes at most values. By the pigeonhole principle some value is taken by at least grid points. Let be the set of grid points with .
Encoding. Put and . Since every coordinate satisfies , this is the base- expansion of ; hence is injective and . Let , so that .
No carries. Suppose with and positive integers with . Both sides are sums of powers of ,
whose coefficients and are nonnegative integers at most . Base-B expansions with digits in are unique, so the coefficients agree for every : as vectors. Dividing by and setting ,
Three points of a sphere are not collinear. Expanding the square,
and substituting gives
Apply this with and : the left side is and the first two terms on the right add up to , so . As , this forces
, and then as well. Thus the only solutions of (2.1) in A have , and A is K-weighted-average-free.
Finally, because for , which gives the second inequality in the statement.
Lemma 2.4. For fixed and every there is a K-weighted-average-free set of n integers in with .
Proof. Let , , and . Lemma 2.3 gives at least locators, because ; keep any of them. Finally
Proof of Corollary 1.2 at distance four. Lemmas 2.2 and 2.4 give codes with redundancy at most , and (1.1) with gives .
Two remarks. For the weighted-average-free condition is empty and consecutive integer locators already give redundancy , so the sphere is needed only for larger alphabets. And even when is a prime power, the map (2.2) is not an -linear syndrome: it adds integer representatives and reduces modulo two moduli that have nothing to do with . The next subsection shows that this nonlinearity is unavoidable.
2.2 A linear obstruction
Let be a prime power and let be a full-rank parity-check matrix of an -linear code of minimum distance at least four. Its columns are distinct and nonzero, and any three of them are linearly independent. Over this says in particular that no three distinct columns satisfy , which is the equation of a three-term arithmetic progression; since two equal columns in such a relation force the third to equal them, the set of columns is a cap set in . Meshulam's bound [13] and the Bateman–Katz bound [1] already show that is unbounded, but they are compatible with leading coefficient one. The polynomial-method breakthrough of Croot, Lev, and Pach [5] established an exponential bound for progression-free subsets of . The subsequent result of Ellenberg and Gijswijt [7] rules out leading coefficient one for linear codes over every prime-power alphabet .
Proof of Proposition 1.3. Ellenberg and Gijswijt [7, Theorem 4] prove the following. If satisfy and , and contains no solution of other than , then
For , each tuple counted on the right satisfies , so the count is at most
Minimizing over gives .
Let be the set of columns of . As we can choose all nonzero with zero sum, for instance with . A solution on three distinct columns would contradict the minimum distance, and a solution with exactly two equal columns forces the third to equal them, because the remaining coefficient is nonzero. Hence , which is (1.4).
It remains to see that . The function minimized in (1.3) equals at , and the derivative of its logarithm there is , so the function is smaller than just to the left of 1. For the minimum is attained at , giving and .
Combined with the construction, Proposition 1.3 gives
for every prime power .
3 Moment checksums and affine-line structure
For distances five and beyond we use an auxiliary finite field. Fix q and d and put
Let be a prime, let , and let .
Definition 3.1. A dependency on distinct elements , where , is a relation
with integers satisfying , reduced modulo in the field equations. A set is admissible if there is no dependency on elements of .
Lemma 3.2. If is admissible and , there is a q-ary code of length , minimum distance at least and cardinality at least .
Proof. Choose distinct and partition according to the value of
If two words in the same fiber differ on a support of size , their coordinate differences are nonzero integers of absolute value at most with . As , the sum is zero in , and the moment checks give the field equations in (3.1). This is a dependency on elements of , which does not exist. So every fiber has minimum distance at least , and there are at most fibers.
The symbol sum could equally be taken modulo the constant ; using p keeps the notation uniform, and the resulting disappears into the lower-order term.
Lemma 3.3. Every dependency involves at least locators. Moreover, if carry a dependency with coefficients , then so do for any with .
Proof. The zeroth relation and the moment relations say together that in for . If , the equations with form a linear system in the unknowns whose matrix is the Vandermonde matrix of the distinct . It is invertible, so all vanish modulo , which is impossible since . For the second assertion expand by the binomial theorem: is a linear combination of the sums , , all of which vanish.
So the only dependencies that can occur are those on exactly locators, and they are invariant under affine changes of variable. Given such a dependency, apply to send to 0 and to 1; the remaining locators become for . Let be the finite set of coefficient tuples of nonzero integers with and . The normalized dependency says that solves the system
and that 0, 1, are pairwise distinct. We call such a solution, over any field, a shape for .
Lemma 3.4. Let , and let be an algebraically closed field of characteristic zero or of characteristic . Then every shape for over is an isolated nonsingular solution of (3.3). There are at most such shapes. In characteristic zero, all their coordinates are algebraic numbers.
Proof. This is the normalized-moment calculation of [17, Lemmas 8–9], which also works in characteristic zero. The Jacobian matrix has entries . Factoring out of row and out of column leaves a Vandermonde matrix, so
This is nonzero at every shape. Hence each shape is isolated and nonsingular. The isolated-point form of Bézout's bound gives at most such solutions.
For algebraicity, put
Adjoining a variable and the equation gives a polynomial system over whose complex solutions are precisely the shapes, with . They form a finite set. By the standard finiteness theorem for polynomial ideals [4, Chapter 5, §3, Theorem 6],
is finite-dimensional over C. Hence, for each , sufficiently many powers are linearly dependent modulo over C. Since is generated by polynomials with rational coefficients, such a dependence can be chosen with coefficients in Q. Thus satisfies a nonzero polynomial in Q[T], and so every coordinate of every characteristic-zero shape is algebraic over Q.
The following is the affine-line theorem of Yekhanin and Dumer, in the notation needed here.
Lemma 3.5 (Yekhanin–Dumer [17]). Suppose and is prime. Every shape over has all its coordinates in . Consequently, all locators of every dependency lie on the affine line
Proof. Apply [17, Lemma 10] with base field and to (3.3). Its coefficients are nonzero modulo , and . The short argument is as follows. Coordinatewise th powers permute the shapes. A shape in not fixed by this map has an orbit of length , since is prime. This contradicts the bound of in Lemma 3.4. Hence every coordinate is fixed by and lies in . Undoing the normalization gives the stated line; this is [17, Theorem 4].
The affine-line theorem alone is not enough for our construction: we cannot lift an arbitrary coefficient in to a bounded real coefficient. What remains is to show that the particular ratio is the reduction of a member of a fixed finite set of real algebraic numbers. Section 4 constructs large sets avoiding these ratios. Section 5 supplies the ratios directly from quadratic equations when , and Section 6 supplies them in general using polynomial identities and Chebotarev's theorem.
4 A sphere over a number field
4.1 Small algebraic integers
A number field is a finite extension of . Its degree is the dimension of as a vector space over . Such a field has exactly embeddings
where an embedding means an injective field homomorphism that fixes Q. In this section we use only number fields that admit a real embedding. We fix one such embedding and identify E with its image in ; thus we write . The other embeddings need not have real image, so E need not be totally real.
An algebraic integer is an algebraic number that is a root of a monic polynomial with integer coefficients. The algebraic integers belonging to form a ring, denoted by , called the ring of integers of . A basic fact from algebraic number theory is that there are elements such that every element of can be written uniquely as
We will also use certain subrings with the same -dimensional integer-lattice structure. More precisely, an order in is a subring containing 1 for which there are elements such that every element of has a unique representation
and form a basis of when rational coefficients are allowed. We call a -basis of . The ring itself is an order. Another example is whenever is an algebraic integer with .
For , its norm from to is
where the product runs over all embeddings . Equivalently, consider multiplication by as a -linear map from to itself. Its determinant is . If , then multiplication by sends to itself, so in a -basis it is represented by an integer matrix. Consequently,
Moreover, only when . These standard facts about number fields and their rings of integers are discussed in [14, Chapters 2–3].
We will reduce elements of R modulo suitable prime numbers. A reduction of R at p is a ring homomorphism
with . Such a homomorphism is automatically surjective, since its image contains the prime subfield . On ordinary integers this is necessarily the usual reduction modulo . The key point for us is that if an element of is small under every embedding of and reduces to zero, then it must already have been zero.
Example 4.1. Take and , with Z-basis 1, . The two embeddings send to and , respectively. Thus
If satisfies , then
defines a reduction . If lies in the kernel, then its norm is divisible by . Therefore, if both and are smaller than , then . Since the norm is an integer divisible by , it must be zero, and hence .
The same argument works in every number field.
Lemma 4.2 (Exactness from small conjugates). Let be a reduction at . If satisfies and
for every embedding , then .
Proof. Fix a Z-basis of , and let be the integer matrix of multiplication by in this basis. Thus
Consider the row vector
It is nonzero: otherwise would vanish on every integer linear combination of the basis elements, hence on all of , contradicting .
Apply to the identity for . Since , we obtain
for every , or over . Because , the matrix is singular modulo , and therefore . On the other hand,
The norm is an integer divisible by p, so it must be zero. Hence z = 0.
4.2 Exact lifting from a box
Fix a Z-basis of and a finite set . Write each as with and a positive integer . This is possible because the basis of spans over : write in that basis and clear the rational denominators. When divides no , a reduction extends to these elements by
For an integer consider the box
Since the basis and are fixed, there is a constant depending only on them such that for every embedding , all and all ,
Indeed, has basis coefficients of absolute value less than , so ; the second bound follows by multiplying the corresponding bounds for and by and . There are only finitely many embeddings and coefficients to consider.
Lemma 4.3 (Exact lifting). Let be a prime dividing no , admitting a reduction of , and satisfying . Put
Then is injective on , and for all and ,
Proof. By (4.2) and (4.3), every embedding of and of has absolute value at most . If , then and Lemma 4.2 gives . If , multiplying by gives
Lemma 4.2 gives in ; dividing by in yields .
4.3 A large level set
For , let
Write each in the fixed basis . Its coefficients have absolute value less than , and the products are fixed integer combinations of the basis elements. Thus each basis coefficient of is an integer of absolute value , where the implied constant also depends on the chosen basis. Consequently there is a constant , depending only on and its basis, such that each coefficient has at most possible values. It follows that takes at most values on . A largest level set of therefore satisfies
Lemma 4.4. Three pairwise distinct points of a level set of Q never lie on an affine line over E: if are pairwise distinct, then for every .
Proof. Suppose with . Expanding the squares,
The left side is zero, and because , so in . In the real embedding this is a vanishing sum of squares of real numbers, so for all , contradicting .
Only the one real embedding is used here, whereas Lemma 4.2 uses all embeddings; E need not be totally real.
Proposition 4.5 (Arithmetic sphere construction). Let , and be as above. There are constants and depending only on these objects such that the following holds for every prime that divides no , admits a reduction of , and satisfies . For every there is a set with
that contains no three pairwise distinct elements x, y, z with z = (1 − λ)x + λy for some λ ∈ Λ.
Proof. Let be as in (4.3), let be a largest level set of on , and let be the image of under coordinatewise reduction followed by the identification of with through a fixed -basis. Reduction is injective on by Lemma 4.3, so . Suppose are pairwise distinct with , and let be their preimages, also pairwise distinct. Since and the identification is -linear, the relation holds in each of the coordinates. Lemma 4.3 lifts it coordinatewise to in , contradicting Lemma 4.4.
For the size, (4.3) and give , so and . Substituting into (4.4),
which is (4.5) with and .
4.4 From locator sets to codes
The sets avoid a fixed finite list of affine ratios. To make them admissible we need two more things: every dependency on locators must contain a triple in one of these ratios, and suitable primes must exist at every scale. We package both requirements in a definition. The restriction on m is the one in the Yekhanin–Dumer theorem.
Definition 4.6. Fix and , with and . A localization datum for consists of a number field , an order , a finite set with fixed representations as above, and a set of primes , such that
(i) P contains a prime in for every sufficiently large Y;
(ii) every sufficiently large divides no and admits a reduction ;
(iii) for every such , every prime , and every dependency on distinct locators , listed in any order, one has for some .
Proposition 4.7. If admits a localization datum, then Theorem 1.1 holds for .
Proof. Let be large, let be prime, and let be the set of Proposition 4.5. It is admissible: a dependency on its elements involves exactly locators by Lemma 3.3, and by (iii) three of them satisfy with , which does not permit. Admissibility is inherited by subsets, so Lemma 3.2 gives, for every , a q-ary code of length , minimum distance at least , and redundancy at most .
It remains to choose and in terms of . Write and . By Bertrand's postulate, choose a prime with . For all sufficiently large we then have , and . Define by
As , also . Condition (i) supplies , and (4.5) gives , that is, . The redundancy of the resulting code, in natural-log units, is at most
Indeed, and , so the additional terms are . Exponentiating gives (1.2), as .
The field E, the set , and hence a, b, D are fixed before p and m grow. Requiring m to be prime changes only the lower-order term. Condition (i), on the other hand, is essential to this calculation: an infinite set of permitted primes with arbitrarily large multiplicative gaps would not suffice.
5 Distance five
We now take , so : the checksums are the symbol sum and the first two moments, and by Lemma 3.3 the only dependencies to worry about involve exactly four locators. Here the shapes are roots of quadratics and the auxiliary primes can be found in an arithmetic progression, so nothing beyond quadratic reciprocity is required. The section also serves as a template for the general case.
5.1 The shapes
A four-term dependency has coefficients , that is, nonzero integers of absolute value at most with , and distinct locators with
After normalizing and , the remaining two locators satisfy and . Multiplying the second equation by and substituting from the first shows that is a root of
If this is a quadratic, and a short calculation using gives its discriminant as
If the polynomial is , of degree one with nonzero leading coefficient. In either case y is a root of a nonzero polynomial of degree at most two whose coefficients are integers built from a, b, c, e.
There are finitely many tuples and hence finitely many polynomials (5.1). Their real roots lie in the multiquadratic field
where are the primes not exceeding : a positive discriminant is four times a product of positive integers at most , so its square root is an integer times a product of some of the , and the root in the linear case is rational. For we have . Let be the set of all real roots other than 0 and 1 of all the polynomials (5.1), with representations fixed as in Section 4.
5.2 The field and the primes
As an order in E, take
Each is an algebraic integer, since it satisfies the monic polynomial . As sums and products of algebraic integers are again algebraic integers, we have .
Since no nonempty product of distinct primes is a square of a rational number, a standard fact about multiquadratic extensions gives ; see [15, Theorem 5.30 and Example 5.31(b)]. A -basis of and a -basis of are given by the products
The multiplication rule is
All embeddings of E are real. Put
and let P be the set of primes .
Lemma 5.1. Let . Then -1 is a quadratic nonresidue modulo p, every positive integer at most K is a quadratic residue, and R admits a reduction at p. Moreover, contains a prime in for all sufficiently large Y.
Proof. By the supplementary laws of quadratic reciprocity, implies that -1 is a quadratic nonresidue and 2 is a quadratic residue modulo . For an odd prime we have and , so quadratic reciprocity gives
Every positive integer at most is a product of such primes and of 2, hence a residue. To define a reduction, choose a square root of each and send ; the multiplication rule shows that this is a ring homomorphism, and it is onto because it restricts to the natural map on . Finally, the prime number theorem for arithmetic progressions [10, Theorem 4.12] gives
where is Euler's totient function. Comparing this at Y and 2Y produces a prime of in for large Y.
Lemma 5.2. Let with and dividing no , and let be odd. Every dependency on distinct satisfies for some .
Proof. Normalize as above. The coordinate is a root of the reduction of modulo , which is a nonzero polynomial of degree at most two over : its leading coefficient is a nonzero integer all of whose prime factors are at most . Hence has degree at most two over . But also lies in with odd, so its degree divides ; therefore . For prime this is also an immediate consequence of Lemma 3.5.
Suppose . Since the quadratic has a root in , its discriminant is a square in . It is nonzero there, because is odd and exceeds , , , . If , then is a nonresidue by Lemma 5.1, since is a product of positive integers at most and is a nonresidue; this is impossible. So , the two square roots of the discriminant in are the reductions of , and the quadratic formula, valid since is odd and does not divide , shows that is the reduction of one of the two real roots of . If , then is the reduction of the rational root. In both cases because , so for some . Undoing the normalization gives
Proof of Corollary 1.2 at distance five. Every prime is odd, so Lemmas 5.1 and 5.2 show that is a localization datum for . Proposition 4.7 gives . The lower bound is (1.1) with .
Remark 5.3 (Alternative Sidon-set route). There is a shorter route to the distance-five upper bound using k-fold Sidon sets. In the terminology of Cilleruelo and Timmons [3], a set is k-fold Sidon if every solution in to an equation
is trivial: the indices can be partitioned into groups such that the variables in each group are equal and the corresponding coefficients sum to zero. In particular, for every , there is no relation
on pairwise distinct elements . For , this follows by padding the equation with zero coefficients.
Cilleruelo and Timmons [3] report that, for every fixed , there exist sets with this property and
Importantly, a single set A avoids all such equations simultaneously, rather than just one fixed equation. They attribute this extension of Ruzsa's four-variable construction [16, Theorem 7.3] to Axenovich and Verstraëte (personal communication and unpublished work).
Taking , choose distinct locators from such a set and use the two checks
Suppose two distinct words in one fiber differ in positions, with distinct locators and nonzero coordinate differences , where . Since the checksum moduli exceed 4K and 4KN, respectively, the congruences lift to exact integer equalities
The first equality rules out , and for the second contradicts the -fold Sidon property stated above. Inverting the displayed size bound gives , and hence redundancy .
This would give a short proof of the distance-five bound if the stated Sidon-set estimate were available. However, the required simultaneous construction was attributed to unpublished work. More recently, Fabian, Morris, and Szabó [9, Section 7.1] reported that they could not recover its proof and pointed out a potential difficulty in simultaneously avoiding equations for which the product of the four coefficients is not a square. Our proof does not rely on this unpublished result: the localization argument above establishes the distance-five bound directly and extends to arbitrary d.
Remark 5.4. The congruence condition on has a Galois-theoretic meaning that anticipates Section 6. All roots of the polynomials (5.1), real or not, lie in . For a prime , the th-power map on their reductions fixes each and negates . This is the action of complex conjugation on the original roots. Consequently, roots whose reductions lie in have real lifts. Section 6 obtains this same property for general polynomials, using Chebotarev's theorem in place of the prime number theorem for arithmetic progressions.
6 General distance
We return to arbitrary , with and . The Yekhanin–Dumer theorem already puts the normalized locators in when is prime. We only need to show that the first normalized coordinate is the reduction of one of finitely many fixed real algebraic numbers. We do this with a one-variable polynomial identity, followed by a choice of primes.
6.1 One polynomial for the first coordinate
Recall the polynomials from (3.3) and from (3.5). A tuple is a shape exactly when it extends to a solution of
Lemma 6.1 (A polynomial relation that survives reduction). For every there are a monic polynomial and a positive integer such that, for every prime , the polynomial can be reduced modulo and every shape over satisfies
The constant polynomial is allowed; in that case there are no shapes in these characteristics.
Proof. The proof of Lemma 3.4, applied to , gives a nonzero polynomial for which is a polynomial combination, over , of , . Dividing by its leading coefficient makes monic. Clearing all denominators in this identity gives a positive integer and polynomials , such that and
For , reduce this identity modulo and substitute a shape, with . The right side vanishes. Since is invertible modulo , the desired relation follows.
The point is the identity (6.1), not merely the fact that vanishes at all complex shapes. The identity can be reduced modulo directly. We do not need to show that every shape modulo is the reduction of a characteristic-zero shape. Nor do we need every root of to occur as a coordinate of a shape: additional roots only add finitely many ratios to the list we will avoid.
6.2 Choosing primes with real root lifts
Let be the union of the sets of complex roots of the polynomials , where each distinct root is included only once, regardless of its multiplicity or how many polynomials contain it. Let be their splitting field over , that is, the field generated by all these roots. If is empty, take . Since the polynomials have rational coefficients, is a finite Galois extension. Its Galois group
is the finite group of field automorphisms of that fix ; its elements permute the roots in . Complex conjugation restricts to one such automorphism . Its fixed field is
We use this particular embedding and take . Other embeddings of need not be real.
Reducing algebraic numbers. Choose a positive integer such that for every . Such an exists: a -basis of spans over , so one can clear the finitely many rational denominators of these roots in that basis.
To reduce elements of modulo a prime , we use a surjective ring homomorphism
where is a finite field of characteristic . Such maps exist for every . Indeed, since has a -basis of size , the quotient is a finite ring. Taking its quotient by a maximal ideal gives a finite field , necessarily of characteristic . The composition of the quotient maps gives . Different choices of maximal ideal may give different reductions. In algebraic number theory, the kernel of is called a prime ideal of lying above . Unlike the reductions in Section 4, the target may be a proper extension of . If , we also define
This is just the denominator-clearing convention used for in Section 4.2.
Outside a finite set of primes, distinct roots in have distinct reductions, for every choice of . Here is a direct verification. The product
over ordered pairs is a nonzero integer. Indeed, every factor is an algebraic integer, and every automorphism in merely permutes the factors, so is rational as well as an algebraic integer. If two distinct roots have equal reductions, one factor reduces to zero and hence . Excluding the prime divisors of prevents all such collisions. Empty products are understood to be 1.
Frobenius describes the pth-power map. We use the following standard fact about number fields [14, Chapter 8]. Outside a finite set of primes (the ramified primes), each reduction has an associated automorphism , called its Frobenius automorphism, characterized by
Thus describes, in characteristic zero, the action of the familiar map after reduction. As varies over the reductions at the same prime , the automorphisms run through one conjugacy class in . In particular, if this class contains , we can choose a reduction for which exactly.
Choosing the primes. Chebotarev's density theorem [11, Theorem 22.5] says that the set of primes whose Frobenius class is the class of c has counting function
where . Exclude the finitely many ramified primes, the prime divisors of MJ and of all the , and the primes at most . Let be the remaining primes counted in (6.4). For each , fix a reduction
Removing finitely many primes does not affect the asymptotic formula. Comparing it at Y and 2Y shows that P contains a prime in for every sufficiently large Y.
Define
For , take and . Let be the restriction of to . The next lemma supplies both the reduction and the real ratios needed in Section 4.
Lemma 6.2 (Real lifts of roots). For every :
(a) takes values in and is a reduction of at ;
(b) every satisfying , for any , is the reduction of a real root of . If , then for some .
Proof. For (a), let . Since , (6.3) gives
The elements of the finite field fixed by the pth-power map are exactly . Hence takes values there. It is a unital ring homomorphism and is surjective because it reduces ordinary integers modulo .
For (b), factor the monic polynomial over and reduce this factorization. All its roots, with their multiplicities, have defined reductions in . It follows that a root of is the reduction of some root of . The Frobenius identity extends to these roots by clearing the denominator , since and . Thus
Both and belong to , and distinct elements of have distinct reductions. Therefore , so is real. If , then , and .
6.3 The localization datum
Proposition 6.3. The data above form a localization datum for .
Proof. Condition (i) of Definition 4.6 follows from (6.4). For (ii), the primes in P do not divide , and Lemma 6.2(a) provides the reductions.
For (iii), let , let be prime, and let carry a dependency with coefficients . The normalized locators
form a shape for . Lemma 3.5 gives . Lemma 6.1 gives . Since , Lemma 6.2(b) gives for some . Undoing the normalization,
Proof of Theorem 1.1. Combine Propositions 6.3 and 4.7.
The roles of the ingredients are now separate. Yekhanin–Dumer puts the dependency on a line over . A polynomial identity restricts the needed line ratio to the roots of a fixed polynomial. Chebotarev makes that ratio the reduction of a real algebraic number. The arithmetic sphere excludes it without an additional checksum. At no point do we need to lift the other coordinates of the shape.
6.4 Two calculations at distance six
The following examples illustrate the effect of the choice of primes on the normalized equations.
First take the coefficient pattern , available when . Send the locators with coefficients -4 and 1 to 0 and 1. The remaining three locators then have first three power sums , so by Newton's identities they are the roots of
The shapes are the permutations of . For they exist over when , whereas for they are absent from every odd-degree extension of . At the level of individual roots, is real and are exchanged by complex conjugation. Choosing makes the th-power map act on their reductions in exactly the same way. In particular, neither of the nonreal roots has its reduction in .
This example also distinguishes a real ratio from an entirely real shape: a shape may have a real coordinate, such as -1, even though its other coordinates are nonreal. Our proof only uses the one coordinate needed for a triple of locators.
For a real example take and . Up to reordering and a global change of sign, the five-term patterns with coefficients in and zero sum are
In the first, normalize the two negatively weighted locators to 0 and 1. The other three then have their first three power sums equal to 2, so their monic root polynomial is and they cannot be distinct; this pattern has no shapes. In the second, the normalized equations read
The first two give and , and substituting into the third yields . Distinctness forces and hence
up to interchanging x and y. These computations remain valid in characteristic p > 10.
Consequently, when 2 is a nonsquare in and is odd, contains no five-point dependency of either ternary pattern on distinct locators. The whole field can then serve as the locator set, giving coefficient three with no sphere at all. This illustrates the mechanism; it does not improve the known ternary distance-six bounds [17, Section II].
7 Limitations and questions
7.1 Why the argument stops at moments
Suppose only nonconstant moments are kept and a dependency on distinct locators is considered. After normalizing two locators there remain unknowns. For the Jacobian of the moment equations has rank at every point with distinct coordinates, since any of its columns form a nonzero scaled Vandermonde determinant, so each nonempty component of the solution locus has dimension . Our argument uses the boundary case , where the locus is finite. With fewer checks the configurations, when they exist at all, form positive-dimensional families. Finiteness can then no longer supply the one-variable polynomial relations used in Section 6, and the affine-line theorem of Section 3 no longer follows from a bounded number of shapes. This is a limitation of the method rather than a lower bound for unrestricted codes.
7.2 Questions
Can the Hamming coefficient be reached for every fixed distance over every fixed alphabet? And how far can explicit nonlinear constructions separate from linear ones beyond distance four? Any attempt to push the real-lifting strategy below moments will have to cope with positive-dimensional configurations or find a different way to constrain short dependencies.
References
[1] M. Bateman and N. H. Katz, New bounds on cap sets, Journal of the American Mathematical Society 25 (2012), no. 2, 585–613. arXiv:1101.5851.
[2] F. A. Behrend, On sets of integers which contain no three terms in arithmetical progression, Proceedings of the National Academy of Sciences of the United States of America 32 (1946), no. 12, 331–332. DOI: 10.1073/pnas.32.12.331.
[3] J. Cilleruelo and C. Timmons, k-fold Sidon sets, Electronic Journal of Combinatorics 21 (2014), no. 4, Paper P4.12. DOI: 10.37236/3860. arXiv:1310.5374.
[4] D. A. Cox, J. Little, and D. O'Shea, Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra, 3rd ed., Springer, New York, 2007.
[5] E. Croot, V. F. Lev, and P. P. Pach, Progression-free sets in are exponentially small, Annals of Mathematics 185 (2017), no. 1, 331–337. DOI: 10.4007/annals.2017.185.1.7.
[6] I. Dumer, Nonbinary double-error-correcting codes designed by means of algebraic varieties, IEEE Transactions on Information Theory 41 (1995), no. 6, 1657–1666. DOI: 10.1109/18.476238.
[7] J. S. Ellenberg and D. Gijswijt, On large subsets of with no three-term arithmetic progression, Annals of Mathematics 185 (2017), no. 1, 339–343. DOI: 10.4007/annals.2017.185.1.8. arXiv:1605.09223.
[8] C. Elsholtz, Z. Hunter, L. Proske, and L. Sauermann, Improving Behrend's construction: Sets without arithmetic progressions in integers and over finite fields, preprint, 2024. arXiv:2406.12290.
[9] D. Fabian, P. Morris, and T. Szabó, Slow graph bootstrap percolation III: Chain constructions, preprint, 2025. arXiv:2508.03835.
[10] K. S. Kedlaya, Notes on analytic number theory, Chapter 4, “Primes in arithmetic progressions,” especially Theorem 4.12, online lecture notes. https://kskedlaya.org/ant/chap-primes-in-ap.html (accessed October 7, 2026).
[11] K. S. Kedlaya, Notes on analytic number theory, Chapter 22, “Artin L-functions and the Chebotaryov density theorem,” especially Theorem 22.5, online lecture notes. https://kskedlaya.org/ant/chap-artin.html (accessed October 7, 2026).
[12] S. Liu and C. Xing, Nonlinear codes with low redundancy, in Proceedings of the 2024 IEEE International Symposium on Information Theory (ISIT), Athens, Greece, 2024, pp. 705–710. DOI: 10.1109/ISIT57864.2024.10619117. Extended version: arXiv:2310.14219.
[13] R. Meshulam, On subsets of finite abelian groups with no 3-term arithmetic progressions, Journal of Combinatorial Theory, Series A 71 (1995), no. 1, 168–172. DOI: 10.1016/0097-3165(95)90024-1.
[14] J. S. Milne, Algebraic Number Theory, version 3.08, July 19, 2020, 166 pp. https://www.jmilne.org/math/CourseNotes/ANT.pdf.
[15] J. S. Milne, Fields and Galois Theory, version 5.10, 2022. https://www.jmilne.org/math/CourseNotes/FT.pdf.
[16] I. Z. Ruzsa, Solving a linear equation in a set of integers I, Acta Arithmetica 65 (1993), no. 3, 259–282. DOI: 10.4064/aa-65-3-259-282.
[17] S. Yekhanin and I. Dumer, Long nonbinary codes exceeding the Gilbert–Varshamov bound for any fixed distance, IEEE Transactions on Information Theory 50 (2004), no. 10, 2357–2362. DOI: 10.1109/TIT.2004.834744. arXiv:cs/0406039.