Documentation

CslibFrontier.Crypto.Computational.GoldreichLevin.WordListDecoder

Polynomial-time word and oracle-PPT list decoders for Goldreich–Levin (Goldreich 2008, Thm. 7.8) #

This module lifts the finite simultaneous Goldreich–Levin list decoders of CslibFrontier.Crypto.Computational.GoldreichLevin.ListDecoding (decode and decodePruned) to:

  1. Deterministic polynomial-time word algorithms (wordListDecode and wordListDecodePruned) that output duplicate-free candidate lists List (List Bool) certified by ComputableInPolyTime, and
  2. Uniform strict oracle-PPT algorithms (oracleListDecode and oracleListDecodePruned) on a structured unary parameter record ListDecodeParams (encListDecodeParams), certified by IsOraclePPTOn (which supplies explicit polynomial step, query-count, and query-length bounds via IsOraclePPTOn.query_bounds) and achieving simultaneous success probability at least 1 / 2 against every Boolean oracle B : BitString n → Bool with no efficiency assumption on B.

Main definitions #

Main results #

References #

1. Structured parameters and joint mask-enumeration certificates #

Input parameters for the uniform Goldreich–Levin list decoder:

  • dimension: the bit-length n of secret strings x : BitString n (encoded in unary),
  • precision: the correlation denominator p for agreement threshold 1 / 2 + 1 / p (encoded in unary).
  • dimension : ℕ

    Bit-length n of secret strings x : BitString n.

  • precision : ℕ

    Correlation denominator p (with target agreement 1 / 2 + 1 / p).

