TCSLib

74 Boolean Analysis — Zk BLR

74.1 Overview

This module formalizes the Blum–Luby–Rubinfeld (BLR) linearity test over \(\mathbb {Z}_k^n\). A function \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is linear if \(f(x+y)=f(x)+f(y)\) for all \(x,y\), or equivalently if it is a dot-product character \(x \mapsto s \cdot x\) for some coefficient vector \(s\). The module proves completeness (linear functions are always accepted) and soundness bounds: if \(f\) is \(\varepsilon \)-far from every linear function, the acceptance probability is at most \(1 - \tfrac {\varphi (k)}{k}(1-\cos (2\pi /k))\varepsilon \), specialising for prime \(p\) to \(1 - \tfrac {p-1}{p}(1-\cos (2\pi /p))\varepsilon \).

74.2 Declarations

Definition 74.1 Linearity predicate
✓
#

A function \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is linear if \(f(x+y) = f(x)+f(y)\) for all \(x, y \in \mathbb {Z}_k^n\).

Definition 74.2 Lift to roots of unity
✓

Given \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\), the lifted function \(\widetilde{f} : \mathbb {Z}_k^n \to \mathbb {C}\) is defined by \(\widetilde{f}(x) = \omega _k^{f(x)}\), where \(\omega _k = e^{2\pi i/k}\).

Definition 74.3 Hamming distance between functions
✓
#

The distance between \(f, g : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is the fraction of inputs on which they disagree:

\[ \mathrm{dist}(f,g) \; =\; \Pr _{x}[f(x) \ne g(x)] \; =\; \frac{1}{k^n}\# \{ x : f(x)\ne g(x)\} . \]
Definition 74.4 \(\varepsilon \)-far from linear
✓

A function \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is \(\varepsilon \)-far from linear if \(0 \le \varepsilon \le 1\) and \(\mathrm{dist}(f,g) \ge \varepsilon \) for every linear function \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\).

Lemma 74.5 Linear functions as dot-product characters
✓

Fix an integer \(k \ge 1\) and a dimension \(n\), and let \(f : (\mathbb {Z}/k\mathbb {Z})^n \to \mathbb {Z}/k\mathbb {Z}\) be any function. Then \(f\) is linear — that is, \(f(x+y) = f(x) + f(y)\) for all \(x, y \in (\mathbb {Z}/k\mathbb {Z})^n\) — if and only if there is a vector \(s \in (\mathbb {Z}/k\mathbb {Z})^n\) with \(f(x) = s \cdot x = \sum _{i=0}^{n-1} s_i x_i\) for every \(x\), all sums taken modulo \(k\).

Definition 74.6 Canonical linear character
✓
#

For \(s \in \mathbb {Z}_k^n\), the linear character \(\chi _s : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is the dot-product function \(\chi _s(x) = s \cdot x\).

Definition 74.7 Normalized function
✓
#

A function \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is normalized if \(f(0) = 0\). Every linear function is automatically normalized.

Definition 74.8 Normalization operator
✓
#

The normalization of \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is the function \((\mathrm{normalize}\, f)(x) = f(x) - f(0)\), which satisfies \((\mathrm{normalize}\, f)(0) = 0\).

Lemma 74.9 Normalization vanishes at the origin
✓
#

Let \(f : (\mathbb {Z}/k\mathbb {Z})^n \to \mathbb {Z}/k\mathbb {Z}\) be any function on the \(n\)-dimensional space over \(\mathbb {Z}/k\mathbb {Z}\), and let its normalization be \((\mathrm{normalize}\, f)(x) = f(x) - f(0)\). Then this normalization vanishes at the origin: \((\mathrm{normalize}\, f)(0) = 0\).

Lemma 74.10 Linear functions are normalized
✓

Let \(k \ge 1\) and \(n\) be natural numbers, and let \(f : (\mathbb {Z}/k\mathbb {Z})^n \to \mathbb {Z}/k\mathbb {Z}\) be a linear function, meaning \(f(x+y) = f(x) + f(y)\) for all \(x, y \in (\mathbb {Z}/k\mathbb {Z})^n\). Then \(f\) is normalized: \(f(0) = 0\).

Definition 74.11 \(\varepsilon \)-far from linear, normalized version
✓

A function \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) satisfies ZkBLR.epsilon_far_from_linear_normalized with parameter \(\varepsilon \) if \(f\) is normalized (\(f(0)=0\)), \(0\le \varepsilon \le 1\), and \(\mathrm{dist}(f,g)\ge \varepsilon \) for every linear \(g\).

Lemma 74.12 Real part of a nontrivial root of unity
✓

Let \(k \ge 2\) and write \(\omega _k = e^{2\pi i / k}\) for the primitive \(k\)-th root of unity. For every nonzero \(a \in \mathbb {Z}/k\mathbb {Z}\),

\[ \operatorname {Re}\! \left(\omega _k^{\, a}\right) \le \cos \! \left(\frac{2\pi }{k}\right), \]

where \(\omega _k^{\, a}\) denotes \(\omega _k\) raised to the canonical representative of \(a\) in \(\{ 0, 1, \ldots , k-1\} \).

Let \(k \ge 2\) and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\), with lift \(\widetilde{f}(x) = \omega _k^{f(x)}\) where \(\omega _k = e^{2\pi i/k}\). Then for every frequency \(s \in \mathbb {Z}_k^n\), the real part of the Fourier coefficient of \(\widetilde{f}\) at \(s\) is bounded above by

