Locally decodable codes #
A code C : (ι → Bool) → P → Γ encodes messages, bit strings indexed by ι, as words over the
alphabet Γ indexed by the positions P. A local decoder A : LocalDecoder ι P Γ is, for
each message index i, a program with private coins (ProbOracleComp) that queries positions of
a received word and guesses the bit i of the message. The queries are genuine oracle calls, so
the decoder may be adaptive, and its query budget is the library's
ProbOracleComp.IsQueryBounded: on every path, whatever its coins and the symbols read.
IsLocalDecoder C q δ ε A:Amakes at mostqqueries and, from every wordywithin Hamming distanceδ |P|of the codewordC x, outputs each bitx iwith probability at least1 / 2 + ε[KT00]. This is Kerenidis and de Wolf, Definition 1 and Appendix B (numbering of arXiv:quant-ph/0208062v2), except that the decoder here may be adaptive; Yekhanin, Definition 2.1 also allows adaptive decoders and writes the success probability as1 - ε.IsSmoothDecoder C q c ε A:Amakes at mostqqueries, decodes the codewords themselves with probability at least1 / 2 + ε, and on codewords reads each position at mostc / |P|times in expectation (Code.expectedReads, anOracleComp.expectedCost). Smooth codes in Kerenidis and de Wolf, Definition 3, after [KT00], have non-adaptive decoders and bound the probability of querying each position byc / |P|. A position that is read is read at least once, so the expected-reads bound here implies that read-probability bound; the two coincide for decoders that never read a position twice, such as one-query decoders. The decoders here may be adaptive, soIsSmoothDecoderdoes not imply the non-adaptivity clause of the source definition.
The received word is the oracle: Code.decodeLaw program y answers the private coins uniformly
and each query j by y j. A decoder whose expected reads do not depend on the received word
has oblivious reads (Code.HasObliviousReads); every non-adaptive decoder
(Code.nonadaptive), which draws its queries and its decision rule before reading anything, is
one (Code.hasObliviousReads_nonadaptive).
Main definitions #
Cslib.Code.LocalDecoder: decoders querying a received word.Cslib.Code.decodeLaw,Cslib.Code.expectedReads: the output distribution and the expected number of reads of a position, against a received word.Cslib.Code.IsLocalDecoder,Cslib.Code.IsLocallyDecodable:(q, δ, ε)local decoding.Cslib.Code.IsSmoothDecoder,Cslib.Code.IsSmoothCode:(q, c, ε)smooth decoding.Cslib.Code.HasObliviousReads: reads that do not depend on the received word.Cslib.Code.readAll,Cslib.Code.nonadaptive: non-adaptive decoders.
Main results #
Cslib.Code.sum_expectedReads_le: a decoder makingqqueries readsqpositions in expectation.Cslib.Code.decodeLaw_nonadaptive,Cslib.Code.expectedReads_nonadaptive: the output law and the reads of a non-adaptive decoder.Cslib.Code.expectedReads_nonadaptive_of_uniform: a non-adaptive decoder whose queries are each uniform reads every positionq / |P|times in expectation.
References #
A local decoder for messages indexed by ι from words over the alphabet Γ indexed by the
positions P: for each message index i, a program with private coins that queries positions of
the received word and guesses the bit i of the message.
The handler answering private coins uniformly and a query of the position j by y j.
The output distribution of a program with private coins run against the received word y.
The cost of a call that reads the position j; private coins are free.
The expected number of times program, run against the received word y, reads the
position j.
A is a (q, δ, ε) local decoder for the code C: it makes at most q queries, and from
every word within Hamming distance δ |P| of the codeword of x it outputs each bit of x with
probability at least 1 / 2 + ε. This is Kerenidis and de Wolf, Definition 1 and
Appendix B (arXiv:quant-ph/0208062v2), with adaptive decoders allowed.
For δ < 0 no word is within distance δ |P| of a codeword, so every decoder making at most q
queries is a (q, δ, ε) local decoder; the statements below assume 0 < δ where it matters.
- isQueryBounded (i : ι) : (A i).IsQueryBounded q
Each bit is decoded with at most
qqueries on every path. - correct (x : ι → Bool) (y : P → Γ) (i : ι) : ↑(hammingDist y (C x)) ≤ δ * ↑(Fintype.card P) → 1 / 2 + ε ≤ ((decodeLaw (A i) y) (x i)).toReal
Every bit is recovered from every word close to the codeword.
A is a (q, c, ε) smooth decoder for the code C: it makes at most q queries, outputs
each bit of x from the codeword of x with probability at least 1 / 2 + ε, and on codewords
reads each position at most c / |P| times in expectation.
Compared with Kerenidis and de Wolf, Definition 3 (arXiv:quant-ph/0208062v2), the decoder may be adaptive, and the bound is on expected reads, not on the probability of reading a position. Expected reads bound that probability, so the read-probability clause of the source definition follows; the non-adaptivity clause does not.
- isQueryBounded (i : ι) : (A i).IsQueryBounded q
Each bit is decoded with at most
qqueries on every path. Every bit is recovered from the codeword.
- smooth (x : ι → Bool) (i : ι) (j : P) : (expectedReads (A i) (C x) j).toReal ≤ c / ↑(Fintype.card P)
On codewords, no position is read more than
c / |P|times in expectation.
The code C is a (q, δ, ε) locally decodable code: it has a (q, δ, ε) local decoder.
The code C is a (q, c, ε) smooth code: it has a (q, c, ε) smooth decoder.
The program reads each position equally often in expectation against every received word.
A program with oblivious reads reads each position as often against y as against y'.
The output law #
A private coin of n bits is uniform. A rewrite lemma, used with rw: simp does not match
the call OracleComp.query (.inl n) at the index type of probOracleSpec.
A query of the position j is answered by y j. A rewrite lemma, used with rw, like
decodeLaw_query_inl.
Expected reads #
A decoder making at most q queries reads at most q positions in expectation.
A decoder making at most q queries reads each position at most q times in expectation.
Non-adaptive decoders #
Read the positions Q 0, …, Q (q - 1) in order, returning the symbols read.
The non-adaptive decoder that draws a random string r from coins, reads the positions
Q r k for k < q, and outputs output r of the symbols read.
A call reads its position, then the continuation runs on the answer.
A non-adaptive decoder each of whose q queries is a uniform position reads every position
q / |P| times in expectation, against every received word.
A non-adaptive decoder each of whose q queries is a uniform position is a (q, q, ε) smooth
decoder as soon as it decodes codewords with probability 1 / 2 + ε.