Instances For
    theorem Cslib.Crypto.GoldreichLevin.encListDecodeParams_dimension_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → ListDecodeParams} :
    theorem Cslib.Crypto.GoldreichLevin.encListDecodeParams_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 x1 T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encUnary T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encUnary T1 S1) :
    Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { dimension := x0 x, precision := x1 x }) encIn encListDecodeParams (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
    theorem Cslib.Crypto.GoldreichLevin.encListDecodeParams_precision_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → ListDecodeParams} :
    theorem Cslib.Crypto.GoldreichLevin.encListDecodeParams_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 x1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encUnary budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encUnary budget) :
    Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { dimension := x0 x, precision := x1 x }) encIn encListDecodeParams budget
    theorem Cslib.Crypto.GoldreichLevin.polyTime_listMaskCount {α : Type} {input : α ↪ List Bool} {dimension precision : α → ℕ} (hdimension : Turing.MultiTapeTM.ComputableInPolyTime dimension input Turing.MultiTapeTM.encUnary) (hprecision : Turing.MultiTapeTM.ComputableInPolyTime precision input Turing.MultiTapeTM.encUnary) :
    Turing.MultiTapeTM.ComputableInPolyTime (fun (a : α) => listMaskCount (dimension a) (precision a)) input Turing.MultiTapeTM.encUnary

    Computing listMaskCount is polynomial-time from unary dimension and precision.

    Computing pruneSampleCount is polynomial-time from unary dimension and precision.

    theorem Cslib.Crypto.GoldreichLevin.enumList_listMaskCount_budget {n precision L : ℕ} (hn : n ≤ L) (hp : precision ≤ L) :
    2 ^ listMaskCount n precision * (2 * listMaskCount n precision + 1) ≤ (16 * L ^ 5 + 2) * (16 * L ^ 5 + 3)

    The encoded size of enumList (listMaskCount n precision) is bounded by a fixed polynomial in L whenever n ≤ L and precision ≤ L.

    Enumerating all 2 ^ listMaskCount (dimension a) (precision a) parity guesses is polynomial-time from any unary dimension and precision.

    Computing nonzeroSelectors (listMaskCount (dimension a) (precision a)) is polynomial-time from any unary dimension and precision.

    2. Duplicate erasure on candidate word lists (dedupWords) #

    Erase duplicate bit-lists from words, preserving first-occurrence order.

    @[simp]

    dedupWords preserves list membership.

    dedupWords produces a duplicate-free list.

    @[simp]

    dedupWords preserves toFinset.

    The length of dedupWords words equals words.toFinset.card.

    3. Deterministic polynomial-time word list decoders #

    def Cslib.Crypto.GoldreichLevin.wordListDecode (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :

    Unpruned polynomial-time Goldreich–Levin word list decoder: generate all 2 ^ listMaskCount majority-vote candidates from masks and erase duplicate candidate words.

    theorem Cslib.Crypto.GoldreichLevin.polyTime_wordListDecode {α : Type} {input : α ↪ List Bool} {predictor : α → List Bool → Bool} {dimension precision : α → ℕ} {masks : α → List Bool} (hpredictor : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × List Bool) => predictor p.1 p.2) (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool) (hdimension : Turing.MultiTapeTM.ComputableInPolyTime dimension input Turing.MultiTapeTM.encUnary) (hprecision : Turing.MultiTapeTM.ComputableInPolyTime precision input Turing.MultiTapeTM.encUnary) (hmasks : Turing.MultiTapeTM.ComputableInPolyTime masks input Turing.MultiTapeTM.encBits) :
    Turing.MultiTapeTM.ComputableInPolyTime (fun (a : α) => wordListDecode (predictor a) (dimension a) (precision a) (masks a)) input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)

    wordListDecode is computable in polynomial time jointly in dimension, precision, masks, and any captured polynomial-time predictor.

    theorem Cslib.Crypto.GoldreichLevin.nodup_wordListDecode (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :
    (wordListDecode predictor dimension precision masks).Nodup

    wordListDecode always returns a duplicate-free list of words.

    theorem Cslib.Crypto.GoldreichLevin.toFinset_wordListDecode (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :
    (wordListDecode predictor dimension precision masks).toFinset = Finset.image List.ofFn (candidates (fun (query : BitString dimension) => predictor (List.ofFn query)) (BitString.block (BitString.ofList (listMaskCount dimension precision * dimension) masks)))

    The finite set of words returned by wordListDecode is the List.ofFn image of the finite candidate set candidates.

    @[simp]
    theorem Cslib.Crypto.GoldreichLevin.mem_wordListDecode_ofFn_iff (predictor : List Bool → Bool) {n precision : ℕ} (masks : List Bool) (x : BitString n) :
    List.ofFn x ∈ wordListDecode predictor n precision masks ↔ x ∈ candidates (fun (query : BitString n) => predictor (List.ofFn query)) (BitString.block (BitString.ofList (listMaskCount n precision * n) masks))

    For x : BitString n, List.ofFn x belongs to wordListDecode predictor n precision masks if and only if x belongs to candidates.

    theorem Cslib.Crypto.GoldreichLevin.mem_wordListDecode_iff (predictor : List Bool → Bool) {n precision : ℕ} (masks w : List Bool) :
    w ∈ wordListDecode predictor n precision masks ↔ ∃ x ∈ candidates (fun (query : BitString n) => predictor (List.ofFn query)) (BitString.block (BitString.ofList (listMaskCount n precision * n) masks)), List.ofFn x = w

    Every word in wordListDecode predictor n precision masks is List.ofFn x for some x ∈ candidates.

    theorem Cslib.Crypto.GoldreichLevin.length_wordListDecode_eq_card (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :
    (wordListDecode predictor dimension precision masks).length = (candidates (fun (query : BitString dimension) => predictor (List.ofFn query)) (BitString.block (BitString.ofList (listMaskCount dimension precision * dimension) masks))).card

    The length of wordListDecode equals the cardinality of the finite candidate set candidates.

    theorem Cslib.Crypto.GoldreichLevin.length_wordListDecode_le (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :
    (wordListDecode predictor dimension precision masks).length ≤ 16 * dimension * precision ^ 4 + 2

    Explicit polynomial list-length bound on wordListDecode: at most 2 ^ listMaskCount dimension precision ≤ 16 * dimension * precision ^ 4 + 2 candidates.

    theorem Cslib.Crypto.GoldreichLevin.uniform_wordListDecode_toFinset (predictor : List Bool → Bool) (dimension precision : ℕ) :
    PMF.map (fun (masks : List Bool) => (wordListDecode predictor dimension precision masks).toFinset) (BitString.uniformList (listMaskCount dimension precision * dimension)) = PMF.map (fun (s : Finset (BitString dimension)) => Finset.image List.ofFn s) (decode (fun (query : BitString dimension) => predictor (List.ofFn query)) (listMaskCount dimension precision))

    Uniform mask bits under wordListDecode induce the List.ofFn-image of the finite decode distribution on toFinset.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecode_simultaneous_success_ge_half (predictor : List Bool → Bool) (n precision : ℕ) (hprec : 0 < precision) :
    1 / 2 ≤ (PMF.map (wordListDecode predictor n precision) (BitString.uniformList (listMaskCount n precision * n))).toOuterMeasure {L : List (List Bool) | (∀ (x : BitString n), 1 / 2 + 1 / ↑precision ≤ agreement (fun (query : BitString n) => predictor (List.ofFn query)) x → List.ofFn x ∈ L) ∧ L.Nodup ∧ L.length ≤ 16 * n * precision ^ 4 + 2}

    Simultaneous word list-decoding success (ℝ≥0∞): for 0 < precision, sampling a uniform mask bit tape and running wordListDecode outputs a list containing List.ofFn x for every (1 / 2 + 1 / precision)-correlated x : BitString n with probability at least 1 / 2.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecode_simultaneous_success_toReal_ge_half (predictor : List Bool → Bool) (n precision : ℕ) (hprec : 0 < precision) :
    1 / 2 ≤ ((PMF.map (wordListDecode predictor n precision) (BitString.uniformList (listMaskCount n precision * n))).toOuterMeasure {L : List (List Bool) | (∀ (x : BitString n), 1 / 2 + 1 / ↑precision ≤ agreement (fun (query : BitString n) => predictor (List.ofFn query)) x → List.ofFn x ∈ L) ∧ L.Nodup ∧ L.length ≤ 16 * n * precision ^ 4 + 2}).toReal

    Simultaneous word list-decoding success (ℝ): real-probability form of wordListDecode_simultaneous_success_ge_half.

    def Cslib.Crypto.GoldreichLevin.wordEmpiricalHits (predictor : List Bool → Bool) (sampleRows : List (List Bool)) (candidate : List Bool) :

    Count empirical hits of candidate against predictor over a list of sample rows.

    theorem Cslib.Crypto.GoldreichLevin.polyTime_wordEmpiricalHits {α : Type} {input : α ↪ List Bool} {predictor : α → List Bool → Bool} {sampleRows : α → List (List Bool)} {candidate : α → List Bool} (hpredictor : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × List Bool) => predictor p.1 p.2) (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool) (hsampleRows : Turing.MultiTapeTM.ComputableInPolyTime sampleRows input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) (hcandidate : Turing.MultiTapeTM.ComputableInPolyTime candidate input Turing.MultiTapeTM.encBits) :
    Turing.MultiTapeTM.ComputableInPolyTime (fun (a : α) => wordEmpiricalHits (predictor a) (sampleRows a) (candidate a)) input Turing.MultiTapeTM.encUnary

    wordEmpiricalHits is computable in polynomial time jointly in sampleRows, candidate, and any captured polynomial-time predictor.

    theorem Cslib.Crypto.GoldreichLevin.wordEmpiricalHits_eq_empiricalHits {n m : ℕ} (predictor : List Bool → Bool) (samples : Fin m → BitString n) (x : BitString n) :
    wordEmpiricalHits predictor (List.ofFn fun (j : Fin m) => List.ofFn (samples j)) (List.ofFn x) = empiricalHits (fun (query : BitString n) => predictor (List.ofFn query)) samples x

    On List.ofFn sample rows and List.ofFn x, wordEmpiricalHits agrees with empiricalHits.

    def Cslib.Crypto.GoldreichLevin.wordPruneCandidates (predictor : List Bool → Bool) (num den : ℕ) (sampleRows candidates : List (List Bool)) :

    Filter and deduplicate a candidate word list by empirical agreement threshold num / den on sampleRows.

    def Cslib.Crypto.GoldreichLevin.wordListDecodePruned (predictor : List Bool → Bool) (dimension precision : ℕ) (masks samples : List Bool) :

    Two-stage pruned polynomial-time Goldreich–Levin word list decoder: generate candidate words from masks using listMaskCount dimension precision masks, then prune them on pruneSampleCount dimension precision sample words from samples at threshold (2 * precision + 3) / (4 * precision).

    theorem Cslib.Crypto.GoldreichLevin.polyTime_wordListDecodePruned {α : Type} {input : α ↪ List Bool} {predictor : α → List Bool → Bool} {dimension precision : α → ℕ} {masks samples : α → List Bool} (hpredictor : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × List Bool) => predictor p.1 p.2) (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool) (hdimension : Turing.MultiTapeTM.ComputableInPolyTime dimension input Turing.MultiTapeTM.encUnary) (hprecision : Turing.MultiTapeTM.ComputableInPolyTime precision input Turing.MultiTapeTM.encUnary) (hmasks : Turing.MultiTapeTM.ComputableInPolyTime masks input Turing.MultiTapeTM.encBits) (hsamples : Turing.MultiTapeTM.ComputableInPolyTime samples input Turing.MultiTapeTM.encBits) :
    Turing.MultiTapeTM.ComputableInPolyTime (fun (a : α) => wordListDecodePruned (predictor a) (dimension a) (precision a) (masks a) (samples a)) input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)

    wordListDecodePruned is computable in polynomial time jointly in dimension, precision, masks, samples, and any captured polynomial-time predictor.

    theorem Cslib.Crypto.GoldreichLevin.nodup_wordListDecodePruned (predictor : List Bool → Bool) (dimension precision : ℕ) (masks samples : List Bool) :
    (wordListDecodePruned predictor dimension precision masks samples).Nodup

    wordListDecodePruned always returns a duplicate-free list of words.

    theorem Cslib.Crypto.GoldreichLevin.toFinset_wordListDecodePruned (predictor : List Bool → Bool) (dimension precision : ℕ) (masks samples : List Bool) :
    (wordListDecodePruned predictor dimension precision masks samples).toFinset = Finset.image List.ofFn (prunedCandidates (fun (query : BitString dimension) => predictor (List.ofFn query)) (2 * precision + 3) (4 * precision) (BitString.block (BitString.ofList (listMaskCount dimension precision * dimension) masks)) (BitString.block (BitString.ofList (pruneSampleCount dimension precision * dimension) samples)))

    The finite set of words returned by wordListDecodePruned is the List.ofFn image of prunedCandidates.

    @[simp]
    theorem Cslib.Crypto.GoldreichLevin.mem_wordListDecodePruned_ofFn_iff (predictor : List Bool → Bool) {n precision : ℕ} (masks samples : List Bool) (x : BitString n) :
    List.ofFn x ∈ wordListDecodePruned predictor n precision masks samples ↔ x ∈ prunedCandidates (fun (query : BitString n) => predictor (List.ofFn query)) (2 * precision + 3) (4 * precision) (BitString.block (BitString.ofList (listMaskCount n precision * n) masks)) (BitString.block (BitString.ofList (pruneSampleCount n precision * n) samples))

    For x : BitString n, List.ofFn x belongs to wordListDecodePruned if and only if x belongs to prunedCandidates.

    theorem Cslib.Crypto.GoldreichLevin.length_wordListDecodePruned_eq_card (predictor : List Bool → Bool) (dimension precision : ℕ) (masks samples : List Bool) :
    (wordListDecodePruned predictor dimension precision masks samples).length = (prunedCandidates (fun (query : BitString dimension) => predictor (List.ofFn query)) (2 * precision + 3) (4 * precision) (BitString.block (BitString.ofList (listMaskCount dimension precision * dimension) masks)) (BitString.block (BitString.ofList (pruneSampleCount dimension precision * dimension) samples))).card

    The length of wordListDecodePruned equals the cardinality of prunedCandidates.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecodePruned_simultaneous_success_ge_half (predictor : List Bool → Bool) (n precision : ℕ) (hprec : 0 < precision) :
    1 / 2 ≤ ((BitString.uniformList (listMaskCount n precision * n)).bind fun (masks : List Bool) => PMF.map (wordListDecodePruned predictor n precision masks) (BitString.uniformList (pruneSampleCount n precision * n))).toOuterMeasure {L : List (List Bool) | (∀ (x : BitString n), 1 / 2 + 1 / ↑precision ≤ agreement (fun (query : BitString n) => predictor (List.ofFn query)) x → List.ofFn x ∈ L) ∧ (∀ (x : BitString n), List.ofFn x ∈ L → 1 / 2 + 1 / (2 * ↑precision) ≤ agreement (fun (query : BitString n) => predictor (List.ofFn query)) x) ∧ L.Nodup ∧ L.length ≤ precision ^ 2}

    Pruned simultaneous word list-decoding success (ℝ≥0∞): for 0 < precision, sampling independent uniform mask and sample bit tapes and running wordListDecodePruned succeeds with probability at least 1 / 2 in returning a duplicate-free list L that:

    1. contains List.ofFn x for every x : BitString n with 1 / 2 + 1 / precision ≤ agreement,
    2. contains only List.ofFn x for x : BitString n with 1 / 2 + 1 / (2 * precision) ≤ agreement,
    3. has length at most precision ^ 2.

    4. Uniform strict oracle-PPT list decoders (oracleListDecode, oracleListDecodePruned) #

    def Cslib.Crypto.GoldreichLevin.candidateQueries (dimension : ℕ) (rows selectors : List (List Bool)) :

    All oracle queries made during candidate generation on (dimension, rows, selectors).

    def Cslib.Crypto.GoldreichLevin.listDecodeQueries (dimension precision : ℕ) (masks : List Bool) :

    All oracle queries made by wordListDecode on (dimension, precision) and mask tape masks.

    listDecodeQueries is computable in polynomial time.

    def Cslib.Crypto.GoldreichLevin.listDecodePrunedQueries (dimension precision : ℕ) (masks samples : List Bool) :

    All oracle queries made by wordListDecodePruned on (dimension, precision), mask tape masks, and sample tape samples.

    def Cslib.Crypto.GoldreichLevin.lookupReply (queries : List (List Bool)) (replies query : List Bool) :

    Look up the Boolean reply for query in a (queries, replies) transcript table.

    lookupReply is computable in polynomial time.

    theorem Cslib.Crypto.GoldreichLevin.lookupReply_map_of_mem (predictor : List Bool → Bool) {queries : List (List Bool)} {query : List Bool} (hq : query ∈ queries) :
    lookupReply queries (List.map predictor queries) query = predictor query

    Looking up query ∈ queries in (queries, queries.map predictor) returns predictor query.

    theorem Cslib.Crypto.GoldreichLevin.wordCandidate_congr {predictor₁ predictor₂ : List Bool → Bool} (dimension : ℕ) (rows selectors : List (List Bool)) (guess : List Bool) (hagree : ∀ q ∈ candidateQueries dimension rows selectors, predictor₁ q = predictor₂ q) :
    wordCandidate predictor₁ dimension rows selectors guess = wordCandidate predictor₂ dimension rows selectors guess

    wordCandidate depends on predictor only at queries in candidateQueries.

    theorem Cslib.Crypto.GoldreichLevin.wordCandidates_congr {predictor₁ predictor₂ : List Bool → Bool} (dimension : ℕ) (rows guesses : List (List Bool)) (hagree : ∀ q ∈ candidateQueries dimension rows (List.filter (fun (word : List Bool) => word.any id) guesses), predictor₁ q = predictor₂ q) :
    wordCandidates predictor₁ dimension rows guesses = wordCandidates predictor₂ dimension rows guesses

    wordCandidates depends on predictor only at queries in candidateQueries.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecode_congr {predictor₁ predictor₂ : List Bool → Bool} (dimension precision : ℕ) (masks : List Bool) (hagree : ∀ q ∈ listDecodeQueries dimension precision masks, predictor₁ q = predictor₂ q) :
    wordListDecode predictor₁ dimension precision masks = wordListDecode predictor₂ dimension precision masks

    wordListDecode depends on predictor only at queries in listDecodeQueries.

    theorem Cslib.Crypto.GoldreichLevin.wordEmpiricalHits_congr {predictor₁ predictor₂ : List Bool → Bool} (sampleRows : List (List Bool)) (candidate : List Bool) (hagree : ∀ q ∈ sampleRows, predictor₁ q = predictor₂ q) :
    wordEmpiricalHits predictor₁ sampleRows candidate = wordEmpiricalHits predictor₂ sampleRows candidate

    wordEmpiricalHits depends on predictor only at queries in sampleRows.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecodePruned_congr {predictor₁ predictor₂ : List Bool → Bool} (dimension precision : ℕ) (masks samples : List Bool) (hagree : ∀ q ∈ listDecodePrunedQueries dimension precision masks samples, predictor₁ q = predictor₂ q) :
    wordListDecodePruned predictor₁ dimension precision masks samples = wordListDecodePruned predictor₂ dimension precision masks samples

    wordListDecodePruned depends on predictor only at queries in listDecodePrunedQueries.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecode_lookupReply_map (predictor : List Bool → Bool) (dimension precision : ℕ) (masks : List Bool) :
    have queries := listDecodeQueries dimension precision masks; wordListDecode (lookupReply queries (List.map predictor queries)) dimension precision masks = wordListDecode predictor dimension precision masks

    Running wordListDecode with lookupReply queries (queries.map predictor) where queries = listDecodeQueries dimension precision masks equals wordListDecode predictor.

    theorem Cslib.Crypto.GoldreichLevin.wordListDecodePruned_lookupReply_map (predictor : List Bool → Bool) (dimension precision : ℕ) (masks samples : List Bool) :
    have queries := listDecodePrunedQueries dimension precision masks samples; wordListDecodePruned (lookupReply queries (List.map predictor queries)) dimension precision masks samples = wordListDecodePruned predictor dimension precision masks samples

    Running wordListDecodePruned with lookupReply queries (queries.map predictor) where queries = listDecodePrunedQueries dimension precision masks samples equals wordListDecodePruned predictor.

    One step of batch oracle querying: query queries.getD replies.length [] on channel () and append the first reply bit (defaulting to false if the reply is empty) to replies.

    Query every word in queries in order on channel (), returning the list of first reply bits.

    queryBatch composed with a polynomial-time query-list generator is uniform strict oracle PPT.

    Stateless oracle handler on channel Unit that answers each query q.2 with the 1-bit reply [predictor q.2].

    Extend an n-bit Boolean oracle B : BitString n → Bool to arbitrary bit lists via BitString.ofList n.

    @[simp]

    On List.ofFn x for x : BitString n, bitStringPredictor B equals B x.

    Stateless oracle handler on channel Unit for an arbitrary n-bit Boolean function B : BitString n → Bool. No efficiency assumption is placed on B.

    Against predictorOracle predictor, queryBatch queries returns queries.map predictor.

    Uniform strict oracle-PPT Goldreich–Levin list decoder (unpruned): sample listMaskCount random masks, batch-query the oracle on listDecodeQueries, and return the duplicate-free candidate list wordListDecode.

    Uniform polynomial bounds on the number of oracle queries and the length of every oracle query made by oracleListDecode.

    Simultaneous oracle-PPT list decoding (ℝ≥0∞): for every Boolean oracle B : BitString p.dimension → Bool (with no efficiency assumption on B) and 0 < p.precision, running oracleListDecode p against bitStringOracle B outputs with probability at least 1 / 2 a duplicate-free list L of size at most 16 * p.dimension * p.precision ^ 4 + 2 that contains List.ofFn x for every x : BitString p.dimension with 1 / 2 + 1 / p.precision ≤ agreement B x.

    Uniform strict oracle-PPT Goldreich–Levin pruned list decoder: sample listMaskCount random masks and pruneSampleCount random estimation points, batch-query the oracle on listDecodePrunedQueries, and return the pruned duplicate-free candidate list wordListDecodePruned.

    Uniform polynomial bounds on the number of oracle queries and the length of every oracle query made by oracleListDecodePruned.

    Pruned simultaneous oracle-PPT list decoding (ℝ≥0∞, Goldreich 2008 Theorem 7.8): for every Boolean oracle B : BitString p.dimension → Bool (with no efficiency assumption on B) and 0 < p.precision, running oracleListDecodePruned p against bitStringOracle B succeeds with probability at least 1 / 2 in returning a duplicate-free list L that:

    1. contains List.ofFn x for every x : BitString p.dimension with 1 / 2 + 1 / p.precision ≤ agreement B x,
    2. contains only List.ofFn x for x : BitString p.dimension with 1 / 2 + 1 / (2 * p.precision) ≤ agreement B x,
    3. has length at most p.precision ^ 2.