\[ \operatorname {Re}\bigl[\widehat{\widetilde{f}}(s)\bigr] \; \le \; 1 - \bigl(1 - \cos (2\pi /k)\bigr)\, \mathrm{dist}(f,\chi _s), \]

where \(\chi _s(x) = s\cdot x\) is the linear character and \(\mathrm{dist}(f,\chi _s)\) is the fraction of inputs \(x\) on which \(f(x) \ne s\cdot x\).

Lemma 74.14 Fourier bound for functions far from linear
✓

Fix an integer \(k \ge 2\) and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be \(\varepsilon \)-far from linear in the normalized sense: that is, \(f(0) = 0\), the parameter satisfies \(0 \le \varepsilon \le 1\), and \(\operatorname{dist}(f, g) \ge \varepsilon \) for every linear \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\). Write \(\widetilde{f}(x) = \omega _k^{f(x)}\) for the lift of \(f\) to the unit circle, where \(\omega _k = e^{2\pi i/k}\), and let \(\widehat{\widetilde{f}}(s)\) denote its Fourier coefficient at frequency \(s\). Then for every \(s \in \mathbb {Z}_k^n\),

\[ \operatorname {Re}\bigl[\widehat{\widetilde{f}}(s)\bigr] \; \le \; 1 - \bigl(1 - \cos (2\pi /k)\bigr)\, \varepsilon . \]
Definition 74.15 \(j\)-twisted lift to roots of unity
✓

For \(j \in \mathbb {Z}_k\), the \(j\)-twisted lift of \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is \(\widetilde{f}_j(x) = \omega _k^{j \cdot f(x)}\). The case \(j=1\) recovers ZkBLR.lift_omega; the case \(j=0\) gives the constant function \(1\).

Definition 74.16 BLR acceptance probability
✓
#

The BLR acceptance probability of \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) is

\[ \Pr _{x,y}\bigl[f(x+y) = f(x)+f(y)\bigr] \; =\; \frac{1}{k^{2n}} \sum _{x,y\in \mathbb {Z}_k^n} \mathbf{1}\bigl[f(x+y)=f(x)+f(y)\bigr]. \]
Lemma 74.17 Completeness of the BLR linearity test
✓

Let \(k \ge 1\) and \(n \ge 0\), and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be a linear function, meaning \(f(x+y) = f(x) + f(y)\) for all \(x, y \in \mathbb {Z}_k^n\). Then the BLR acceptance probability of \(f\) equals \(1\); that is,

\[ \Pr _{x,y}\bigl[f(x+y) = f(x) + f(y)\bigr] = 1, \]

where \(x\) and \(y\) range independently and uniformly over \(\mathbb {Z}_k^n\).

Lemma 74.18 Orthogonality sum for additive characters mod \(k\)
✓
#

Let \(k \ge 1\) and write \(\omega _k = e^{2\pi i/k}\) for the primitive \(k\)-th root of unity. For each \(a \in \mathbb {Z}/k\mathbb {Z}\),

\[ \sum _{j \in \mathbb {Z}/k\mathbb {Z}} \omega _k^{\, j a} \; =\; \begin{cases} k & \text{if } a = 0, \\ 0 & \text{otherwise,} \end{cases} \]

where each exponent \(ja \in \mathbb {Z}/k\mathbb {Z}\) is taken via its canonical representative in \(\{ 0, 1, \ldots , k-1\} \).

