Nonuniform Goldreich–Levin decoding #
Goldreich–Levin decoding [GL89] recovers a string x from a predictor for its
parities x ⬝ r with agreement 1 / 2 + ε, with probability at least 1 / 2 over random masks
and for one of 2 ^ k guesses (Cslib.Crypto.GoldreichLevin.decode_failure_le_half). This module
turns that into a statement about fixed choices, as needed for nonuniform reconstruction: for a
family of predictors pred x with targets target x, if a set good of indices has agreement at
least 1 / 2 + ε, then one fixed choice of masks and of the guess makes the corrected-majority
candidate equal to the target for at least #good / 2 ^ (k + 1) of the indices
(Cslib.Crypto.GoldreichLevin.exists_card_candidate_eq). The proof averages the success
probability over the masks and over a uniformly random guess
(Cslib.Crypto.GoldreichLevin.card_mul_le_two_mul_sum_card_candidate_eq).
The same sum gives a density form: a #good / (2 ^ (k + 2) * #X) fraction of the choices of
masks and guess each recover a 1 / 2 ^ (k + 2) fraction of the good targets
(Cslib.Crypto.GoldreichLevin.dens_filter_candidate_eq_ge). Reverse averaging also finds the good
indices: if the predictors agree with the parities on a 1 / 2 + ε fraction of all pairs, then an
ε / 2 fraction of the indices have agreement 1 / 2 + ε / 2
(Cslib.Crypto.GoldreichLevin.dens_filter_agreement_ge). Both use
Fintype.expect_sub_le_dens_filter.
Main results #
Cslib.Crypto.GoldreichLevin.agreement_eq_card_div: agreement as a count.Cslib.Crypto.GoldreichLevin.card_le_two_mul_card_filter_mem_candidates: the counting form of the decoding guarantee.Cslib.Crypto.GoldreichLevin.card_mul_le_two_mul_sum_card_candidate_eq: the decoding count summed over masks and guesses.Cslib.Crypto.GoldreichLevin.exists_card_candidate_eq: fixed masks and guess recover a1 / 2 ^ (k + 1)fraction of the good targets.Cslib.Crypto.GoldreichLevin.dens_filter_candidate_eq_ge: the density form, for a fraction of the masks and guesses.Cslib.Crypto.GoldreichLevin.dens_filter_agreement_ge,Cslib.Crypto.GoldreichLevin.card_filter_agreement_ge: averaging from agreement over pairs to agreement per index.
References #
The decoding guarantee in counting form. If a predictor agrees with the parities of x on
a 1 / 2 + ε fraction of queries and n ≤ 2 * ε ^ 2 * (2 ^ k - 1), then x is a candidate for at
least half of the choices of the k masks.
The Goldreich–Levin count, summed over masks and guesses. Let pred x be predictors for
the parities of target x, and let every index of good have agreement at least 1 / 2 + ε, with
n ≤ 2 * ε ^ 2 * (2 ^ k - 1) and k ≥ 1. Summed over all masks and guesses, the number of indices
whose corrected-majority candidate equals the target is at least half of #good times the number
of masks.
Nonuniform Goldreich–Levin decoding. Let pred x be predictors for the parities of
target x, indexed by a finite type, and let every index of good have agreement at least
1 / 2 + ε, with n ≤ 2 * ε ^ 2 * (2 ^ k - 1) and k ≥ 1. Then for some fixed masks and guess the
corrected-majority candidate equals the target for at least #good / 2 ^ (k + 1) indices.
Nonuniform Goldreich–Levin decoding, density form. Under the hypotheses of
exists_card_candidate_eq, the corrected-majority candidate equals the target for at least
#good / 2 ^ (k + 2) indices for at least a #good / (2 ^ (k + 2) * #X) fraction of the masks and
guesses. This is reverse averaging (Fintype.expect_sub_le_dens_filter) applied to the sum
card_mul_le_two_mul_sum_card_candidate_eq.
Averaging for Goldreich–Levin. If predictors pred x agree with the parities of
target x on a 1 / 2 + ε fraction of all pairs (x, r), with 0 ≤ ε, then at least an
ε / 2 fraction of the indices x have agreement at least 1 / 2 + ε / 2. This is reverse
averaging (Fintype.expect_sub_le_dens_filter) for the agreement, which is at most 1.
Averaging for Goldreich–Levin, counting form. If predictors pred x agree with the
parities of target x on a 1 / 2 + ε fraction of all pairs (x, r), with 0 ≤ ε, then at least
ε / 2 * #X indices have agreement at least 1 / 2 + ε / 2.