Documentation

CslibFrontier.Computability.Circuit.Boolean.HardnessAmplification.GLAmp

The Goldreich–Levin amplification of a Boolean function #

glAmp f k is the function Amp(f) = (f^k)^GL of Carmosino, Impagliazzo, Kabanets and Kolokolova [CarmosinoImpagliazzoKabanetsKolokolova2016, Thm 4.3]: the k-fold direct product of f followed by the Goldreich–Levin inner product [GL89]. On k blocks x₁, …, x_k of n bits followed by a mask r of k bits, it is ∑ᵢ rᵢ f(xᵢ) over GF(2).

The blocks come first, cut by Cslib.BitString.block as in Cslib.Circuits.Boolean.xorPower, and the mask last, as in Cslib.Circuits.Boolean.hardnessEncode. This module has only the definition and its evaluation; the circuit computing it with one parity gate is Cslib.Circuits.Boolean.glAmpCircuit.

Main definitions #

Main results #

References #

The Goldreich–Levin amplification Amp(f) = (f^k)^GL [CarmosinoImpagliazzoKabanetsKolokolova2016, Thm 4.3]. On an input of k * n + k bits, read the first k * n bits as k blocks of n bits (Cslib.BitString.block) and the last k bits as a mask r, and output the inner product over GF(2) of the values of f on the blocks with r.

@[simp]
theorem Cslib.Circuits.Boolean.glAmp_append {n : ℕ} (f : BooleanFunction n) (k : ℕ) (x : BitString (k * n)) (r : BitString k) :
glAmp f k (Fin.append x r) = (fun (i : Fin k) => f (BitString.block x i)) ⬝ᵥ r

At the input (x, r), glAmp f k is the inner product of the values of f on the blocks of x with r.

theorem Cslib.Circuits.Boolean.glAmp_append_eq_parityOn {n : ℕ} (f : BooleanFunction n) (k : ℕ) (x : BitString (k * n)) (r : BitString k) :
glAmp f k (Fin.append x r) = parityOn {i : Fin k | r i = true} fun (i : Fin k) => f (BitString.block x i)

At the input (x, r), glAmp f k is the parity of the values of f on the blocks of x that r selects.