Lemma 74.19 Indicator as a character sum
✓

Let \(k \ge 1\) and write \(\omega _k = e^{2\pi i/k}\) for the primitive \(k\)-th root of unity. For every \(a \in \mathbb {Z}/k\mathbb {Z}\),

\[ \mathbf{1}[a = 0] \; =\; \frac{1}{k}\, \operatorname {Re}\! \left(\sum _{j \in \mathbb {Z}/k\mathbb {Z}} \omega _k^{\, ja}\right), \]

where the exponent \(ja\) is computed in \(\mathbb {Z}/k\mathbb {Z}\) and then lifted to its canonical representative in \(\{ 0,\ldots ,k-1\} \), and the left-hand side equals \(1\) when \(a = 0\) and \(0\) otherwise.

Lemma 74.20 Parseval identity for the twisted lift
✓

Let \(k \ge 1\) and \(n \ge 0\) be integers, and write \(\omega _k = e^{2\pi i/k}\). Fix \(j \in \mathbb {Z}/k\mathbb {Z}\) and an arbitrary function \(f : \mathbb {Z}_k^n \to \mathbb {Z}/k\mathbb {Z}\), and let \(\widetilde{f}_j : \mathbb {Z}_k^n \to \mathbb {C}\) be the \(j\)-twisted lift given by \(\widetilde{f}_j(x) = \omega _k^{\, j\cdot f(x)}\), with Fourier coefficients \(\widehat{\widetilde{f}_j}(s)\) indexed by the frequencies \(s \in \mathbb {Z}_k^n\). Then

\[ \sum _{s \in \mathbb {Z}_k^n} \bigl\lvert \widehat{\widetilde{f}_j}(s) \bigr\rvert ^{2} = 1. \]

Fix \(k \ge 1\) and \(n \ge 0\), and work over the group \(\mathbb {Z}_k^n = (\mathbb {Z}/k\mathbb {Z})^n\) with primitive \(k\)-th root of unity \(\omega _k = e^{2\pi i/k}\). Given \(j \in \mathbb {Z}/k\mathbb {Z}\) and a map \(f \colon \mathbb {Z}_k^n \to \mathbb {Z}/k\mathbb {Z}\), let \(F(x) = \omega _k^{\, j\cdot f(x)}\) be its \(j\)-twisted lift, and for \(s \in \mathbb {Z}_k^n\) let \(\widehat{F}(s) = \mathbb {E}_x\! \big[F(x)\, \overline{\omega _k^{\, s\cdot x}}\big]\) be its Fourier coefficient, where \(s\cdot x = \sum _{i} s_i x_i \in \mathbb {Z}/k\mathbb {Z}\) and \(\mathbb {E}\) denotes the uniform average over \(\mathbb {Z}_k^n\). Then the triple-product expectation over independent uniform \(x,y\) equals a cubic sum of the Fourier coefficients:

\[ \mathbb {E}_x\, \mathbb {E}_y\! \left[F(x+y)\, \overline{F(x)}\, \overline{F(y)}\right] = \sum _{s\in \mathbb {Z}_k^n} \bigl\lvert \widehat{F}(s)\bigr\rvert ^2\, \overline{\widehat{F}(s)}. \]

Let \(k \ge 1\), and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\). For each \(j \in \mathbb {Z}_k\) let \(\widetilde{f}_j(x) = \omega _k^{\, j\, f(x)}\) denote the \(j\)-twisted lift of \(f\), and write \(\widehat{\widetilde{f}_j}(s)\) for its Fourier coefficient at frequency \(s \in \mathbb {Z}_k^n\). Then the BLR acceptance probability of \(f\) admits the representation

\[ \Pr _{x,y}\bigl[f(x+y)=f(x)+f(y)\bigr] = \frac{1}{k} \sum _{j\in \mathbb {Z}_k}\; \sum _{s\in \mathbb {Z}_k^n} \bigl|\widehat{\widetilde{f}_j}(s)\bigr|^2\, \operatorname {Re}\widehat{\widetilde{f}_j}(s), \]

where \(|\cdot |\) is the complex modulus and \(\operatorname {Re}\) the real part.

Fix an integer \(k \ge 1\), and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be arbitrary. Write \(\widetilde{f}_0(x) = \omega _k^{\, 0 \cdot f(x)}\) for the \(0\)-twisted lift of \(f\) (equivalently, the constant function \(1\)), and let \(\widehat{\widetilde{f}_0}(s)\) denote its Fourier coefficient at frequency \(s \in \mathbb {Z}_k^n\). Then

