Manuscript Offprint
arXiv:2610.26368Constructive Arithmetic Regularity for Abelian Groups
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
The arithmetic regularity lemma of Green is a fundamental tool in additive combinatorics, providing a decomposition of arbitrary subsets of finite Abelian groups into pseudorandom pieces with respect to Fourier analysis. Over the years, it has found numerous applications in combinatorics, property testing, and theoretical computer science. However, Green's proof is existential, and many algorithmic applications require an efficient procedure for constructing the underlying regular decomposition. De, Nadimpalli, and Servedio (SODA 2022) developed a query-efficient constructive regularity framework over and explicitly raised the problem of extending their dimension-independent sumset-estimation algorithm to other finite Abelian groups.
In this work, we resolve this question for finite Abelian groups of constant torsion. We develop the first constructive version of Green's Arithmetic Regularity Lemma in this general setting. Given oracle access to a subset of the group, our algorithm computes an implicit description of a regular decomposition together with an oracle representation of a structured subset satisfying the guarantees of Green's lemma. The algorithm runs in time and query complexity polynomial in the regularity parameters and the tower bound, while remaining independent of the size of the ambient group.
As applications, we obtain efficient algorithms for removing linear configurations and approximately counting linear images, including weighted sumsets and suitable matrix systems of Cauchy–Schwarz complexity one, over finite Abelian groups of constant torsion. Our results provide a unified algorithmic framework extending dimension-independent constructive arithmetic regularity and its applications beyond .
*Funded by French PEPR integrated project EPiQ (ANR-22-PETQ-0007) and ANR Grant FLITTLA (ANR-21-CE48-0023).
Contents
1 Introduction 3
2 Our Results 6
2.1 An Overview of Our Results 6
2.2 Overview of the Proof 10
2.3 Technical Challenges Encountered in Establishing the Applications 15
3 An Algorithmic Regularity Lemma with Low Query Complexity 16
3.1 Fourier structure of restriction and truncation 16
3.2 Algorithmizing the Regularity Lemma (Theorem 3.1) 18
3.3 Query and time complexity of Algorithm 1 25
4 Testing linear configuration freeness 25
4.1 A single linear equation 26
4.2 Complexity-1 systems 28
5 Approximate image counting for a general linear form 32
5.1 A single general linear form 32
5.2 Approximate image counting for a linear system 34
A Preliminaries 39
A.1 Basics on Fourier Analysis over G 39
A.2 Density of a set 41
A.3 Regularity 42
A.4 The Pseudo Inner Product Framework 42
A.5 The subgroup 45
A.6 Character Decision Trees 46
A.7 Concentration inequalities 47
A.8 estimation 47
B A New proof of Green's regularity lemma for finite Abelian groups 50
C List Correction for Finite Abelian Groups 53
C.1 List Correction for Finite Abelian Groups 53
C.2 Proof of Theorem C.2 54
C.3 Query complexity of List Correction for Abelian groups, Algorithm 6 61
D Estimating Fourier Coefficients over Finite Abelian Groups 62
Definition 1.1 (ε-regular). A function is -regular if . Let be a subgroup of . For a coset with , the restriction of to is the function given by for all . The restriction is -regular if , where is the dual of .
Definition 1.2 ((η, ε)-regular decomposition). Let G be an Abelian group and let . The coset decomposition of G with respect to a subgroup is an (η, ε)-regular decomposition of G with respect to A if, for all but an η-fraction of the cosets of H, the restricted function is ε-regular. Here is the indicator function of A,
Green proved that such a decomposition always exists, with respect to a subgroup of bounded codimension:
Theorem 1.3 (Green’s arithmetic regularity lemma [Gre05]). Let and let . Then there exists a subgroup with co diemnsion at most a tower of twos of height such that the coset decomposition of with respect to is an -regular decomposition.
Green’s lemma has found numerous applications in additive combinatorics [GT10a] and property testing [DNS22]. However, Green’s proof, like the classical proof of Szemerédi’s lemma, is purely existential, whereas many algorithmic applications in learning theory, property testing, and approximate counting, require access to the regular decomposition itself. This raises the central question of this paper:
Can a regular decomposition be constructed efficiently, given only query access to the set?
De, Nadimpalli, and Servedio [DNS22] answered this question affirmatively over , developing a query-efficient constructive regularity framework and applying it to approximate sumset-size estimation. In the same work [DNS22], they explicitly raised the problem of extending their dimension-independent sumset-estimation algorithm to other finite Abelian groups, identifying the lack of suitable implicit Fourier-analytic procedures as a central obstacle.
In this work, we resolve this open problem for finite Abelian groups of constant exponent. We develop a constructive arithmetic regularity algorithm whose query complexity depends only on the regularity parameters and the group exponent, and is independent of the size of the ambient group. Our framework also yields an approximate sumset estimator in this setting, together with more general algorithmic applications.
In general, extending a framework from to arbitrary finite Abelian groups is far from routine. The vector-space setting of benefits from an underlying field structure in which characters can be identified with linear forms and, the concept independence is simply the ordinary linear independence. For a group of torsion , by contrast, the coefficient ring may contain zero divisors, characters may interact across cyclic components of different orders, and ordinary linear independence must be replaced by the more flexible notion of pseudo-independence (Definition A.17) defined in .
There is, however, a more fundamental obstacle to extending the regularity algorithm from to a general finite Abelian group . The difficulty is not merely that individual Fourier-analytic tools become more delicate. Green's existential proof of the arithmetic regularity lemma relies crucially on the structure of Bohr neighbourhoods. In the vector-space setting, the relevant Bohr neighbourhoods coincide with subspaces and therefore admit an exact coset structure on which Fourier analysis can be performed directly. For a general Abelian group, positive-radius Bohr neighbourhoods need not be subgroups and do not partition the ambient group into cosets. This prevents a direct algorithmic translation of Green's argument. Green overcomes this difficulty in the existential setting by working with nested and smoothed Bohr neighbourhoods; algorithmically, however, this would require efficient procedures for manipulating these additional objects and goes substantially beyond the direct use of first-order Fourier-analytic primitives.
We overcome these obstructions by developing an implicit subgroup-based regularity framework for finite Abelian groups. However, this raises a natural question: where does the subgroup structure come from, given that [Gre05] works with Bohr neighbourhoods? To address this, we work with subgroups arising as common kernels of characters, equivalently, zero-radius Bohr neighbourhoods. Each such neighbourhood is a normal subgroup of G, a structural property that provides the first and most important step toward developing an efficient regularity algorithm for finite Abelian groups. We provide a more detailed exposition in Subsection 2.2.
Although these subgroups provide an exact coset partition, the main algorithmic challenge is to construct and refine this partition implicitly, without explicitly identifying the defining characters. Several fundamental Fourier-analytic tools for finite Abelian groups have been developed in , which we use in our proofs. However, these tools alone are insufficient for our purposes. For example, our regularity algorithm constructs a character decision tree in the spirit of , but each node now involves randomized implicit procedures and must operate over a much more complicated character group.
A further ingredient is therefore a precise relation between the Fourier coefficients of restricted and truncated functions (Definitions 3.2 and 3.3). In the vector-space setting this relationship is essentially transparent, whereas for general Abelian groups it is obscured by the presence of cyclic components of different orders and by zero divisors in . Nevertheless, using the dual-group structure of , we establish a clean correspondence between the restricted and truncated Fourier spectra (Theorem 3.6). This correspondence is what allows the algorithm to detect local non-regularity using global Fourier-analytic subroutines, while keeping its query complexity independent of .
Conceptually, this viewpoint reveals that regularity in general finite Abelian groups can still be organized through exact subgroup fibres, despite the loss of the vector-space structure available over . Thus, beyond its algorithmic role, our approach provides a concrete way to understand how an arbitrary subset of a bounded-torsion Abelian group decomposes into structured cosets on which its Fourier behaviour is pseudorandom. In place of positive-radius Bohr neighbourhoods, the subgroup–coset structure becomes the basic object underlying our constructive decomposition.
Having established the constructive regularity theorem, we demonstrate its versatility through two algorithmic applications. Although regularity decompositions often reduce global problems to the analysis of structured local pieces, extending the corresponding applications from to general finite Abelian groups will introduce additional obstructions due to the missing vector space structure and the zero-divisor problem. In particular, multiplication by nonzero coefficients need not be invertible, while general matrix systems require additional determinantal non-degeneracy and torsion-compatible Cauchy–Schwarz complexity conditions. Establishing the corresponding counting and covering lemmas therefore requires additional arguments beyond those used over . We use these ingredients to obtain efficient algorithms for the following two problems.
Removal of linear configurations. One of the most celebrated consequences of Szemerédi's graph regularity lemma is the graph removal lemma of Ruzsa and Szemerédi [RS78]: a graph containing few copies of a fixed subgraph can be made entirely free of that subgraph by deleting a small fraction of its edges. Removal lemmas have since become a cornerstone of extremal graph theory, additive combinatorics, and property testing [FL17, GS17]. Green's arithmetic regularity lemma yields an analogous arithmetic removal lemma, in which graphs are replaced by subsets of finite Abelian groups and forbidden subgraphs by solutions to homogeneous systems of linear equations; removing triangles from a graph becomes a special instance of removing solutions to a linear configuration from a set. We give an query-efficient, randomized algorithm for this task. For a single linear equation, and more generally for any system of Cauchy–Schwarz complexity one (the class studied structurally by Green and Tao [GT10b]), our algorithm extracts a large configuration-free subset by deleting only a small fraction of the original set, with complexity independent of the ambient group size. We describe in more detail in Section 2.
Approximate image counting. Our second application concerns estimating the size of additive images of a set. The prototypical problem is sumset-size estimation: given query access to , estimate the density of . Sumsets and their structure are a classical theme in additive combinatorics [Ruz09, GR07], and the exact computational problem is intractable: even recognizing sumsets is NP-complete [AFSW25]. De, Nadimpalli, and Servedio [DNS22] showed that, over , the constructive regularity lemma yields an efficient estimator for the density of the sumset of a slight, density-preserving perturbation of (a relaxation that is necessary, as they also prove a matching lower bound for the exact problem). The same framework also extends to , given query access to both and , and to for any fixed . Note that such approximate counting becomes significantly more challenging and inherently different when moving from to a general finite Abelian group because of the group structure. This is also why [DNS22] left this task as an open problem.
We generalize this in two directions at once. For an Abelian group of constant torsion, integers , and the linear form , consider the image set
which recovers the sumset when and . We show that, given only query access to , one can efficiently approximate the density of for a density-preserving perturbation . We further extend this result to suitable matrix images , under determinantal non-degeneracy and torsion-compatible complexity-one assumptions, while keeping the query complexity independent of . We give a furture detailed Definition and exposition in Section 2.
Thus, beyond resolving the open problem of De, Nadimpalli, and Servedio [DNS22] our framework substantially generalizes the original sumset application to general linear images and to suitable systems of linear equations over finite Abelian groups.
2 Our Results
We first introduce some notation. denotes a finite Abelian group , where are primes for all and may not be distinct, and denotes a primitive root of unity, where . Throughout this article we assume is an Abelian group with constant torsion/constant exponent that is is constant. Tower denotes the tower of of height . denotes the Indicator function of the set .
2.1 An Overview of Our Results
Before diving into the statements let us describe some basic definitions that we will be using:
Given arbitrary subsets of some abelian group , we denote the following:
and
where denotes the size of the set. Let . A randomized algorithm with query access to , is said to be a probabilistic oracle machine for if for any input , the algorithm outputs a bit such that
where the probability is over internal randomness of . The query complexity of the machine is the number of oracle calls made by to , and the running time of the machine is the number of time steps it takes in the worst case. Let and be two functions. An algorithm with query access to is said to output a -oracle for the function if it outputs a representation of a probabilistic oracle machine such that the following holds:
where the query complexity of is at most and the running time is at most . If we call to be an exact oracle.
The Regularity Lemma is one of the central tools in extremal combinatorics and additive combinatorics, with numerous applications in property testing, learning theory, and approximation algorithms. Green proved an arithmetic regularity lemma for finite Abelian groups [Gre05]. However, many algorithmic applications, such as learning and property testing, require a constructive version. [DNS22] gave an efficient constructive regularity lemma over , and left open the problem of obtaining an efficient algorithm for general finite Abelian groups. Our first and main contribution resolves the open problem posed by De, Nadimpalli, and Servedio [DNS22]: we obtain a query-efficient constructive version of Green's arithmetic regularity lemma for finite Abelian groups of constant torsion, with complexity independent of the size of the ambient group. This structural result forms the basis for the more general algorithmic applications developed below.
Theorem 2.1 (A Constructive Regularity lemma for Abelian groups(Informal Version)). Let A be an arbitrary subset of some abelian group G. Given query access to A, a regularity parameter and, a density threshold , there exists an algorithm that makes poly(Tower( , ), ) queries to A and does a poly(Tower( , ), ) time computation and returns with probability returns an implicit description of a subset such that it approximately captures the density of A, where is the torsion of the Abelian group G.
More precisely, with probability at least 9/10, it outputs an probabilistic oracle and a character decision tree for a subgroup of co-dimension Tower such that one can use the oracle to construct a structural subset satisfying the following:
-
-
Every coset of satisfies either or ;
-
For every coset with , the restricted indicator function is -regular.
The number of cosets of is bounded by . The query complexity remain independent of the size of the group .
For a more formal statement we refer to section 3, Theorem 3.10. We prove this theorem in Subsection 3.2.
The regularity structure provides a natural decomposition of the domain, a feature that lies at the heart of many learning and testing algorithms. Consequently, designing an efficient procedure for identifying such a regularity structure immediately leads to a variety of algorithmic applications. In this section, we highlight some of the well-studied applications that follow from Theorem 2.1. Precisely, they are known for the usual Boolean domain, and it continues to hold for the Abelian domain as well. For each of these problems, we show how the constructive regularity lemma can be leveraged to obtain efficient algorithms with provable guaranties.
One of the central themes in additive combinatorics is understanding how large a subset can be while avoiding a prescribed additive configuration. Classical examples include triangle-free sets, progression-free sets, and sum-free sets, all of which can be viewed as forbidding solutions to a suitable system of linear equations. More generally, given a linear equation, , one may ask whether a set containing only a small number of such configurations can be converted into a completely configuration-free set by deleting only a few elements. Green's arithmetic removal lemma answers this question existentially. Our goal is algorithmic, using only query access to the set, can we efficiently construct an almost largest subset that is entirely free of the forbidden configuration, while making a number of queries independent of the ambient dimension?
Before moving to the statement we define the configuration density operator for functions and subsets as:
Theorem 2.2 (Single linear configuration removal: informal version). Let be a finite Abelian group with constant torsion and with and . For every target tolerance , there exists a threshold , such that the following holds for: Given query access to , there exists an algorithm that makes poly
is a function of .
means the hidden constant is allowed to depend on the parameter m.
queries and does poly time computation and with probability at least 9/10, it outputs a subset satisfying such that, whenever , the set contains absolutely no solutions to .
For the triangle equation , every solution is uniquely determined by choosing the two free variables , after which is forced. Thus, the solution space is naturally identified with . In particular, every triangle in the parameter space corresponds to exactly one triangle in the original set, and vice versa. For general linear equations, we would like the same one-to-one correspondence between the relevant space and the solution set. This is precisely the role of our non-degeneracy assumption: it guarantees that the parameterization remains bijective, so that the density and count of solutions are faithfully preserved under the reduction. We have a more formal exposition of these in Subsection 4.1, where we will prove this argument formally via Counting Lemma 4.1.
Remark 2.3. Our non-degeneracy hypothesis requires for every coefficient , ensuring that multiplication by each coefficient is an automorphism of . This guarantees a bijective parametrization of the solution set by the free variables. Moreover, the corresponding maps on the dual group are also automorphisms, preventing degeneracies arising from zero divisors in . From the Fourier-analytic perspective, it also ensures that the induced maps on the dual group are automorphisms, preventing any collapse arising from zero divisors in .
Our first theorem considers a single forbidden linear equation. A natural next question is whether the same guarantees hold when several linear constraints are imposed simultaneously. Such systems capture a much richer class of additive configurations, including many classical patterns studied in additive combinatorics. We show that, for every fixed (complexity-1) system of linear equations, where is an integer matrix, whose number of pseudo-independent (Definition A.17) rows is at most , one can again efficiently extract an almost largest subset avoiding all forbidden configurations. Remarkably, the algorithm remains dimension-independent, with both the query complexity and running time depending only on the system and the desired accuracy.
First, we define the generalised configuration density operator for functions and subsets as:
Before describing our result about system-removal we introduce two fundamental non-degeneracy conditions, which are essential for the well-definedness of the problem.
Definition 2.4 (Determinantal non-degeneracy). The -th determinantal divisor is the greatest common divisor of all minors of . We require the matrix to be co-prime to the group torsion: .
This condition functions as our matrix-level regularity filter. It ensures that the reduction of to over is completely invertible, allowing the solution space to be bijectively parameterized by through linear forms . Under this mapping, the total solution count is exactly .
Next let us define formally the configuration that we want to remove:
Definition 2.5 (Torsion-compatible Cauchy–Schwarz complexity-1). Let be the coordinate forms parameterizing the solution space of .
We say that has Cauchy–Schwarz complexity-1 over if, for every , there exists a partition such that, for each , .
Definition 2.5 is a torsion-compatible version of the usual Cauchy–Schwarz complexity-1 condition (similar to the notion that was defined in Green-Tao (Definition 1.5 [GT10b]) specialized to s = 1). Over groups of prime exponent, it is equivalent to the standard non-containment condition over the corresponding finite field. Over groups of composite exponent, the surjectivity condition is necessary for the Cauchy–Schwarz argument used below; noncontainment in rational linear spans alone does not guarantee it. We give a formal exposition in Subsection 4.2. We show the following:
Theorem 2.6 (Matrix configuration removal for complexity-1 systems: informal version). Let , whose number of pseudo-independent (Definition A.17) rows is at most , complexity-1, and . For every target tolerance , there exists a threshold , such that for every finite Abelian group with constant torsion , there exists an algorithm that makes queries and does time computation, with probability at least 9/10, it outputs an exact oracle for a subset satisfying such that, whenever , the set contains absolutely no solutions to .
Remark 2.7. Note that our removal result is restricted to systems of Torsion Compatible Cauchy-Schwarz complexity-1. This is essentially the broadest class of linear configurations that can be treated using first-order Fourier analysis (or -uniformity). In general, systems of higher Cauchy-Schwarz complexity require higher-order Fourier analysis and inverse theorems for Gowers uniformity norms. In other words, more general systems require control over higher-order uniformity norms ( ) and consequently the machinery of higher-order Fourier analysis. So, the current result reflects the scope of first-order Fourier analysis itself.
The preceding results demonstrate that arithmetic regularity enables efficient algorithms for removing forbidden additive configurations. We next show that the same structural framework is useful for a different class of additive problems. For the sake of simplicity, we first describe one simplest version of the problem that asks the following:
Given any subset , where is an Abelian group with constant torsion. Given oracle access to , precisely, given query access to the indicator function (See Definition A.11) can we estimate the size of the sum-set efficiently? Precisely, can we compute the density of the sumset with some additive error, where is such that is small.
Note that finding the exact size of the sumset is a hard, and it is not possible to obtain an efficient algorithm that is independent of n. Naturally one can ask if we approximately capture the density of A. The regularity decomposition compresses the input A into a structured subset on which subset sums can be simulated efficiently, leading once again to algorithms whose complexity is independent of the ambient dimension. Towards this we prove the following:
Theorem 2.8 (Approximate sumset: informal version). Let be a finite Abelian group of constant torsion , and let . For every target accuracy parameter , given query access to , there exists a randomized algorithm with query complexity and running time poly(Tower(, )), both independent of and such that with probability at least 9/10, the algorithm outputs a value and -oracle for where is a density-capturing perturbation satisfying , such that .
Remark 2.9. Theorem 2.8 is a special case of our more general approximate image-counting result for a single linear form (Theorem 5.4), obtained by taking and .
The problem of approximate sumset estimation was studied by De et al. [DNS22], who gave a query-efficient algorithm for subsets of and posed its extension to other finite Abelian groups as an open problem. We resolve this problem for finite Abelian groups of constant exponents and, more generally, obtain an approximate image-counting algorithm. We therefore omit a separate proof of Theorem 2.8. Instead, we state the more general Theorem 5.4 below and then briefly explain how the approximate sumset result follows as a corollary.
Definition 2.10 (Linear image set). For integers and the form , the image set of under is
For , this is the sumset .
Note the genuine image cannot be estimated to any nontrivial accuracy with -independent query complexity (see [DNS22]), so we estimate the density of the image of a density-capturing perturbation , exactly as in Theorem 2.1 and that is sufficient to simulate the density of the image set with some additive error.
Non-degeneracy hypothesis. We assume every coefficient is a unit modulo the torsion, for all . This is the single-form instance of pseudo-independence (Definition A.13): it makes each map an automorphism of , which is what the Parseval steps below require in the presence of zero divisors. No complexity-1 assumption is needed: at the second moment closes for all .
Theorem 2.11 (Approximate image counting for a linear system). Fix , , , and complexity-1 over . For every and every finite Abelian with constant torsion , given query access to , Algorithm 5 makes
queries and time, both independent of and , and with probability at least 9/10 outputs a value and an oracle such that, for a density-capturing perturbation with ,
and is an oracle for the image set .
2.2 Overview of the Proof
We will start by describing the existing efficient regularity algorithm by [DNS22] and why it can not be extended to Abelian groups. The goal of the algorithm is to construct a bounded-codimension subspace whose cosets partition so that becomes regular on almost all cosets. Equivalently, it seeks a partition into structured pieces on which all nontrivial Fourier coefficients of the corresponding restrictions of are small.
The existing Algorithm for by [DNS22]:
The algorithm constructs the desired partition iteratively by growing a parity decision tree. Initially, the tree consists of a single leaf, corresponding to the whole space, . At any subsequent stage, the parity labels appearing at the internal nodes determine a subspace , and the leaves of the tree correspond precisely to the cosets of .
-
For each current leaf, corresponding to a coset , the algorithm search for a nontrivial Fourier coefficient witnessing that is not -regular. If no such witness is found for at least a -fraction of the leaves, the refinement process terminates. Otherwise, witnessing parities are extracted from the irregular leaves. Whenever such a parity is linearly independent of the parities already used in the tree, every current leaf is split according to that parity. Thus, adjoining a new parity refines the current collection of leaves and, equivalently, produces the cosets of a smaller subspace.
-
Termination is established through an energy-increment argument. Green [Gre05] defined the ‘progress measure’ ExpImb (see Equation 16) and proved that at each step, it increases by at least . Since, the progress measure ExpImb is at most 1, therefore, the algorithm terminates after at most many iterations, such that all but -fraction of the surviving cosets are regular.
-
Note that each node of the algorithm needs to find one heavy Fourier coefficient. One can apply famous Goldreich Levin to find such heavy Fourier co-efficients but it is itself costly, takes exponential many queries, and we need to do it at each step, even for each node in the worst-case scenario. To make this step efficient what [DNS22] is that, they apply another famous trick called List correction framework, where instead of finding a heavy Fourier coefficient explicitly, we find them implicitly and work with the linear dependency with each other. [DNS22] call this procedure Implicit Goldreich Levin algorithm. Note that each node of the algorithm now contains other random procedures, and they accumulate some error that needs to be handled carefully till the end.
Proof idea of Theorem 3.10
While our algorithm for general Abelian groups follows the basic skeleton of the framework in [DNS22], it should first be noted that it is not a direct generalization. Indeed, this issue is also mentioned as future work in [DNS22], where the authors point out some natural obstacles to extending the Goldreich-Levin framework beyond their setting. Here, we briefly describe our algorithm and highlight the new elements required in the general Abelian group setting.
Algorithm 1 takes as black-box access a subset A of G, along with the regularity parameters and . It constructs a character decision tree A.33 that recursively partitions the group G into cosets, until all but -fraction of the resulting cosets A.20 become regular. Now, finding one heavy Fourier coefficient is itself costly, and we need to do it at each step, even for each node in the worst-case scenario.
- Not every Bohr neighbourhood is a subgroup, hence not possible to algorithmize Green's proof. Let be a finite Abelian group and let be a set of characters. A Bohr neighbourhood is defined in the following way:
Here is called the rank of , and is the radius. These has the following property:
which is because, if , then, since for every , , and so , by triangle inequality we have , which implies .
Also, for a subgroup of , we have . So, Bohr neighborhoods are not subgroups in general. Moreover, Green points out that a rank- Bohr neighborhood behaves geometrically more like a -dimensional convex body than like a subgroup. In particular, one typically expects to be closer to than to . Hence, a Bohr neighborhood is not invariant under addition in the way that a subgroup is, and one cannot perform harmonic analysis on it, not even approximately. Consequently, Bohr neighborhoods do not partition into cosets in general. This prevents us from directly extending the Goldreich-Levin or Implicit Sieve type algorithmic framework uniformly to arbitrary positive-radius Bohr neighbourhoods. Green overcomes the structural difficulty by working with nested and smoothed Bohr neighbourhoods, but algorithmizing this framework would require corresponding algorithms for these objects. Thus our algorithmization cannot simply use all as replacements for subgroups and cosets.
• The task can be done without using the Generalised Bohr neighbourhood. First let us make an observation that, for ,
Since if and only if , it follows that
where is defined as in Definition A.20. Thus Green's zero-radius Bohr neighbourhood is precisely the normal subgroup appearing in our framework. In particular, at radius zero, the approximate Bohr neighbourhood becomes a subgroup. Our first contribution towards the algorithm is that bypassing generalised Bohr neighbourhood argument and work with generale subgroup structure so that we can use Fourier analytic tools. Now every process has it's cost, our bypassing the Bohr neighbourhood techniques comes with the coset that now the co-dimension of the resulting subgroup depends on , the exponent of the domain while in Green's original proof the exponent depends on only tower of 2 and some other constant.
• List Correction framework at each node. While trying to algorithmize this procedure, the main idea here is to save queries by not identifying the Fourier coefficient explicitly, and still get a good estimate of it. This phenomenon is known and well studied in the literature, namely as List Correction. [DNS22] used a similar technique to give an efficient regularity lemma for . Eventually, for an Abelian group, one needs more structure, but thanks to the work by [DGK 25], the ground of the work was already established, but not enough. But here comes more subtlety with the fact that we need to run this random procedure list correction at each node, and we do not have the access of the charcaters, while we need to run the process each time on a new restricted subfunctions. Hence, alone [DGK 25] framework is not sufficient, we still need more structural understanding of the Abelian group to be able to extend the List correction framework and apply it recursively at each node for different restricted functions without knowing the character explicitly that was used for the restrictions.
One very subtle but important tool of our proof is that the algorithm works with the truncated function, with respect to , is
(Definition 3.3) on the cosets. On the other hand, the main algorithm originally has access to the restricted function and the aim to get a regularity condition also with respect to the restricted function , with respect to , is defined as
for all x in A. If we were working with the vector space, establishing a relation between the Fourier coefficients is quite straightforward and simple, and was done by [DNS22] also. In the case of an Abelian group, this becomes quite different.
This issue is resolved by Theorem 3.6 (see Section 3.1), which gives a relation between the coefficients of a truncated function with the corresponding restricted function (Definition 3.2). While the proof is quite simple but it gives a deep insight about the structure of the coefficients with respect to Abelian groups.
At each stage, the algorithm runs the List Correction (Algorithm 6) on the current restricted functions on cosets in order to identify the heavy Fourier coefficients. Once a heavy coefficient is found, the algorithm partitions the group further by splitting all the cosets at this stage with respect to the corresponding heavy character that it chose. Thus, one new heavy character is added at each stage, unless a good fraction of the surviving cosets are regular. Green [Gre05] defined the ‘progress measure’ ExpImb (see Equation 16) and proved that at each step, it increases by at least . Since, the progress measure ExpImb is at most 1, therefore, the algorithm terminates after at most many iterations, such that all but -fraction of the surviving cosets are regular.
We use this subroutine of List-correction which spends constant query to detect the heavy, that is, non-regular Fourier coefficient. We give a formal proof of these steps where we will use the subroutine in the main algorithm in Appendix C and Appendix D.
- Query Complexity. After obtaining the regular cosets, the algorithm estimates the Density (see Definition A.12) on each surviving cosets. Cosets whose density is at least are not discarded. The union of the remaining surviving cosets defines the set , which satisfies the properties in Lemma 3.9. So, we have obtained a good approximation of the set A. Note that the character decision tree constructed by the algorithm defines an exact oracle for .
The query complexity of Algorithm 1 is poly(Tower( , ), ), which follows from that of the List-Correction Algorithm 6, the Coefficient Estimation Algorithm 7, and the fact that the Algorithm terminates after many iterations. We present the main Algorithm 1 and the proof in Section 3.
Proof idea of ‘Algorithmic removal of linear configurations’ (Theorem 4.2 and Theorem 4.7). The goal is to establish a constructive framework for the algorithmic removal of linear configurations within finite Abelian groups of constant torsion. The proof of this follows in two main steps.
In the first step, we apply the algorithmic version of the Green's regularity lemma (see Theorem 3.10 and Algorithm 1), which partitions the group into cosets such that the set A is regular on all but -fraction of the cosets, as stated in the proof idea of Theorem 3.10. As described earlier, it then discards the cosets that are not regular and keeps only those cosets whose estimated is . The approximation of A preserves the behavior of A across the cosets. Here is the set that satisfies the properties in Lemma 3.9.
We then consider the non-degeneracy hypothesis, that is, every coefficient of the equation
is a unit modulo the torsion of the group, , for all . This ensures that the map that takes a character to is an automorphism over . This generalizes to Determinantal non-degeneracy for a system of equations (see Definition 2.4), where is a matrix with Cauchy–Schwarz complexity -1 (see Definition 4.4) and has number of pseudo-independent (Definition A.17) rows at most . This condition should allow us to apply the Counting lemma for a single equation (Lemma 4.1), and the generalized Von-Neumann for system of linear equations (Lemma 4.6), which shows that the configuration density operator for function is within error of the product of their individual averages, inside . But, here we should slow down and note that counting doesn’t directly hold for Abelian groups just by given non-degeneracy condition, one has to define the refined notion of Torsion compatible Cauchy–Schwarz Complexity -1 to be able to prove such counting Lemma.
Once we establish the Counting Lemma, this implies that if there exists even one solution to the system in , it yields many solutions to the system inside the original set . This further implies that if the density of the solutions inside the -regular cosets is sufficiently small, then there cannot exist any solution to the system in the approximation of . The proof follows by contradiction, where we assume that there exists a solution to the system in , and then show that this leads to many solutions in to be precise), which violates our initial assumption that the density of the system of linear configurations in is sufficiently small.
The key ingredient is the assumption that the system has Cauchy-Schwarz Complexity-1. By repeatedly applying the Cauchy-Schwarz inequality and duplicating variables according to the partition (see the definition of Cauchy-Schwarz Complexity -1, Definition 4.4), the linear forms become separated from one another. This separation allows the error terms to be controlled through their Gowers -norms. Note that Complexity-1 system could be controlled by -norms and which is the reason we can get the correct count of configuration, which is not possible for any higher order complexity system. See Section 4 for more details.
Proof idea of ‘Approximate image counting’ (Theorem 5.4 and Theorem 2.11). The goal is to prove that given a subset , one can efficiently estimate the density of its image under both a single general linear form and a matrix system , whose number of pseudo-independent (Definition A.17) rows is at most , and has Cauchy-Schwarz complexity -1 (see Definition 4.4), with a query complexity that is entirely independent of the group’s size . The proof of this also follows in two main steps.
The first step is again the algorithmic version of the Green’s regularity lemma (Theorem 3.10 and Algorithm 1), which partitions the group into cosets such that the set A is regular on all but -fraction of the cosets, as stated in the proof idea of Theorem 1. As described earlier, it then discards the cosets that are not regular, and keeps only those cosets whose estimated is . The approximation of A, obtained in Lemma 3.9, preserves the behavior of A with the cosets.
The second part is the covering lemma (Lemma 5.3), which states that if the set has density , a single linear form that satisfies the non-degeneracy hypothesis, that is, every coefficient of the equation is a unit modulo the torsion of the group, , for all (which again ensures that the map that takes a character to is an automorphism over ), is almost completely contained in . More precisely, Lemma 5.3 shows that covers all but an fraction of every coset in , and lands in no other coset, where be the form induced by on the quotient group . This generalizes to the case of a matrix , whose number of pseudo-independent (Definition A.17) rows is at most , and Cauchy–Schwarz complexity -1 (see Definition 2.5), where we want to compute the density of the image
Note that to be able to prove Covering Lemma, here also one has to define suitable notion of Cauchy–Schwarz complexity as merely the non-degeneracy condition will not be sufficient for this purposes. Here we use the first moment (a generalized von Neumann inequality, Lemma 5.7), which forces the ‘Cauchy–Schwarz complexity-1’ hypothesis, but, being an bound over targets, yields exact covering of each reachable output coset. We then show that the algorithm (Algorithm 4) outputs a value , which is within an error of from the density of . This gives us the desired result. This again can be extended to the general case of the matrix (Algorithm 5). See Section 5 for more details.
2.3 Technical Challenges Encountered in Establishing the Applications
- Non-invertible coefficients and Fourier-analytic counting for linear equations. Unlike the setting of , multiplication by a nonzero integer need not be invertible over a general finite Abelian group . Consequently, the map need not be a permutation of , preventing a direct application of the standard Fourier-analytic counting argument. We overcome this difficulty by imposing suitable non-degeneracy conditions, requiring the relevant coefficients to be coprime to the exponent of . This ensures that the corresponding character maps are automorphisms, allowing Fourier reindexing and the application of Parseval's identity. Using these properties, we establish a counting lemma for general linear equations
including the inhomogeneous case needed when restricting configurations to cosets of a subgroup.
- Determinantal non-degeneracy and exact parameterization of linear systems. For systems of linear equations , where , ordinary rank considerations are insufficient over groups of composite exponent, since the coefficient ring may contain zero divisors. We address this difficulty by imposing the determinantal non-degeneracy condition
where denotes the -th determinantal divisor of . Using Smith normal form, we show that this condition allows the system to be reduced to through invertible transformations over . Consequently, the solution space admits a bijective parameterization by , yielding
Moreover, since for every subgroup , this non-degeneracy condition is preserved upon restriction to . These properties are essential for obtaining the correct normalization of configuration densities in the generalized counting and removal arguments.
• Torsion-compatible Cauchy–Schwarz complexity and generalized counting lemmas. The usual Cauchy–Schwarz complexity condition, formulated in terms of linear spans over fields, does not directly provide the surjectivity properties required for the counting argument over finite Abelian groups of composite exponent. In particular, noncontainment in a rational linear span does not guarantee the required surjectivity modulo . We therefore introduce a torsion-compatible complexity-1 condition requiring, for every , a partition such that
This condition guarantees the uniformity of the shifts arising in the two Cauchy–Schwarz steps, allowing us to control the counting error through Fourier fourth-moment estimates. We further establish that the torsion-compatible condition is inherited by every subgroup , so that the generalized counting lemma remains applicable to the regular cosets produced by our constructive decomposition. This is crucial for the removal argument: a single configuration in the structured subset can then be shown to force many configurations in the original set , yielding a dimension-independent algorithmic removal guarantee for the specified class of non-degenerate complexity-1 systems.
3 An Algorithmic Regularity Lemma with Low Query Complexity
Throughout this section, denotes a finite Abelian group , where are primes for all and may not be distinct, and denotes a primitive root of unity, where . We start by proving Green's regularity lemma for Finite Abelian group using thus Green's zero-radius Bohr neighbourhood [Gre05] while the proof in [Gre05] allows non-zero radius for Bohr neighbourhood. Note that the original proof of [Gre05] holds for any Abelian groups, while for the sake of an efficient algorithm we first reproduce the proof of the Regularity lemma for Abelian groups of constant torsion (that is is a constant). The proof is presented in Appendix B.
Theorem 3.1 (Green's regularity lemma [Gre05]). Let and . There exists a normal subgroup with cosets such that
- H can be derived on making Tower( , ) many fixing; that is, the pseudo-codimension (see Definition A.25) of H is at most Tower( , ).
• for all but -fraction of the cosets of , the functions is -regular, where
where with .
The proof of this theorem is given in the appendix (Section B).
Before moving to the main statement, we will also describe some preliminaries and facts about Fourier structure of the functions on Abelian group which will be main tools of our algorithm.
3.1 Fourier structure of restriction and truncation
To prove Theorem 3.10, we need the relation between the Fourier coefficients of the restricted function and the truncated function, as the Algorithm 1 works with the truncated function instead of the restricted function. We define the restricted function and the truncated function first.
Definition 3.2 (Restricted function). Let be a finite Abelian group and be a subgroup. The restricted function , with respect to , is defined as
for all x in A.
Definition 3.3 (Truncated function). Let be a finite Abelian group and be a subgroup. The truncated function, with respect to , is
Relation between restricted and truncated function
For a function , we will try to understand the Fourier structure of the restricted and the truncated function.
We denote by the group of characters of . For , recall that the Fourier coefficient with is given by
Similarly, for , we have
For , define restriction of to by , for all in .
The annihilator of A is defined as
Observe that
where , is a group homomorphism. Additionally, we have
Lemma 3.4. The map res is surjective and .
Proof. It is straightforward that . Conversely, if is trivial, then for all , so . Surjectivity also follows directly.
As a corollary of the above lemma, we get the following:
Corollary 3.5. .
We will need the following theorem in the sumset paper.
Theorem 3.6. For every , we have
Proof. By definition,
Since for , this becomes
Rewriting,
Since restricted to is ,
The following theorem gives the annihilator connection.
Theorem 3.7. The function is constant on cosets of .
Proof. If satisfy , then . Hence and lie in the same coset of . Also, observe that, from Theorem 3.6, we have
Corollary 3.8. For any and any with , we have
3.2 Algorithmizing the Regularity Lemma (Theorem 3.1)
In this section, we present an algorithmic version of the regularity lemma (Theorem 3.10) for functions over an Abelian group, whose both query and time complexity are independent of the order of the group. We work in the standard query model. The input is the Boolean function , which is the indicator function of the set , where is a finite Abelian group. The function is not known to the algorithm. Instead, it can query an oracle that, on input , returns the value . The complexity of an algorithm is measured by the total number of oracle queries it makes, referred to as its query complexity. We first state and prove Lemma 3.9, before proving Theorem 3.10.
From Green’s regularity lemma on Abelian group it follows that given any arbitrary subsets , and error parameter , one can get a partition of of size Tower such that is almost regular on all of the sets of the partition. The following lemma (Lemma 3.9) gives us an approximation, of the set by removing all cosets that are not -regular, along with those which have density below a threshold . Consequently, every remaining coset is both dense and -regular.
Lemma 3.9 ( : A density-capturing representation of ). Given and , there exists a subgroup of pseudo-codimension at most
and a set such that
-
-
for every coset of , or ;
-
for every coset for which , the restricted function is -regular.
We call a density-capturing representation of A.
Proof. Let be a subgroup of pseudo-codimension (Definition A.25) at most Tower( , ) that we get by applying Green's regularity Theorem 3.1. Also let be the cosets of where . Recall the definition of the density of a subset in , (Definition A.12) and the density of a subset in the subgroup , (Definition A.13). It is also guaranteed by Theorem 3.1 that for all but -fraction of , the function is -regular. Define disjoint subsets , where each , as follows:
• If is not -regular, then ;
• If , then ;
• Otherwise, set .
Now we define as
Note that is -regular for all and by the construction of it follows that or .
Claim: .
Let us define two sets and in the following way:
Then,
Therefore,
where the inequality in the second last line follows from the following facts:
• , as at most many cosets are non-regular,
• for , , and
• for , and as 's form a partition of .
Now we are ready to state the algorithmic version of Green's regularity lemma for finite Abelian groups, Theorem 3.10.
Theorem 3.10 (Algorithmic version of Green's regularity lemma for finite Abelian groups). There is an algorithm ConstDT(A, , ) that, given query access to a subset , a regularity parameter , and a density threshold , runs in time and query complexity bounded by
With probability at least 9/10, it outputs an probabilistic oracle and a character decision tree for a subgroup of pseudo-codimension
Tower , together with a structural subset such that:
-
-
every coset K of H satisfies or ;
-
for every coset K with , the restricted indicator function is -regular.
The number of cosets of is bounded by . The query complexity remains independent of the size of the group .
Proof Of Theorem 3.10
Proof. Algorithm 1 takes blackbox access to a set as input, along with regularity parameter and density threshold . At any given point of the algorithm let be the subgroup generated by the nodes of the tree and the leaves are labelled by is -regular, where
where with .
Note that the algorithm uses the truncated function (Definition 3.3) in the process. Using Lemma 3.6 (see Section 3.1), we can relate the coefficients of the restricted function (Definition 3.2) with the truncated function (Definition 3.3). We will analyze the steps of Algorithm 1 now.
Step 2 of Algorithm 1: In Step (2), the algorithm applies List Correction for Abelian groups, Algorithm 6 repeatedly to find a subset A of G that is -regular. By Green's regularity lemma for finite Abelian groups (Theorem 3.1), Step 2 of Algorithm 1 terminates after at most many steps. Let the total number of cosets at a certain stage be M. If number of survived cosets is , the algorithm moves to Step 3.
Algorithm 1 A constructive Regularity lemma for Abelian groups
Input. Given query access to , regularity parameter , density threshold .
Output. An probabilistic oracle , a character decision tree with as described in Lemma 3.9.
ConstDT( )
- Initialization: Initialize the decision tree to contain one leaf labelled by . Define,
- for
(a) Let , where , denote the query oracles for the characters used by the decision tree at the current stage. These characters determine the cosets corresponding to the leaves of the decision tree. The -th leaf is labelled by the function .
(b) For each coset , call,
is the truncated function (Definition 3.3) on coset . To simulate query access to on an input , the algorithm queries the character oracles to determine the coset containing . Discard from any character that is constant on , since such a character does not witness non-regularity.
(c) For each and for each , call,
estimate the magnitude of up to additive error with confidence . If the estimated magnitude is less than , then remove from .
(d) If for at least -fraction of the set list go to step-3.
(e) Let O be the collection of the oracles that describes of the internal nodes. For each non-empty do the following:
-
Choose the oracle for from . Check, whether the candidate character is generated by the characters represented by , with failure probability at most .
-
If not, then we add the oracle of , to . Add to and split all nodes at the current stage according to the restrictions .
(f) Repeat Step-2.
- For each leaf node, corresponding to some cosets (say) , estimate upto an additive error of with confidence .
- If the , set the function associated with the leaf node to be identically 1 function.
• Else, set it to be the identically 0 function.
- Define the oracle .
• Step 2(b) and 2(c) of Algorithm 1: In the first iteration, Step 2(b) of Algorithm 1 runs List Correction for Abelian groups, Algorithm 6 on the function . The goal of this stage is to detect a non-regular Fourier-coefficient. Usually finding one Fourier character is quite costly, but we do not need it exactly, we can go away by learning the Fourier character implicitly also. That's why, the output of List Correction for Abelian groups, Algorithm 6 gives a list of oracles to the non-regular Fourier coefficient. In other words, it gives the description of those Fourier character as an implicit description in terms of oracle. Among the heavy Fourier characters returned by the List Correction algorithm, we ignore those characters that are constant on the subgroup , since such characters do not witness failure of regularity.
Here we are running the Algorithm 6 on the truncated function . Note that using Theorem 3.6 from the previous subsection 3.1, the Fourier coefficients of the restricted and truncated functions satisfy,
where M is the number of cosets of H at the current stage. Consequently,
Therefore, Algorithm 6 is called on with threshold in order to obtain a list of candidate characters corresponding to non-regular Fourier coefficients of the restricted function. One can also simulate the query of using the query access of .
With the help of these oracles, one can query the value of those characters (at certain inputs), which corresponds to the non-regular or heavy coefficients of the function . In Step 2(c), it estimates the corresponding Fourier coefficients of . If the estimate is less than , then remove it from the list, else it keeps in the list. We retain only those heavy characters that vary non-trivially on , as these correspond to the Fourier coefficients relevant to the -regularity condition.
Next it chooses one heavy character from the list in Step 2(e), and splits all the nodes of the current decision tree by fixing that character. So it splits each nodes into almost many nodes at this stage. This step of the algorithm continues till it reaches a point where the number of survived cosets (heavy Fourier coefficient corresponding to the cosets) is at most times the total number of cosets at that stage.
So, in the first iteration, Step 2(b) of Algorithm 1 takes error parameter and confidence . It makes many queries at this stage, by Theorem C.15. At the stage of Step 2(b), if the loop continues, number of cosets that has survived is . So, at the stage of Step 2(b), if the loop continues, number of cosets that has survived is . Therefore, the error at the iteration is . Number of queries made at this stage is
Therefore, at the final stage of Step 2(b), total number of queries made is
Now, the total number of cosets involved in the whole process in the worst case is again .
Note that there are various other randomized procedures are going in the next steps of the algorithms and when fixing for the worst case scenario we have to take account of all such randomized procedures. But here is an important observation at each coset only a constant number of randomized procedures are invoked, namely List Correction, Fourier-coefficient estimation, and the independence test, together with the final density estimation in Step 3. We absorb this constant number of randomized calls into the constant hidden in the tower bound. Thus, assigning failure probability at most to each such randomized call and taking a union bound over all calls still gives an overall failure probability at most 1/10.
Hence, taking confidence at each step works.
Step 2(c), number of queries made is equal to on reusing queries.
• Step 2(d) of Algorithm 1: Recall the relation between the restricted and the truncated function (Section 3.1). Upon termination at Step 2(d), the algorithm ensures that for at least a -fraction of the cosets , the list . Since (see Appendix C) is guaranteed to return the matrix , which columns represent the values of those characters (at sufficiently many points)) with Fourier coefficients larger than , implies that:
By definition, this means the restricted subfunction is -regular for all but an -fraction of the cosets. For the -fraction of cosets that did not satisfy this, their lists were not empty, but the loop terminated because the threshold was met; these non-regular cosets will be implicitly handled in the next step.
• Step 2(e) of Algorithm 1: Since is the collection of the oracles that describe the internal nodes, we can think of as a matrix, whose columns denote the value of the characters evaluated at certain points, each distributed uniformly and independently in , which the oracles inside output on querying. We proceed along the lines of the proof of correctness of Algorithm 7. Let the matrix be a matrix at the iteration; that is, its column denotes the values of the character evaluated at many points, each distributed uniformly and independently in , which the oracle outputs on querying. So, the columns are labelled by , which correspond to some (note that the s are not known). The th entry of is in .
Now, let us consider all the group automorphisms on which are formed by only choosing the images of the elements in , which are pseudo-independent by construction. Then, by the property of group automorphism, the images of any other element that are not pseudo-independent from are defined automatically. That is, for an element , let , with invertible in be such that . If is a group automorphism on , then .
Proceeding along the lines of the proof of correctness of Algorithm 7, the probability that an is chosen which is pseudo-dependent on , is . So, for a large enough choice of , a pseudo-independent is chosen with probability , which is whenever a large enough is chosen. We use a brute-force algorithm to do this. Note that, since the number of cosets that have survived in the iteration is , the error at the iteration is at most . Therefore, , and , from Algorithm 6 and 7.
Step 3 of Algorithm 1: For a coset ,
Also,
So, estimation can be done in the same way as -estimation (see Section A.8). With error and confidence , this can be done using many queries.
In this step, the algorithm computes an estimate of the density of A for each leaf, that is, coset , up to an additive error of . We consider the following two cases:
• Case 1: If the estimate of the true density is less than , then with high probability
The algorithm sets on this coset, which means . This satisfies the condition .
• Case 2: If the estimate of the true density is at least , then with high probability
The algorithm sets on this coset, which means . This guarantees
Step 4 of Algorithm 1: The output oracle is defined as . Since acts as the indicator function of the union of dense, regular cosets, the function is probabilistic oracle for the indicator function of the set defined in Lemma 3.9.
By the exact same counting logic proven in the claim of Lemma 3.9, removing the non-regular cosets (at most an -fraction) and cosets discarded by the density test (density ) bounds the total discarded density by . Thus, the oracle is correct.
3.3 Query and time complexity of Algorithm 1
Note that Step 2(b), 2(c), and Step 3 of Algorithm 1 contribute to the query complexity of the algorithm. The correctness of this algorithm follows from the proof of correctness of List Correction for Abelian groups, Algorithm 6 (Section C), Coefficient estimate algorithm 7 (Section D), and from the proof of Green's regularity Lemma 3.1 (Section B).
By Theorem 3.1, Step 2 of Algorithm 1 terminates after at most many steps. Let the total number of cosets at a certain stage be . If number of survived cosets is , the algorithm moves to Step 3.
• Queries made at the final stage of Step 2(b) is
Now, the total number of cosets involved in the whole process in the worst case is again . Taking confidence at each step works, as stated earlier.
• Step 2(c), number of queries made is equal to on reusing queries, where .
• In Step 3, number of queries made is equal to on reusing queries, where .
Therefore, total queries made is equal to
where .
The time complexity of Algorithm 1 is also at most poly(Tower( , ), ), where the tower-term comes from the depth of the character decision tree constructed in Green's regularity lemma (Theorem 3.1), exactly like the case of query complexity. It is also completely independent of the order of the group G.
4 Testing linear configuration freeness
The primary objective of this section is to establish a constructive framework for testing freeness of linear configurations in finite Abelian groups of constant torsion, leading to the proofs of Theorem 2.2 and Theorem 2.6.
The core subroutine for all our testing algorithms will be the efficient regularity algorithm CONSTDT (Algorithm 1). We demonstrate that the subset of A, satisfying the properties of Lemma 3.9 and produced by CONSTDT (Algorithm 1) is free of the target linear configuration provided its density is sufficiently small. This structural guarantee is first proved for a single linear configuration in Section 4.1 and then extended to matrix linear configuration of complexity-1 systems in Section 4.2.
4.1 A single linear equation
Let with coefficients . We define the configuration density operator for functions and subsets as:
Our non-degeneracy hypothesis requires every coefficient to be a unit modulo the torsion . This algebraic condition ensures that the relevant character maps on remain bijective, even in the presence of zero divisors within .
Lemma 4.1 (Counting lemma for a single equation). Let and suppose at least three of the coefficients are units in . Let , and suppose some function , whose corresponding coefficient is a unit, is -regular. Then
The same uniform bound holds for the inhomogeneous equation , for any lying in the image of .
Proof. Expanding the solution indicator into a character sum over the dual group yields
where , at least one is a unit, one coordinate is uniquely determined by the remaining variables, so the number of solutions in is exactly ; hence .
The principal term corresponding to the trivial character equals . For the remainder of the sum, we isolate the regular index along with two further unit indices , bounding all other factors trivially by :
For any unit , the mapping is an automorphism of . Thus, by Parseval's identity, , which matches the error bound . For the inhomogeneous equation, each non-principal term simply picks up a unimodular phase , leaving the absolute value estimate unchanged.
The above counting lemma, a standard result in additive combinatorics, can be interpreted as stating that if a set is -regular, then the number of solutions to a linear system is close to the number one would expect if the elements of a set of the same density were chosen independently at random. Since ConstDT (Algorithm 1) guarantees that the restriction of to each regular coset is -regular, the density of solutions within such a coset is approximately , where denotes the density of the set in that coset and is the number of variables in the linear configuration. In the proof below, we choose . Consequently, the error term is too small to account for the disappearance of all solutions. Thus, the single solution that we initially assume exists must, in fact, expand into a large cluster of solutions within the coset.
Theorem 4.2 (Algorithmic removal for a single equation). Fix and let with and . For every target tolerance , there exists a threshold , independent of , such that the following holds for every finite Abelian group with constant torsion . Given query access to , Algorithm 2 requires at most
queries and time, both independent of the minimum number of elements required to generate , as well as . With probability at least 9/10, it outputs an exact oracle for a subset satisfying such that, whenever , the set contains absolutely no solutions to . One may explicitly take .
Algorithm 2 CONFIGREMOVAL(A, L, ) (single equation)
Require: query access to ; equation with and for all ; global error parameter .
Ensure: an exact oracle and character decision tree for a set .
1: Set the density threshold .
2: Set the target local regularity parameter .
3: .
▷ Run the constructive regularity routine
4: return .
Proof of Theorem 4.2. The query/time bounds and the existence of follow from Theorem 3.10 evaluated at and . Under these parameters, , and the constant torsion updates all structural dependencies to the constant . By Theorem 3.10, the discarded volume satisfies .
It remains to certify solution-freeness. Suppose for contradiction that there exists a valid solution to , with components . By Theorem 3.10, each underlying coset carries and the restricted indicator function is -regular.
Shifting variables to the core subgroup via , the constraint translates to the inhomogeneous equation
where precisely because is a solution (so , since ). Let be the indicator function of on pulled back to . By construction, and is -regular on . Because , the coefficients remain coprime to the internal torsion of . Applying Lemma 4.1 inside the subgroup yields:
since . The number of solutions counted here is at least . Every such structural tuple lies in and satisfies . Embedding this back into the global group yields the density bound:
Since , we may take . Setting our global threshold directly contradicts the hypothesis . Therefore, is completely solution-free.
Observe that testing triangle-freeness in subsets of the vector space is a special case of the above theorem, obtained by taking , , and . A polynomial dependence on for testing triangle-freeness in this setting is already known [FL17]. Our result substantially generalizes this by showing that triangle-freeness, as well as the absence of a broad class of linear configurations, can be tested in arbitrary finite Abelian groups of constant torsion.
Our contribution yields a query-efficient, constructive, and dimension-independent tester under the constant-torsion assumption. The hypothesis that for every coefficient is also structurally necessary. For example, the equation defining a 3-term arithmetic progression,
contains the coefficient -2, which is invertible precisely when is odd. This coincides with the well-known degeneracy of 3-term arithmetic progressions in characteristic 2.
4.2 Complexity-1 systems
We now treat systems of equations where is an integer matrix, whose number of pseudo-independent (Definition A.17) rows is at most . To proceed via basic Fourier methods, the system must satisfy two fundamental non-degeneracy conditions.
Definition 4.3 (Determinantal non-degeneracy, Definition 2.4, restated). The -th determinantal divisor is the greatest common divisor of all minors of . We require the matrix to be coprime to the group torsion: .
The determinantal non-degeneracy condition ensures that can be transformed into using invertible row and column operations over . Consequently, the solution space can be bijectively parameterized by through integer-linear forms . In particular, the total number of solutions is exactly .
To establish the counting lemma, we also require a suitable Cauchy–Schwarz complexity-1 condition on these forms. The usual complexity condition, formulated in terms of linear spans, does not directly provide the surjectivity properties required by our argument over general finite Abelian groups. In particular, noncontainment in the Q-linear span does not imply that . This difficulty arises because rational linear independence need not be preserved modulo the torsion of the group.
We therefore introduce a torsion-compatible version of Cauchy–Schwarz complexity-1, which explicitly guarantees the required surjectivity of the coordinate forms on the relevant common kernels. This allows the generalized counting lemma to be established using the Cauchy–Schwarz inequality and first-order Fourier analysis.
We therefore use the following torsion-compatible version of Cauchy–Schwarz complexity-1. The definition directly encodes the surjectivity property required by the two Cauchy–Schwarz steps. Over groups of prime exponent it reduces to the usual complexity-1 condition over the corresponding finite field.
Definition 4.4 (Torsion-compatible Cauchy-Schwarz complexity-1). Let be the coordinate forms parameterizing the solution space of . We say that has Cauchy-Schwarz complexity-1 if, for every , there exists a partition such that, for , and, .
Remark 4.5. The coefficient-vector formulation in Definition 4.4 implies the required surjectivity directly. Indeed, fix and let be the vector guaranteed by the definition. For any , define . For every , , since and . Hence . On the other hand, . Therefore .
Moreover, the same argument holds verbatim for every subgroup , since . Consequently, the torsion-compatible complexity-1 condition is inherited when the forms are restricted from to any subgroup .
When is prime, this condition is equivalent to the usual linear-algebraic condition . Indeed, over a field the latter condition is equivalent to the existence of a vector annihilating all , , while satisfying ; rescaling gives . Thus, Definition 4.4 recovers the usual Cauchy-Schwarz complexity-1 condition over fields.
Using the above definition, we will show that the configuration density operator is completely controlled by the uniformity of the Fourier spectrum.
Lemma 4.6 (Counting lemma for matrix systems). Let be a matrix that has number of pseudo-independent (Definition A.17) rows at most , satisfies Definition 2.4, and has complexity-1. If the functions are each -regular, then
The same bound holds identically for inhomogeneous systems provided .
Proof. By Definition 2.4, the parametrization forms a perfect bijection from to the kernel . Thus, the configuration density simplifies to:
We decompose each function as , where is the mean component and is a mean-zero error term bounded by . By our regularity assumption, . Expanding the product generates terms indexed by subsets , where the base case yields the principal term . Since , it suffices to show that
satisfies for every non-empty .
Fix a non-empty subset and pick an index ; for notational convenience set for , so that . Let be the index partition provided by the complexity-1 condition (Definition 4.4), and for define the subgroup
By Definition 4.4, . In particular, the restrictions of to and , and hence itself, are surjective onto .
First Cauchy–Schwarz (eliminating ). The factor is invariant under translation by , so writing and using ,
Second Cauchy–Schwarz (eliminating ). For each fixed , the factor
is invariant under translation of by ; applying the Cauchy–Schwarz inequality in exactly as above (and averaging over ) leaves only the factor:
where , , .
Since the restrictions and, are surjective homomorphisms, and are uniform on when and are uniform on and , respectively. Likewise, is surjective, so is uniform on . Since are independent, so are . By the surjectivity noted above, is uniform on as ranges over , likewise over , and is uniform on ; moreover are independent. Hence
where the identity follows by expanding each factor into its Fourier series: the averages over , , and annihilate, via the orthogonality of characters, every term in which the four characters do not all coincide, leaving exactly the diagonal contribution .
Finally, since is mean-zero, , and by Parseval's identity, (Theorem A.8),
so that . Summing over all terms yields our uniform error bound. Because these steps rely purely on the bijective variable substitution, the orthogonality of characters, and Parseval's identity, the inequality holds over any finite Abelian group. The inhomogeneous case follows identically: shifting each variable by a particular solution multiplies each Fourier coefficient by a unimodular phase, leaving every absolute-value estimate unchanged.
Algorithm 3 CONFIGREMOVAL(A, M, ) (complexity-1 system)
Require: query access to ; matrix , whose number of pseudo-independent (Definition A.17) rows is at most , with , complexity-1, and ; global error parameter .
Ensure: an exact oracle and character decision tree for a set .
1: Set the density threshold .
2: Set the target local regularity parameter .
3: .
4: return .
Theorem 4.7 (Algorithmic removal for complexity-1 systems). Fix . Let be a matrix, whose number of pseudo-independent (Definition A.17) rows is at most , is of complexity-1, and . For every target tolerance , there exists a threshold , independent of , such that for every finite Abelian group with constant torsion , Algorithm 3 makes at most
queries and time, both independent of and . With probability at least 9/10, it outputs an exact oracle for a subset satisfying such that, whenever , the set contains absolutely no solutions to . One may explicitly take .
Proof. The structural framework matches the proof of Theorem 4.2, substituting Lemma 4.6 in place of Lemma 4.1. Our choice of regularity parameter ensures that the spectral error component evaluates to exactly half the main density term , satisfying the strict positivity lower bound required by our counting lemma. Invoking CONSTDT at parameters limits our discarded set size to with the required tower complexity torsion scaling as .
Suppose for contradiction that a solution to exists with components falling into cosets . Restricting the system to these cosets isolates an inhomogeneous system within the subgroup , where the shift vector is . This restricted system inherits our complexity-1 structure and satisfies since . Because our pulled-back indicator functions are -regular with , Lemma 4.6 guarantees that the system contains at least
solutions in . Embedding this count back into the global group gives the density lower bound:
Since , we may take . Choosing our threshold directly contradicts the structural hypothesis .
Theorem 4.7 covers genuine multi-equation systems , and both non-degeneracy conditions are essential. The co-primality condition ensures that the solution set is well-behaved: without it, the count of solutions is distorted by the interaction between the matrix and the group structure, and the main density term in the counting lemma is no longer correct. The same condition appears in the work of Král–Serra–Vena [KSV12]. The complexity-1 condition marks the natural limit of our method. Our arguments rely only on Fourier coefficients, and complexity-1 systems are precisely those whose solution counts are controlled by them. For systems of higher complexity, such as 4-term arithmetic progressions, small Fourier coefficients no longer guarantee the expected number of solutions, a fact already observed by Green [Gre05]. Removal lemmas for such systems are known via hypergraph methods [Sha10, KSV12], but these proofs are purely existential and give no query-efficient or constructive guarantees. In this sense, our result covers the full range of systems that can be handled constructively by basic Fourier analysis.
5 Approximate image counting for a general linear form
In this section, we ask how well one can estimate the size of the image of a set under a linear map. Given query access to a subset , we want to estimate the density of its image under a single linear form, , and more generally under a matrix system, , where has at most pseudo-independent (Definition A.17) rows. As before, we want the number of queries to be independent of the group's size . As before, we want the number of queries to be independent of the group's size . A known lower bound rules out estimating the size of the genuine image with a bounded number of queries, so instead we slightly perturb into a dense, structured subset . The regularity partition produced by Algorithm 1 then allows us to estimate the image density inside the small quotient . It also yields an approximate membership oracle in the single-form case and an exact membership oracle for the matrix-system case.
Along the way, a natural contrast emerges with the removal results of Section 4: single forms are handled by a second-moment (variance) argument, while matrix systems require a first-moment argument and hence the complexity-1 hypothesis.
5.1 A single general linear form
In this subsection, we study the image sets generated by evaluating a single general linear form across our subset. Let us first define a linear image set.
Definition 5.1 (Linear image set). For integers and the form , the image set of under is
For , this is the sumset .
The genuine image cannot be estimated to any nontrivial accuracy with -independent query complexity, so we estimate the density of the image of a density-capturing perturbation , exactly as in Lemma 3.9.
Remark 5.2 (Running hypothesis for this subsection). We assume every coefficient is a unit modulo the torsion, for all . Hence each map an automorphism of , which is what the Parseval steps below require in the presence of zero divisors. No complexity-1 assumption is needed: at the second moment closes for all .
The covering lemma
We now show that if the set has sufficiently large density on each relevant regular coset, then the image of the linear form covers almost all of the corresponding output coset. Its proof is the second-moment computation: the mean of the representation count over an output coset is , the variance is at most , and Chebyshev finishes.
Lemma 5.3 (Image covering for a single form). Let and for all . Let be such that, for every , the restriction is -regular and . Then, writing ,
Proof. Let be the restriction translated to , , so and is -regular on . For let
count the representations landing in the output coset at offset , and set . Using and with ,
Thus , as a function of , has Fourier coefficients . Its mean is the term, , and by Parseval (Theorem A.8),
Fix . Since is a unit, , so by regularity; and for every . Hence, bounding all factors past the second by 1,
where because is a unit, so is an automorphism of . By Chebyshev,
and .
The induced form on the quotient
Let and let be the form induced by , (well-defined as ). Because each is a unit, and the fibres of over have size exactly , so output cosets are precisely cosets of indexed by .
Writing for the surviving leaves of CONSTDT, each surviving coset is -regular and has density at least . Applying Lemma 5.3 with density parameter , we obtain that covers all but an fraction of every coset in
and lands in no other coset. Hence,
The right-hand side is a finite computation in the quotient , whose size is independent of and of ; the iterated sum is formed in in time.
The algorithm
Algorithm 4 APPROXLINIMAGE(A, L, θ) (single linear form)
Require: query access to ; form with for all ; accuracy .
Ensure: a value and a character-decision-tree oracle .
1: Set and .
So and
2: ; let be the surviving (regular, density ) leaves of .
3: Compute by iterated addition in the quotient.
4: Build : on input , use to read the coset and output 1 iff .
5: return and .
Theorem 5.4 (Approximate image counting for a single form). Fix , an integer , and a form with for all . For every and every finite Abelian with constant torsion , given query access to , Algorithm 4 makes
queries and time, both independent of and , and with probability at least 9/10 outputs a value and an oracle such that, for a density-capturing perturbation with ,
and is a -oracle for the image set .
Proof. Theorem 3.10 (CONSTDT) returns, at parameters , the oracle , the tree , and the surviving leaves , within the stated complexity (here ); the density-capturing set satisfies by Lemma 3.9. By Lemma 5.3, applied with density parameter , every coset of is covered by up to an fraction, and meets no coset outside . This gives , where .
Moreover, the oracle outputs 1 precisely on the cosets indexed by . Therefore, . Thus, is an approximate membership oracle with error at most .
5.2 Approximate image counting for a linear system
We now generalise Section 5.1 from a single form to a matrix , whose number of pseudo-independent (Definition A.17) rows is at most , estimating the density of the image
Unlike the single-form case, this requires genuine restrictions on , and for a structural reason: at the second-moment argument of Lemma 5.3 is unavailable, because the Fourier variance over is and the fibres of have size , so Chebyshev blows up. We therefore route through the first moment (a generalised Von Neumann inequality), which forces the Cauchy–Schwarz complexity-1 hypothesis but, being an bound over targets, yields exact covering of each reachable output coset.
Hypotheses we will use for the rest of the section. Let be a finite Abelian group with constant torsion . Also let , and (the -th determinantal divisor, i.e. the gcd of all minors of ) be coprime to . Write for the counting operator with right-hand side .
Definition 5.5 (Complexity-1 over ). Let be the coordinate forms of Lemma 5.6. We say that has Cauchy-Schwarz complexity-1 over if these forms satisfy the torsion-compatible complexity-1 condition of Definition 4.4.
This condition guarantees the surjectivity properties required by the two Cauchy–Schwarz steps and is preserved when the forms are restricted to any subgroup , as established in Remark 4.5.
The solution space
Lemma 5.6 (Parametrisation). There are integer-linear forms such that is a bijection from onto . Consequently is surjective, for every , and
where is any particular solution, depending Z-linearly on .
Proof. By the Smith normal form there are with , and is coprime to , so each is a unit in . Replacing by gives . As integer matrices invertible mod , and act as automorphisms of and . Writing , becomes , i.e. ; the free variables then give with . Surjectivity of and the fibre count follow from , and the inhomogeneous formula is the coset version.
The generalised covering
For a function on a finite Abelian group , we will use the fourth moment of its Fourier coefficients, , which admits the physical-side expression
as one checks by expanding each factor into characters and using orthogonality. In particular, for mean-zero with , .
Lemma 5.7. Suppose has complexity 1 over . Then for all with and every ,
Proof. Shifting each by reduces to (each shift multiplies the Fourier coefficients of by unimodular phases, so the quantities below are unchanged), so we bound . Fix ; relabel so that , and let be its partition. For put
We claim that: . By Definition 5.5, there exists such that for every , . For any , set . Then and . Consequently, . In particular, is surjective onto .
First Cauchy–Schwarz (eliminate ). The factor is -invariant, so with ,
For , .
Second Cauchy–Schwarz (eliminate ). For fixed the factor is -invariant; applying Cauchy–Schwarz in (and over ) as above leaves only the factor:
where . Expanding,
By the Claim, is uniform on as ranges over , and likewise over ; and is uniform on since is surjective. Hence the right-hand side is
by the identity stated at the start of this subsection. As was an arbitrary index, the minimum over follows.
Corollary 5.8 (Generalized counting lemma). Suppose has complexity 1 over . If are each -regular, then for every ,
Proof. Write with and mean-zero, , . Expand over the subsets . The term is (the constant functions give the full average, and by Lemma 5.6). Each has a factor ( ); setting the other factors to 1 and applying Lemma 5.7 together with the moment bound bounds that term by . Summing the at most terms gives the claim.
Covering, the quotient image, and the algorithm
Let be the subgroup returned by CONSTDT, , and let be the induced map (well-defined as , which holds because is coprime to , where denotes the torsion of ). Output cosets are cosets of in , indexed by . Let be the regular, density leaves of CONSTDT.
Lemma 5.9 (Exact covering). Suppose has complexity 1 over and the regularity parameter satisfies . Then for every , the entire output coset is contained in ; and meets no output coset outside . Hence
Proof. Fix and a target in the coset . Restricting the input coordinates to the dense regular cosets and pulling back to gives functions on with , each -regular; the restricted system in inherits complexity 1 over , where denotes the torsion of . By Corollary 5.8 applied over , uniformly in ,
since . Thus has a representation in , proving full covering; and lands only in cosets with . Counting cosets times and dividing by gives (6).
Algorithm 5 APPROXMATRIXIMAGE(A, M, )
Require: query access to ; matrix , whose number of pseudo-independent (Definition A.17) rows is at most , with , , and complexity 1 over ; accuracy .
Ensure: A value and a -oracle for the image set .
1: Set and . So and so (exact covering) and
2: ; let be the surviving leaves of .
3: Compute by evaluating on in the quotient.
4: Build : on input , read its coset from and output 1 iff .
5: return and .
Theorem 5.10 (Approximate image counting for matrix linear system, Theorem 2.11, restated). Fix , whose number of pseudo-independent (Definition A.17) rows is at most , with , , and complexity 1 over . For every and every finite Abelian with constant torsion , given query access to , Algorithm 5 makes
queries and time, both independent of and , and with probability at least 9/10 outputs a value and an oracle such that, for a density-capturing perturbation with ,
and is an oracle for the image set .
Proof. Computing touches at most
tuples, independently of . Theorem 3.10 (CONSTDT) supplies , , and within the stated complexity , with by Lemma 3.9. The parameter choice gives , so Lemma 5.9 applies: exactly (the only losses are the perturbation and the failure of CONSTDT). Oracle correctness is the same coset description: iff .
Theorem 2.11 is the matrix analogue of Theorem 5.4 for systems satisfying the complexity-1 hypothesis. In particular, it applies to suitable single equations with . The case , , and is handled separately by Theorem 5.4, since the corresponding two-variable system does not satisfy the complexity-1 condition. A few points are worth noting. First, the covering here is exact (Lemma 5.9), with no analogue of the loss in the single-form case; this is because Corollary 5.8 holds uniformly over all targets , rather than only on average. Second, complexity 1 is the natural limit of our method: for systems of higher complexity, small Fourier coefficients no longer control the number of solutions, as observed by Green [Gre05], and the known removal and counting results for such systems go through hypergraph methods [Sha10, KSV12], which give no constructive guarantee. Third, the coprimality condition plays the same role for the matrix that pseudo-independence (Definition A.17) plays for a single form; without it, the solution count, and with it the main term of Corollary 5.8, is no longer correct. Finally, as in Section 5.1, it is the image of the perturbation that we estimate, not the genuine image : the latter cannot be estimated to any nontrivial accuracy with a number of queries independent of , already at , by the lower bound of [DNS22].
AI use statement. All mathematical ideas and proofs presented in this work are the authors' own. AI tools were used solely for proofreading and editing to improve the readability of the paper. The authors take full responsibility for the content of the submitted manuscript.
References
[AFSW25] Amir Abboud, Nick Fischer, Ron Safier, and Nathan Wallheimer. Recognizing sumsets is NP-complete. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4484–4506. SIAM, 2025.
[CDD 24] Sourav Chakraborty, Swarnalipa Datta, Pranjal Dutta, Arijit Ghosh, and Swagato Sanyal. Structure of sparse Boolean functions over Abelian groups, and its application to testing. arXiv preprint arXiv:2406.18700, 2024.
[DGK 25] Swarnalipa Datta, Arijit Ghosh, Chandrima Kayal, Manaswi Paraashar, and Manmatha Roy. Testing isomorphism of Boolean functions over finite Abelian groups. In Alina Ene and Eshan Chattopadhyay, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2025), volume 353 of LIPIcs, pages 66:1–66:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025.
[DNS22] Anindya De, Shivam Nadimpalli, and Rocco A. Servedio. Approximating sumset size. In Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2339–2357. SIAM, 2022.
[FL17] Jacob Fox and László Miklós Lovász. A tight bound for Green's arithmetic triangle removal lemma in vector spaces. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1612–1617. SIAM, 2017.
[GR07] Ben Green and Imre Z. Ruzsa. Freiman's theorem in an arbitrary Abelian group. Journal of the London Mathematical Society, 75(1):163–175, 2007.
[Gre05] Ben Green. A Szemerédi-type regularity lemma in Abelian groups, with applications. Geometric and Functional Analysis (GAFA), 15(2):340–376, 2005.
[GS17] Lior Gishboliner and Asaf Shapira. Removal lemmas with polynomial bounds. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 510–522, 2017.
[GT10a] Ben Green and Terence Tao. An arithmetic regularity lemma, an associated counting lemma, and applications. In An Irregular Mind: Szemerédi is 70, pages 261–334. Springer, 2010.
[GT10b] Ben Green and Terence Tao. Linear equations in primes. Annals of Mathematics, 171(3):1753–1850, 2010.
[KSV12] Daniel Král', Oriol Serra, and Lluís Vena. On the removal lemma for linear systems over Abelian groups. European Journal of Combinatorics, 34:248–259, 2012.
[RS78] Imre Z. Ruzsa and Endre Szemerédi. Triple systems with no six points carrying three triangles. Combinatorics (Keszthely, 1976), Colloq. Math. Soc. János Bolyai, 18:939–945, 1978.
[Ruz09] Imre Z. Ruzsa. Sumsets and structure. Combinatorial Number Theory and Additive Group Theory, pages 87–210, 2009.
[Sha10] Asaf Shapira. A proof of Green's conjecture regarding the removal properties of sets of linear equations. Journal of the London Mathematical Society, 81:355–373, 2010.
[Sze75] Endre Szemerédi. Regular partitions of graphs. Technical Report STAN-CS-75-489, Stanford University, Department of Computer Science, 1975.
A Preliminaries
Throughout this paper, denotes a finite Abelian group , where are primes for all and may not be distinct, and denotes a primitive root of unity, where .
A.1 Basics on Fourier Analysis over G
Let us define the characters of G first.
Definition A.1. (Character) For , where are primes, a character of the group is a homomorphism of , that is, satisfies the following: for all we have .
Equivalently, a character of G is of the form
where and is a character of and is defined by
Thus for any we can define a corresponding character of as that on input is defined as
where .
Now let us look at some properties of characters.
Lemma A.2. Let be a character of G. Then,
-
for all .
-
for all .
-
For any character of , where , .
-
for all .
Now let us define the dual group of G.
Definition A.3. (Dual group) The set of characters of G forms a group under the operation and is denoted by , where and are characters of G. is called the dual group of G.
The following theorem states that G is isomorphic to its dual group.
Theorem A.4. , that is and are isomorphic to each other.
Let us look at the definition of the Fourier transform for functions on G.
Definition A.5. (Fourier transform) For any , with primes, and any function , the Fourier transform is
where .
Remark A.6. The Fourier transform of a function is defined by
where is the conjugate of . The Definition A.5 follows from this, as for some , .
The following theorem states that any function from G to C can be written as a linear combination of characters of G.
Theorem A.7. (Fourier inversion formula) Any function can be uniquely written as a linear combination of characters of , that is,
where .
Theorem A.8. (Parseval) For any two functions ,
More specifically, if is a Boolean-valued function then
Now let us define the Fourier sparsity of a function f on G.
Definition A.9. (Fourier Spectral Norm) The Fourier Spectral Norm or the Spectral norm of , denoted by is defined as the sum of the absolute value of its Fourier coefficients. That is,
Definition A.10. (Sparsity and Fourier Support)
• Fourier support supp( ) of a function denotes the set .
- The Fourier sparsity of a function is defined to be the number of non-zero Fourier coefficients in the Fourier expansion of (Theorem A.7). Alternately, Fourier sparsity can be defined as the size of the Fourier support. In this paper, by sparsity of a function, we mean the Fourier sparsity of the function. Moreover, by s-sparse function we mean functions with Fourier Sparsity .
A.2 Density of a set
Definition A.11 (Indicator function). The indicator function on a set is defined by the following:
Let us now define the density of a set.
Definition A.12. Let A be a subset of G. Then the density of A in G is defined in the following way:
where denotes the size of the set.
Definition A.13. Given arbitrary subsets of some abelian group , we denote the following:
and
A.3 Regularity
Let us fix some notations first. For any arbitrary subset and a subgroup ,
Definition A.14 (ε-regular). A function is -regular if
Let be a normal subgroup of and be a coset of . A function restricted to is -regular if
where is defined in Definition 3.2.
A.4 The Pseudo Inner Product Framework
We know that since is also a vector space over the field , it has a linear algebraic structure. The characters are in one-to-one correspondence with -linear forms. However, since a general Abelian group is not a vector space, these do not hold here. But one can define something along similar lines using the ‘pseudo inner product framework’. We borrow this framework from Chakraborty et al. [CDD 24] and Datta et al. [DGK 25].
An element of is of the form , where is an element of .
Definition A.15. (Pseudo inner product) For we denote by * the following pseudo inner product.
where .
Observation A.16. .
Definition A.17. Let be elements in . We call to be pseudo-dependent if there exists with at least one invertible in such that .
If there does not exist any such with at least one invertible in such that , then we call to be pseudo-independent.
For example, consider the group . The element 3 is dependent on the element 1, but it is independent of the element 2. Whereas, 2 is dependent on 3, as . So the set is dependent.
Definition A.18 (Collapsing or identification of characters). Let be a Boolean function. For any two characters of in , we say collapses or identifies with if belong to the same coset in , (that is, belongs to ), where is as in Definition A.19.
Definition A.19. (Bucket complexity) Let be a function and let be a set of elements in . Let be the set of cosets of , that is necessary to partition the Fourier support of with respect to . That is,
The cardinality of the set is called the bucket complexity of with respect to and is denoted by .
Now, we partition G with the help of a normal subgroup.
Definition A.20. Let such that , where for all and . Let , where . We define the set by
That is,
If then we use to denote .
Remark A.21. When , then , and we have only one element , so this set becomes .
Lemma A.22. is a normal subgroup of and for any either is a coset of or .
Proof. Clearly, , where 0 is the identity element of . Let . Then, since for all , so . So is a subgroup of , and hence a normal subgroup of since is Abelian.
Since is a normal subgroup of we can now consider its cosets. For each coset of , let be a fixed coset representative (we choose a coset representative and fix it all through the proof). Then, if , then , where . Now, for each ,
since for all , . So, is fixed for each coset . If we assume ( ) for each , then we have as a coset of , where .
If for a , there does not exist any such that , .
Remark A.23. Note that since G is an Abelian group, any subgroup of G is a normal subgroup of G.
Lemma A.24. Let us consider . Then, for any , if we fix for each , we get the following:
-
The characters collapse (see Definition A.18) to the same coset of , where is the coset representative of the coset .
-
This fixing gives us the subfunctions , where is as defined in Definition A.20, whose characters are , and the coefficients are given by
Proof of Lemma A.24. Let be the set defined in Definition A.19. We can write the Fourier expansion of in the following way.
(13)
(14)
where is the representative of the coset and
If we fix for all , where , then becomes , which follows from the definition of and . Its characters are , , and the coefficients are given by
Definition A.25. (Codimension) Let be as defined in Definition A.20. Then the codimension of is given by
where , and .
Definition A.26. (Random coset structure) Let us consider , which are chosen independently and uniformly at random from . Also let . So is a subgroup, hence a normal subgroup of . Then, we define the sets by , for all .
Remark A.27. Observe that the nonempty are cosets of H. We will often refer to them as buckets.
A.5 The subgroup
Throughout this section, denotes the finite Abelian group , where are primes for all and not necessarily distinct, denotes the subgroup generated by , and denotes a primitive root of unity and . Let be a subgroup of .
Let us look at the definition of
Definition A.28. (Definition 1) Let H be a subgroup of G. Then is the subgroup given by
where
and .
Remark A.29. Observe that is also a subgroup of G.
Claim A.30. For ,
where is a primitive root of unity of order , and denotes the order of the subgroup . Also, for ,
Proof. Case 1: When . Then for all . Hence
Case 2: When . Let . Since , so, by Definition A.28, there exists such that , that is, . (see Observation A.16) Then,
which implies that
since .
We need the following isomorphism result:
Lemma A.31. is isomorphic to the quotient group .
Proof. We will show that is isomorphic to , which implies that is isomorphic to the quotient group , as for any group .
The set of characters of is given by
where is known as the annihilator of the subgroup in . From Definition A.28, observe that for , if and only if .
Let us define a group homomorphism by , where is the quotient is the quotient group homomorphism defined by .
-
(F is injective) Let such that , where is the identity element of . So, for all , which implies is the identity element of . Therefore, is injective.
-
(F is surjective) Let . Let by for all . Since , so any character of is a character of if for all (as then, the value of will be determined only by the coset representatives). Since and is the identity element of , so is a character of . Also, . Therefore, . Hence, is surjective.
Therefore, is an isomorphism, which implies that is isomorphic to the quotient group .
Corollary A.32. .
Proof. Follows from the fact that , since is isomorphic to the quotient group by Lemma A.31, and by Lagrange's theorem.
A.6 Character Decision Trees
For a general finite Abelian group G, we use character decision trees instead of parity decision trees.
Definition A.33. (Character decision tree) Let G be an Abelian group. A character decision tree is a rooted tree T. Each internal node v of T is labelled by a non-trivial character . v has exactly as many children as the size of the range of r, and each edge connecting v to a child of v is labelled by a distinct element of the range of r. In particular, each internal node has at most children. Each leaf is labelled by -1 or +1.
Given an input , can be simulated on as follows. Start at the root. At each step, if the current node is a leaf, output its label. Else, evaluate the character that labels on . We often refer to doing this as querying r on x, and obtaining an answer to the query. Then, navigate to a child of v by traversing the edge connecting v to a child of v that is labelled by , and continue. Let denote the value that the above simulation outputs. is said to compute a function f if for each , .
T is said to be non-adaptive if all its leaves have the same depth, and all its internal nodes at the same depth are labelled by the same character. In other words, the character queried at a node is independent of the answers to the previous queries. Alternatively, a non-adaptive decision tree of depth k may be thought of as querying k characters simultaneously, and producing a value in as an output based on the answers to the queries. A character decision tree that is not non-adaptive is called an adaptive character decision tree.
Since any Boolean valued function can be written as a linear combination of the characters of , one can evaluate the function with the help of its character decision tree. Let be an element in . To compute the function , we start from the root (marked with a character ) of the character decision tree and compute in the first step, where (mod ), and . Depending on the value, we move to an outgoing vertex in the next step and compute , where is the character that determines that specific node. We continue the process until we reach a leaf. The value at that leaf determines the value of at .
Definition A.34. (Character decision tree complexity and non-adaptive character decision tree complexity) The character decision tree complexity of a Boolean-valued function is defined as the smallest such that there is a character decision tree of depth that computes . The non-adaptive character decision tree complexity of is defined as the smallest such that there is a non-adaptive character decision tree of depth that computes .
Definition A.35. Let be a Boolean valued function and be its character decision tree. Then the size of , denoted by , is the total number of leaves in the tree.
A.7 Concentration inequalities
Lemma A.36 (Hoeffding's Inequality). Let be real independent random variables, each taking value in . Then
A.8 estimation
In this section, we estimate of a bucket (see Definition A.26 and Remark A.27).
Definition A.37. Let be a Boolean valued function. Then of a bucket is defined in the following way.
Now let us define the projection operator on a coset of by
Claim A.38.
Proof.
where
by Claim A.30
where .
Now let us estimate the weights of the buckets at the step.
Lemma A.39. The weight of a bucket , where is the dominating character of the bucket, and corresponds to the coset , is given by
Proof.
by Parseval
by Claim A.38
taking and .
Lemma A.40. Given query access to a Boolean valued function , one can estimate the weight of each bucket with accuracy except with probability using many samples.
Proof. By Lemma A.39,
where is the coset corresponding to the bucket .
Here, , are 0, 1 valued and is a complex number with absolute value equal to 1. So, , both are in , where and are the real and imaginary parts of respectively. Let , where and . Then and take values in . Let the total number of samples required be . Also let , and . Clearly, are independent for all , since the samples are drawn uniformly and independently at random (and the same holds for , ). Now let us apply Hoeffding's inequality (Lemma A.36) on and and upper bound both the bounds by , as then
So,
The last inequality follows from the fact that which implies that
☐
B A New proof of Green's regularity lemma for finite Abelian groups
The regularity Lemma for Abelian groups was already known from [Gre05]. In this section, we start by reproducing Green's original proof without using Bohr sets, for finite Abelian groups with constant torsion. Let us first fix some notation that we will be using. For a character , let . Since has exponent , we have . Thus, fixing a character splits a node into exactly non-empty children, and in particular into at most non-empty children. Whenever only an upper bound is required, we use .
Theorem B.1 (Green's regularity lemma [Gre05], Theorem 3.1, restated). Let and . There exists a normal subgroup with cosets such that
- H can be derived on making Tower( , ) many fixing; that is, the pseudo-codimension (see Definition A.25) of H is at most Tower( , ).
• for all but -fraction of the cosets of , the functions is -regular, where
where with .
Proof. We first construct a character decision tree (see Definition A.33) that recursively partitions the group (see Definition A.3) according to the values of carefully chosen characters (in this case, the largest one). At each internal node of the tree, we split the node with respect to the largest Fourier coefficient on the restriction of the function to the corresponding coset, thereby refining the partition only when the current restriction is far from being -regular. The leaves of the resulting tree, therefore, correspond to cosets on which no large nontrivial Fourier coefficient remains, implying that the associated restricted functions are -regular. Let us now construct the character decision tree in the following way:
• At the first stage, the decision tree has only one node, labelled by the function .
If is -regular, we are done.
If not, we consider the largest non-trivial Fourier coefficient of , say . We then split the node with respect to the character whose corresponding Fourier coefficient is the largest, into almost many subfunctions , where , are the cosets (see Definition A.20)
- At the second stage, if at least a -fraction of the subfunctions are -regular, we are done. Otherwise, at least an -fraction of the subfunctions are not -regular.
For each such non- -regular subfunction , consider a largest nontrivial Fourier coefficient of . Let be the collection of characters obtained in this way from all the non- -regular subfunctions at the current stage, after discarding those characters which are already generated by the characters used in the previous stages.
We then refine the current partition simultaneously with respect to all the characters . Thus, every current coset is refined using the same collection of new characters, and the resulting non-empty sets are cosets of the subgroup . In particular, the resulting subfunctions are restrictions of to sets of the form
• At the third stage, if there exists a subfunction which is -regular, we are done!
If not, we again consider each subfunction that are not -regular. We again consider the largest Fourier coefficients for each such , and also check whether the corresponding character is generated by . If yes, we continue the aforementioned node-splitting process.
Now, suppose that at a certain stage the number of non-empty cosets is N. We define the progress measure by
At the first stage,
At the next stage, suppose that the node is split with respect to the character . Recall that . Hence there are exactly non-empty cosets , with . Therefore, the progress measure after this refinement is
Since the character has order , the characters , , are distinct. From Lemma A.24, for every ,
Consequently,
Averaging over and using character orthogonality on gives
Therefore,
In particular, the increase in the progress measure caused by refining a non- -regular node using the character r is at least
The same calculation applies at every subsequent stage after replacing by the current subgroup . More precisely, for a heavy nontrivial character of the current restricted function, denotes the size of the range of that character on the current subgroup. Since the exponent of every subgroup of divides , we always have . Thus the above energy-increment calculation applies identically at every stage.
Now suppose that at the current stage there are N cosets and at least an -fraction of them are not -regular. For each such coset we choose a nontrivial Fourier coefficient of absolute value at least , and refine the partition as described above. Since refinement by any additional characters can only increase the progress measure, the total increase satisfies
Proceeding in this manner with the subsequent stages, as long as more than an -fraction of the current cosets are not -regular, the progress measure increases by at least at every stage. Since
the process terminates after at most stages. Therefore, after stages, at least a -fraction of the cosets of the normal subgroup are such that is -regular.
We now calculate the pseudo-codimension (Definition A.25) of the final subgroup. Suppose that at a certain stage the character decision tree uses characters. Then the number of non-empty leaves is at most . At the next stage, in the worst case, one new heavy character may be obtained from each non- -regular leaf. Hence the total number of new characters introduced at this stage is at most , and therefore
Thus,
• Stage 1: .
• Stage 2: .
• Stage 3: .
Continuing this recurrence for stages gives
Since the final subgroup is , its pseudo-codimension is at most Tower . Moreover, since every character collected at a stage is subsequently used to refine all the current cosets, the resulting character decision tree is non-adaptive.
C List Correction for Finite Abelian Groups
In this section, we give the proof of the list correction for finite Abelian groups. This was previously appeared in the literature by the work [DGK 25] (Generalized Implicit Sieve Algorithm), although we need a bit different set-up since the input-output demand is a bit different. To the core both the algorithm does the same job, for completeness we give a proof here with the parameter set-up that would be helpful for our purposes.
Definition C.1 (List Correction for ). Given oracle access to , a parameter , a coset , and a point , the procedure LISTCORRECTION returns for some , assuming there exists such that .
C.1 List Correction for Finite Abelian Groups
Theorem C.2. Let be a finite Abelian group and be a threshold and be a set of independently and uniformly chosen random points from where . There exists an algorithm, List Correction for Abelian groups, (Algorithm 6), that takes and as input, makes queries to the truth table of a Boolean valued function , and returns, with probability at least , and it returns oracle machine , where each (a labeled set of examples, and the value of the function at for each , of the form , where ) that satisfies the following two properties:
-
For each , there is a distinct such that is a probabilistic oracle machine for the function . The query complexity of each oracle is .
-
with then , and
-
The output of this algorithm can be seen as a matrix with entries in powers of , where is a primitive root of unity, , and is a constant.
Remark C.3. Algorithm 6, however, does not return S. Also observe that by Parseval's identity, .
Let
Since is a constant, is a constant.
Algorithm 6 List Correction for Abelian Groups
Input: A function , a confidence parameter , a threshold , and a set of uniformly and independently chosen group elements, where
.
Output: A collection , where each is the column vector whose entries are . Also output the vector
,
where .
1:
2: Set , where .
3: Construct a randomly permuted coset structure such that .
4: Initialize .
5: for each bucket do
6: Estimate within additive error and confidence .
7: Let the estimate be .
8: if then
9: Keep bucket .
10: Sample independently and uniformly from .
11: Estimate within additive error and confidence . Let this estimate be denoted by .
12: for do
13: Estimate within additive error and confidence . Let the estimate be denoted by .
14: Estimate within additive error and confidence . Let the estimate be denoted by .
15: Compute
.
16: Let be the element of which is closest to .
C.2 Proof of Theorem C.2
Definition C.4 (Random shift). Let be chosen uniformly at random. For every , define . We call this a random shift of the coset structure.
Observe that the random shift only permutes the labels of the buckets. In particular, for any , whether and belong to the same bucket is independent of the choice of .
Definition C.5. Let C be the set of all 's. We call a random permuted coset structure.
Lemma C.6. Fix and . Let . Then
and
Proof. By definition, if and only if for every . Equivalently, .
If , then,
If , the required shift is , which is excluded.
Lemma C.7. Let . If , then, except with probability at most , all the characters in belong to distinct buckets, where denotes the smallest prime that divides .
Proof. By Parseval's identity, . Consider two distinct characters . The random shift does not affect whether they belong to the same bucket. Indeed,
Since , we have
Since are chosen independently,
Therefore, by a union bound,
Pr[some two distinct characters in B belong to the same bucket]
Hence, with probability at least , all the characters in B belong to distinct buckets.
From Lemma C.7, with high probability, the characters in belong to distinct buckets. Let . For each , let denote the bucket containing . Observe that the random shift does not affect whether another character belongs to . Indeed, . Thus the small Fourier weight contained in is controlled entirely by the random choice of .
Lemma C.8. Let . Suppose that the characters in belong to distinct buckets. If , or equivalently, , then, with probability at least simultaneously for every ,
Consequently, on the additional event that all the characters in B belong to distinct buckets,
Proof. Fix . For every , define
Since , and since , we have
Define
Thus is precisely the contribution of the small Fourier coefficients to the weight of . By linearity of expectation,
where the last inequality follows from Parseval's identity.
Therefore, by Markov's inequality,
Since , by union bound,
Thus, with probability at least , simultaneously for every ,
If, in addition, the characters in B belong to distinct buckets, then
The following lemma shows that a bucket survives this procedure only when it contains a large Fourier coefficient.
Lemma C.9. With probability at least , every bucket C such that satisfies
Proof. For , let . Since , .
Suppose that a bucket containing only elements of satisfies . Then
For any two distinct ,
.
Therefore,
where the last inequality follows from Parseval's identity.
Hence, by Markov's inequality,
Lemma C.10. Algorithm 6 does the following with probability :
-
It does not discard any bucket C with .
-
for every bucket (that is, is the dominating element of ) in the set of buckets that the algorithm has not discarded.
Proof. Proof of part (1). From Algorithm 6 we know that
Hence the bucket C is not discarded.
Proof of part (2). Let be a bucket which has not been discarded. Then . Since
we have . By Lemma C.9, must contain some . Moreover, by Lemma C.7, this element is unique.
Suppose, for contradiction, that
By Lemma C.8,
Since ,
Hence
contradicting the fact that C survived. Therefore
Lemma C.11. The small weight coefficients do not contribute much to the weight of a bucket. That is,
Proof. By Lemma C.8,
Hence, by Cauchy–Schwarz,
Therefore, by Markov's inequality,
Lemma C.12. Let , , be chosen uniformly and independently at random. Then, except with probability at most ,
Proof. For each bucket , let be the dominating element, . By Lemma C.7, with high probability over the random choice of , the elements of belong to distinct buckets. Notice that the random shift does not affect this event, since it only permutes the labels of the buckets. Observe that
Now,
and
with probability by Lemma C.11.
Therefore,
with failure probability at most .
So, by taking union bound over -elements, the above result holds for all 's and 's, with probability . Therefore, by taking union bound over buckets, the above holds with probability .
Hence, Algorithm 6 works with probability .
Let T denote the number of survived buckets. For every survived bucket , let
By the previous lemma,
The estimates of and each have additive error at most . Hence
Moreover,
and therefore
Since
we have
and consequently
Thus
By the definition of , distinct -th roots of unity are separated by at least . Therefore the unique closest -th root of unity to is . Hence , and therefore
C.3 Query complexity of List Correction for Abelian groups, Algorithm 6
Lemma C.13. Given query access to a Boolean valued function , the weights of all the buckets can be estimated simultaneously within additive error , except with probability at most , using queries.
Proof. The proof follows exactly along the lines of Lemma A.40. For a fixed bucket, taking and failure probability gives samples.
The same queried values of can be reused for all the buckets. For a fixed sample , the values and are independent of the bucket, and only the corresponding character factor changes. Hence no multiplicative factor is incurred in the query complexity.
Taking a union bound over all the buckets proves the claim.
Lemma C.14. For any fixed , and for all surviving buckets can be estimated simultaneously within additive error , except with probability at most , using queries.
Proof. The proof again follows exactly along the lines of Lemma A.40. For a fixed surviving bucket, taking additive error and failure probability gives queries, since is a constant and hence is a constant.
For a fixed , the same queried values of can be used for all the surviving buckets; only the corresponding character factor depends on the bucket. The same observation applies to . Thus no multiplicative factor is incurred.
Taking a union bound over all surviving buckets proves the claim.
Theorem C.15. The query complexity of the List Correction for Abelian groups (Algorithm 6) is
taking to be a constant.
Proof. We calculate the query complexity of the different steps of Algorithm 6 separately.
First, the algorithm estimates the weight of every bucket within additive error . Taking the failure probability for these estimates to be at most , by Lemma C.13 this requires queries.
Next, for every surviving bucket, the algorithm estimates more accurately, within additive error . Since the same samples can be reused for all surviving buckets, these estimates require queries.
We next estimate and , , within additive error . For each fixed , by Lemma C.14, the estimates for all the surviving buckets can be obtained using queries, where we have chosen the failure probability sufficiently small so that a union bound can be taken over all .
Therefore, over all , the total query complexity of the projection estimates is . Combining the three, the total number of queries is
Now, and . Hence
Moreover, by the choice of t in Algorithm 6, and since and are constants,
Therefore, the total query complexity is
☐
D Estimating Fourier Coefficients over Finite Abelian Groups
In this section, we give the proof of the correctness of Algorithm 7. This was appeared in the work [DGK 25], we have given the same proof on changing the parameters.
Theorem D.1. Algorithm 7 outputs , such that
with probability with query complexity .
Proof. Consider Algorithm 7. Observe that the only queries made by this algorithm are in Step 1. Thus by Theorem C.2, the query complexity of the algorithm is upper bounded by .
There are three bad events for this algorithm:
-
The output of the List Correction for Abelian groups Algorithm 6 is in Step 1.
-
The algorithm fails to find B in Step 2, in which case it returns Fail.
-
The estimates in Step 4 are incorrect.
By Theorem C.2, the error probability of the first bad event is upper bounded by . The probability of the third bad event can also be bounded by be a Chernoff bound for the choice of .
Next, we upper bound the probability of the second bad event. Consider the output of the List Correction for Abelian Groups Algorithm 6 in Step 1. The rows are labelled by , which corresponds to , each distributed uniformly and independently in . Also the columns are labelled by , where , which correspond to some (the 's are not known). By Theorem C.2, the th entry of is .
Now, let us consider all the group automorphisms on which are formed by only choosing the images of the elements in . Then, by the property of group automorphism, the images of any other element get defined automatically. That is, for an element , let , with invertible in be such that . If is a group automorphism on , then .
Algorithm 7 Coefficient estimation Algorithm
Input. Given query access to and (error parameter), (confidence parameter).
Output.
-
Let . Let be a set of elements chosen uniformly and independently from , where . Run the List Correction for Abelian Groups Algorithm 6 with and as input to obtain a matrix , where .
-
Label the rows of with (which corresponds to the set ) and columns with (which corresponds to the set of large Fourier coefficients of ), leaving the last column. Let us denote the set of columns by . Find the smallest such that, for any column , there exists , with an unit in (that is, is invertible in ) such that .
• If such a does not exist, then return Fail.
-
Relabel the columns of by where such that for all , can be written as , , and is an unit in . Note that the columns correspond to those in .
-
Query . For all , estimate to error and confidence by where
.
Sample complexity
- Return: .
For a subset , let denote an element satisfying for all . Observe that, if a dependent is chosen in Step 2, then all the entries of are equal to 1.
Now we want to argue that for any pseudo-independent and , the probability that has all entries = 1 is at most .
To see this, fix and observe that 's are pseudo-independent. Since are uniformly and independently distributed in , with probability for all . This follows from the fact that each entry of can take values from , hence the probability that it takes the value is . Thus the probability that is upper bounded by , for each . Therefore, the probability that a dependent set is chosen in Step 2 is at most , since it is upper bounded by the probability that . Since, by Remark C.3, the number of possible subsets of is upper bounded by , for a large enough constant in choice of , a pseudo-independent set is chosen with probability .
In particular, let such that , where is the subgroup generated by , and elements of are pseudo-independent. With probability at least 99/100, will be considered in Step 2 of the algorithm (if not such set has already been found). By choosing the elements of to be , a brute-force algorithm (which makes no queries to the unknown function) can be used to check whether . Furthermore, the dependencies obtained can be used in the next step (Step 3) of the algorithm.
Thus the probability of bad events happening for Algorithm 7 is at most 1/3.