Documentation

CslibFrontier.Computability.LocallyDecodable.Hadamard

The Hadamard code is a two-query locally decodable code #

The Hadamard code BitString.hadamardCode x a = x ⬝ᵥ a of a message x : ι → Bool has a local decoder making two queries: to recover the bit x i from a received word y, draw a uniform r : ι → Bool, read y r and y (eᵢ + r), and output their exclusive or (BitString.hadamardDecoder). Each of the two positions read is uniform, so a word that differs from the codeword on a fraction δ of the positions corrupts either read with probability at most δ, and the decoder fails with probability at most 2 δ (BitString.one_sub_two_mul_le_expect_selfCorrect_eq_apply). It is therefore a (2, δ, 1 / 2 - 2 δ) local decoder for every δ, and a (2, 2, 1 / 2) smooth decoder Arora and Barak, Chapters 11 and 19, Yekhanin, Chapter 1.

Main definitions #

Main results #

References #

noncomputable def Cslib.BitString.hadamardDecoder {ι : Type} [Fintype ι] [DecidableEq ι] :

The two-query local decoder of the Hadamard code: to decode the bit i, draw a uniform r, read the received word at r and at eᵢ + r, and output the exclusive or of the two symbols.

theorem Cslib.BitString.map_hadamardDecoder_query {ι : Type} [Fintype ι] [DecidableEq ι] (i : ι) (k : Fin 2) :
PMF.map (fun (r : ι → Bool) => ![r, Pi.single i true + r] k) (ProbComp.uniform (ι → Bool)).eval = Probability.PMF.uniformOfFintype (ι → Bool)

Both reads of the Hadamard decoder are uniform positions.

The reads of the Hadamard decoder do not depend on the received word.

The Hadamard code is locally decodable with two queries: from a word that differs from the codeword on a fraction δ of the positions, the decoder outputs each bit of the message with probability at least 1 - 2 δ.

The Hadamard code is a smooth code with two queries: its decoder reads each of the 2 ^ |ι| positions 2 / 2 ^ |ι| times in expectation and decodes codewords exactly.