\[ \sum _{s \in \mathbb {Z}_k^n} \bigl|\widehat{\widetilde{f}_0}(s)\bigr|^2 \, \operatorname {Re}\widehat{\widetilde{f}_0}(s) = 1, \]

where \(|\cdot |\) is the complex modulus.

Lemma 74.24 Weighted Fourier sum bounded by one
✓

Let \(k \ge 1\) and \(n\) be integers, fix \(j \in \mathbb {Z}/k\mathbb {Z}\) and a function \(f : \mathbb {Z}_k^n \to \mathbb {Z}/k\mathbb {Z}\), and let \(\widetilde{f}_j(x) = \omega _k^{\, j\, f(x)}\) be its \(j\)-twisted lift, with Fourier coefficients \(\widehat{\widetilde{f}_j}(s)\) indexed by frequencies \(s \in \mathbb {Z}_k^n\). Then

\[ \sum _{s \in \mathbb {Z}_k^n} \bigl\lvert \widehat{\widetilde{f}_j}(s) \bigr\rvert ^{2}\, \operatorname {Re}\widehat{\widetilde{f}_j}(s) \; \le \; 1, \]

where \(\lvert \cdot \rvert \) denotes the complex modulus and \(\operatorname {Re}\) the real part.

Lemma 74.25 Cube-sum of Fourier coefficients bounded by the maximum
✓

Let \(p\) be a prime, let \(n \ge 0\), and let \(f : \mathbb {Z}_p^n \to \mathbb {Z}_p\) be a function, whose lift to roots of unity is \(\widetilde{f}(x) = \omega _p^{f(x)}\) with \(\omega _p = e^{2\pi i/p}\). Write \(\widehat{\widetilde{f}}(s)\) for the Fourier coefficient of \(\widetilde{f}\) at frequency \(s \in \mathbb {Z}_p^n\). If \(A \in \mathbb {R}\) is such that \(\bigl\| \widehat{\widetilde{f}}(s)\bigr\| \le A\) for every \(s \in \mathbb {Z}_p^n\), then

\[ \sum _{s \in \mathbb {Z}_p^n} \bigl\| \widehat{\widetilde{f}}(s)\bigr\| ^3 \; \le \; A \sum _{s \in \mathbb {Z}_p^n} \bigl\| \widehat{\widetilde{f}}(s)\bigr\| ^2. \]
Lemma 74.26 Parseval identity for a root-of-unity lift
✓

Let \(p\) be a prime and \(n \ge 0\), and write \(\omega _p = e^{2\pi i/p}\). For a function \(f : \mathbb {Z}_p^n \to \mathbb {Z}/p\mathbb {Z}\), let \(\widetilde{f} : \mathbb {Z}_p^n \to \mathbb {C}\) be its lift \(\widetilde{f}(x) = \omega _p^{f(x)}\), and let \(\widehat{\widetilde{f}}(s)\) denote its Fourier coefficient at frequency \(s \in \mathbb {Z}_p^n\). Then

\[ \sum _{s \in \mathbb {Z}_p^n} \bigl|\widehat{\widetilde{f}}(s)\bigr|^2 = 1. \]
Lemma 74.27 Weighted Fourier sum bound for functions far from linear
✓

Let \(p\) be prime, and let \(f : \mathbb {Z}_p^n \to \mathbb {Z}_p\) be normalized and \(\varepsilon \)-far from linear: that is, \(f(0) = 0\), the parameter satisfies \(0 \le \varepsilon \le 1\), and \(\mathrm{dist}(f,g) \ge \varepsilon \) for every linear \(g : \mathbb {Z}_p^n \to \mathbb {Z}_p\). Write \(\widetilde{f}(x) = \omega _p^{f(x)}\) for the lift of \(f\) to the \(p\)-th roots of unity, and \(\hat{\widetilde{f}}(s)\) for its Fourier coefficient at frequency \(s \in \mathbb {Z}_p^n\). Then

\[ \sum _{s \in \mathbb {Z}_p^n} \bigl|\hat{\widetilde{f}}(s)\bigr|^2 \, \operatorname {Re}\bigl[\hat{\widetilde{f}}(s)\bigr] \; \le \; 1 - \bigl(1 - \cos (2\pi /p)\bigr)\varepsilon . \]
Lemma 74.28 Fourier coefficient bound for a twisted lift of an \(\varepsilon \)-far function
✓

