The long code, odd Boolean functions, folding, and projections of characters #
The long code of a label a : ι is the dictator r ↦ r a, the evaluation Function.eval a on
ι → Bool (BitString.longCode) Arora and Barak, Chapter 22. It is the Hadamard
encoding of the unit vector of a (BitString.longCode_eq_hadamardCode), so a table within
relative distance 1/4 of a long code determines its label
(BitString.eq_of_hammingDist_longCode_lt).
A Boolean function B : (ι → Bool) → Bool is odd (BitString.IsOdd) when complementing its
input complements its output, B (f + 1) = !B f; in ±1 notation this is F (-x) = -F x, and
such functions are also called self-dual. In PCP constructions, odd long code tables are called
folded. Every long code is odd (BitString.isOdd_longCode), every table can be folded around a
coordinate into an odd one (BitString.foldTable), and the Fourier coefficients of an odd function
vanish on every set of even cardinality (BitString.IsOdd.fourierCoeff_of_even), in particular on
∅ (BitString.IsOdd.fourierCoeff_empty).
For a map π : β → γ, the mod-2 projection BitString.projectSet π T of T : Finset β is the
set of points of γ with an odd number of preimages in T. Pulling a character back along π
projects its frequency set: chi T (f ∘ π) = chi (projectSet π T) f
(BitString.chi_comp_eq_chi_projectSet) Håstad.
Main definitions #
Cslib.BitString.longCode: the long code of a label.Cslib.BitString.IsOdd: odd (folded) Boolean functions.Cslib.BitString.foldTable: folding a table around a coordinate.Cslib.BitString.projectSet: the mod-2 projection of a set along a map.Cslib.BitString.longCodeSubcubeAccept,Cslib.BitString.longCodeSubcubeProb: the two-query subcube test on a long-code table (B f || !B gforg ≤ f) and its acceptance probability.
Main results #
Cslib.BitString.longCode_eq_hadamardCode,Cslib.BitString.eq_of_hammingDist_longCode_lt: the long code is a Hadamard code, and unique decoding of the long code.Cslib.BitString.isOdd_longCode,Cslib.BitString.isOdd_foldTable: long codes and folded tables are odd.Cslib.BitString.IsOdd.fourierCoeff_empty,Cslib.BitString.IsOdd.fourierCoeff_of_even: odd functions have no Fourier weight on sets of even cardinality.Cslib.BitString.chi_comp_eq_chi_projectSet: pulling a character back along a map.Cslib.BitString.longCodeSubcubeProb_longCode,Cslib.BitString.longCodeSubcubeProb_hadamardCode,Cslib.BitString.longCodeSubcubeProb_hadamardCode_le,Cslib.BitString.longCodeSubcubeProb_le_of_linear: every long code passes the subcube test with probability1, while every nonzero linear functionhadamardCode spasses with probability3 / 4 + (1 / 2) ^ (#{i | s i} + 1)(≤ 7 / 8when2 ≤ #{i | s i}, i.e. wheneverBis linear, nonzero, and not a long-code codeword).
References #
The long code #
The long code of a label a : ι: the dictator r ↦ r a on ι → Bool, that is, the
evaluation Function.eval a Arora and Barak, Chapter 22. It is the Hadamard
encoding of the unit vector of a (longCode_eq_hadamardCode).
The long code of a is the Hadamard encoding of the unit vector of a.
Unique decoding of the long code: a Boolean function within relative distance less than
1/4 of the long codes of a and of b forces a = b.
Odd functions and folding #
A Boolean function B : (α → Bool) → Bool is odd when complementing the input
(f + fun _ => true) complements the output. In ±1 notation this says F (-x) = -F x; such
functions are also called self-dual, and odd long code tables are called folded.
An odd function has Fourier coefficient 0 on every set of even cardinality.
An odd function has zero empty Fourier coefficient: its ±1 values at f and
f + fun _ => true cancel. This is the case S = ∅ of IsOdd.fourierCoeff_of_even.
The subcube test on the long code #
The long-code subcube test predicate (Arora and Barak,
Chapter 18, Exercise 16(d)): on random f, h : α → Bool, if B f = false, check that
B (fun i => f i && h i) = false (where fun i => f i && h i is a uniformly random point in the
subcube {g | ∀ i, g i ≤ f i}); equivalently, B (fun i => f i && h i) ≤ B f
(B f || !B (fun i => f i && h i)).
Every long code passes longCodeSubcubeAccept on every query pair (f, h).
The long-code subcube test acceptance probability (Arora and Barak,
Chapter 18, Exercise 16(d)): the probability over independent uniform f, h : α → Bool that
longCodeSubcubeAccept B f h = true.
Completeness of the long-code subcube test (Arora and Barak,
Chapter 18, Exercise 16(d)): every long code passes the subcube test with probability 1.
For fixed f : α → Bool, the bitwise conjunction fun i => f i && h i with a uniform
h : α → Bool is uniformly distributed on the subcube {g : α → Bool | ∀ i, g i ≤ f i}: each
g in the subcube has fiber {h | ∀ i, (h + g) i ≤ !f i}, a coset of {k | ∀ i, k i ≤ !f i}.
The acceptance probability of the long-code subcube test equals the expectation over uniform
f : α → Bool and uniform g in the subcube {g : α → Bool | ∀ i, g i ≤ f i} of
bitVal ℝ (B f || !B g).
Averaging chi ℝ S (fun i => f i && h i) over independent uniform f, h : α → Bool yields
(1 / 2) ^ #S, the probability that f vanishes on S.
Acceptance probability of the long-code subcube test on a nonzero linear function
(Arora and Barak, Chapter 18, Exercise 16(d)): for any s : α → Bool with s ≠ 0,
the Hadamard codeword hadamardCode s passes the subcube test with probability
3 / 4 + (1 / 2) ^ (#{i | s i} + 1).
Soundness of the long-code subcube test against linear functions of weight at least 2
(Arora and Barak, Chapter 18, Exercise 16(d)): if 2 ≤ #{i | s i}, then
hadamardCode s passes the subcube test with probability at most 7 / 8.
Soundness of the long-code subcube test against nonzero non-dictator linear functions
(Arora and Barak, Chapter 18, Exercise 16(d)): if B : (α → Bool) → Bool is a
linear function (∀ f g, B (f + g) = (B f ^^ B g)) that is nonzero and not a long-code codeword,
then B passes the subcube test with probability at most 7 / 8.