Let \(p\) be a prime, let \(n \ge 0\), and write \(\omega _p = e^{2\pi i/p}\) for the primitive \(p\)-th root of unity. Let \(f : \mathbb {Z}_p^{\, n} \to \mathbb {Z}_p\) be normalized (\(f(0)=0\)) and \(\varepsilon \)-far from linear, meaning \(0 \le \varepsilon \le 1\) and \(\Pr _x[f(x)\ne g(x)] \ge \varepsilon \) for every additive homomorphism \(g : \mathbb {Z}_p^{\, n} \to \mathbb {Z}_p\). Fix \(j \in \mathbb {Z}_p\) with \(j \ne 0\), and for \(s \in \mathbb {Z}_p^{\, n}\) let \(\widehat{h}(s) = \mathbb {E}_x\bigl[h(x)\, \omega _p^{-\, s\cdot x}\bigr]\) denote the Fourier coefficient of a function \(h : \mathbb {Z}_p^{\, n} \to \mathbb {C}\) at frequency \(s\), where \(s\cdot x = \sum _{i} s_i x_i \in \mathbb {Z}_p\). Then the \(j\)-twisted lift \(\widetilde{f}_j(x) = \omega _p^{\, j\, f(x)}\) satisfies

\[ \operatorname {Re}\, \widehat{\widetilde{f}_j}(s) \; \le \; 1 - \bigl(1 - \cos (2\pi /p)\bigr)\, \varepsilon \]

for every \(s \in \mathbb {Z}_p^{\, n}\).

Lemma 74.29 Weighted Fourier bound for the twisted lift of a far-from-linear function
✓

Let \(p\) be prime and let \(f : \mathbb {Z}_p^n \to \mathbb {Z}_p\) be normalized, meaning \(f(0) = 0\), and \(\varepsilon \)-far from linear: \(0 \le \varepsilon \le 1\) and \(\mathrm{dist}(f,g) \ge \varepsilon \) for every linear function \(g : \mathbb {Z}_p^n \to \mathbb {Z}_p\), where \(\mathrm{dist}\) denotes the fraction of inputs on which the two functions disagree. Fix a nonzero \(j \in \mathbb {Z}_p\) and let \(\widetilde{f}_j(x) = \omega _p^{\, j\, f(x)}\) be the associated \(j\)-twisted lift, with \(\omega _p = e^{2\pi i / p}\), and write \(\widehat{\widetilde{f}_j}(s)\) for its Fourier coefficient at frequency \(s\). Then

\[ \sum _{s \in \mathbb {Z}_p^n} \bigl|\widehat{\widetilde{f}_j}(s)\bigr|^2 \, \operatorname {Re}\widehat{\widetilde{f}_j}(s) \; \le \; 1 - \bigl(1 - \cos (2\pi /p)\bigr)\varepsilon . \]
Lemma 74.30 BLR soundness over a prime field
✓

Let \(p\) be prime and fix \(n \ge 0\). Let \(f : \mathbb {Z}_p^n \to \mathbb {Z}_p\) be a normalized function (so \(f(0)=0\)), and let \(0 \le \varepsilon \le 1\) be such that \(f\) is \(\varepsilon \)-far from every linear map, meaning \(\mathrm{dist}(f,g) \ge \varepsilon \) for every linear \(g : \mathbb {Z}_p^n \to \mathbb {Z}_p\), where \(\mathrm{dist}(f,g) = \Pr _x[f(x) \ne g(x)]\). Then the BLR acceptance probability of \(f\) satisfies

\[ \Pr _{x,y}\bigl[f(x+y) = f(x)+f(y)\bigr] \; \le \; 1 - \frac{p-1}{p}\, \bigl(1 - \cos (2\pi /p)\bigr)\, \varepsilon , \]

where \(x,y\) range uniformly and independently over \(\mathbb {Z}_p^n\).

Lemma 74.31 \(\varepsilon \)-farness preserved under unit scaling
✓

Let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be a normalized function that is \(\varepsilon \)-far from linear, meaning \(f(0) = 0\), \(0 \le \varepsilon \le 1\), and \(\operatorname{dist}(f, g) \ge \varepsilon \) for every linear \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\). Then for any unit \(j \in (\mathbb {Z}_k)^\times \), the scaled function \(x \mapsto j \cdot f(x)\) is again normalized and \(\varepsilon \)-far from linear.

Lemma 74.32 Real-part bound for a unit-twisted lift
✓

Let \(k \ge 2\) and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be normalized and \(\varepsilon \)-far from linear, meaning that \(f(0) = 0\), that \(0 \le \varepsilon \le 1\), and that \(\operatorname{dist}(f,g) \ge \varepsilon \) for every linear \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\) (where \(\operatorname{dist}\) is the fraction of inputs on which two functions disagree). Fix a unit \(j \in (\mathbb {Z}/k\mathbb {Z})^\times \) and a frequency \(s \in \mathbb {Z}_k^n\), and let \(\widetilde{f}_j(x) = \omega _k^{\, j\, f(x)}\) be the corresponding \(j\)-twisted lift, with \(\omega _k = e^{2\pi i/k}\). Then the Fourier coefficient of \(\widetilde{f}_j\) at \(s\) has real part bounded by

\[ \operatorname {Re}\, \widehat{\widetilde{f}_j}(s) \; \le \; 1 - \bigl(1 - \cos (2\pi /k)\bigr)\, \varepsilon . \]
Lemma 74.33 A weighted Fourier-coefficient bound for a unit-twisted lift
✓

Let \(k \ge 2\), and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be normalized (that is, \(f(0) = 0\)) and \(\varepsilon \)-far from linear for some \(0 \le \varepsilon \le 1\), meaning that \(\mathrm{dist}(f,g) \ge \varepsilon \) for every linear function \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\). Then for every unit \(j \in (\mathbb {Z}/k\mathbb {Z})^\times \), the \(j\)-twisted lift \(\widetilde{f}_j(x) = \omega _k^{\, j\, f(x)}\) satisfies

\[ \sum _{s \in \mathbb {Z}_k^n} \bigl|\widehat{\widetilde{f}_j}(s)\bigr|^2 \, \operatorname {Re}\widehat{\widetilde{f}_j}(s) \; \le \; 1 - \bigl(1 - \cos (2\pi /k)\bigr)\varepsilon , \]

where \(\widehat{\widetilde{f}_j}(s)\) denotes the Fourier coefficient of \(\widetilde{f}_j\) at frequency \(s\).

Lemma 74.34 BLR soundness over \(\mathbb {Z}_k\)
✓

Let \(k \ge 2\), and let \(f : \mathbb {Z}_k^n \to \mathbb {Z}_k\) be normalized, so that \(f(0) = 0\). Fix a real number \(\varepsilon \) with \(0 \le \varepsilon \le 1\), and suppose \(f\) is \(\varepsilon \)-far from linear: for every linear function \(g : \mathbb {Z}_k^n \to \mathbb {Z}_k\) (one satisfying \(g(x+y) = g(x)+g(y)\) for all \(x,y\)), the fraction of inputs on which \(f\) and \(g\) disagree is at least \(\varepsilon \). Then the acceptance probability of the BLR linearity test, taken over independent uniform \(x, y \in \mathbb {Z}_k^n\), obeys

\[ \Pr _{x,y}\bigl[f(x+y) = f(x)+f(y)\bigr] \; \le \; 1 - \frac{\varphi (k)}{k}\bigl(1 - \cos (2\pi /k)\bigr)\, \varepsilon , \]

where \(\varphi \) denotes Euler’s totient function.

Lemma 74.35 BLR soundness over a prime field
✓

Let \(p\) be prime and let \(f : \mathbb {Z}_p^n \to \mathbb {Z}_p\) be normalized, meaning \(f(0) = 0\). Fix \(\varepsilon \) with \(0 \le \varepsilon \le 1\), and suppose \(f\) is \(\varepsilon \)-far from linear: every linear function \(g : \mathbb {Z}_p^n \to \mathbb {Z}_p\) (one satisfying \(g(x+y) = g(x)+g(y)\) for all \(x,y\)) has \(\operatorname{dist}(f,g) \ge \varepsilon \), where \(\operatorname{dist}(f,g) = \Pr _x[f(x) \ne g(x)]\). Then the BLR acceptance probability of \(f\) obeys

\[ \Pr _{x,y}\bigl[f(x+y) = f(x)+f(y)\bigr] \; \le \; 1 - \frac{p-1}{p}\bigl(1 - \cos (2\pi /p)\bigr)\, \varepsilon , \]

the probability being taken over \(x,y\) drawn independently and uniformly from \(\mathbb {Z}_p^n\).