Documentation

Complexity.Foundations.Data.Code.LocalListDecoding

Local list decoding of Reed–Muller codes along lines with advice #

Let p be a polynomial of total degree at most d in m variables over a field F with q elements, and let g agree with p on a set A of a points, a small fraction of the Q = q ^ m points. Local list decoding [STV01] recovers p(x) at most points x by decoding g along the line through x and a fixed point z, using the advice p(z) to single out p among the polynomials that agree with g on the line.

The decoder Cslib.Code.lineListDecode g d D z a x parametrizes the line by t ↦ x + t • v, where v is z - x scaled so that its first nonzero entry is 1 (Cslib.LinearAlgebra.firstNonzero); then z = x + c • v for c the first nonzero entry of z - x. It runs Sudan decoding with the hint a at c on the restriction of g to the line (Cslib.Code.hintDecode). The direction v and the received word depend only on x and the line, not on the position of z on it, so the hint position c is uniformly distributed over F ∖ {0} given the line.

Two things can go wrong for a pair (x, z): the line can have at most D agreements, or the hint position can be one of the at most D - d bad positions of Cslib.Code.card_hintDecode_ne_le. Points of a random line are pairwise independent and uniform, so the number N of agreements on the line through a random point in a random direction has mean μ = q * a / Q and variance at most μ, and Chebyshev's inequality bounds the first event (Cslib.Code.card_filter_lineAgree_le_mul_sq_le). The second has probability at most (D - d) / (q - 1) given the line. Averaging over z (Cslib.Code.exists_card_lineListDecode_ne_le), some advice point z makes the decoder, with the advice p(z), correct at all but 1 + (q * a * (Q - 1) / (μ - D) ^ 2 + Q * (Q - 1) * (D - d) / (q - 1)) / Q points.

Main definitions #

Main results #

References #

Random lines sample well #

def Cslib.Code.lineAgree {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} (A : Finset (Fin m → F)) (x u : Fin m → F) :

The number of points of the line t ↦ x + t • u in A.

Instances For
    theorem Cslib.Code.card_filter_lineAgree_le_mul_sq_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} (A : Finset (Fin m → F)) {D : ℝ} (hD : D < ↑(Fintype.card F) * ↑A.card / ↑(Fintype.card F) ^ m) :
    ↑{xu : (Fin m → F) × (Fin m → F) | xu.2 ≠ 0 ∧ ↑(lineAgree A xu.1 xu.2) ≤ D}.card * (↑(Fintype.card F) * ↑A.card / ↑(Fintype.card F) ^ m - D) ^ 2 ≤ ↑(Fintype.card F) * ↑A.card * (↑(Fintype.card F) ^ m - 1)

    Random lines sample a set well. Over all points x and nonzero directions u, the number of pairs for which the line t ↦ x + t • u has at most D points in A is at most q * a * (Q - 1) / (μ - D) ^ 2, where a = #A, Q = q ^ m and μ = q * a / Q > D is the mean number of points of a line in A.

    The decoder #

    noncomputable def Cslib.Code.lineListDecode {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} (g : (Fin m → F) → F) (d D : ℕ) (z : Fin m → F) (a : F) (x : Fin m → F) :
    F

    The local list decoder with advice. To decode at x with advice a at z: parametrize the line through x and z as t ↦ x + t • v, with v the normalization of z - x, and run Sudan decoding with the hint a at the position c = firstNonzero (z - x) of z on the restriction of g to the line.

    Instances For
      theorem Cslib.Code.lineAgree_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} (A : Finset (Fin m → F)) (x u : Fin m → F) {c : F} (hc : c ≠ 0) :
      lineAgree A x (c • u) = lineAgree A x u

      Scaling the direction by a nonzero constant does not change the number of points of a line in a set.

      theorem Cslib.Code.lineListDecode_eq {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} (g p : (Fin m → F) → F) (d D : ℕ) {x z : Fin m → F} (hxz : z ≠ x) :
      lineListDecode g d D z (p z) x = hintDecode id (fun (t : F) => g (x + t • (LinearAlgebra.firstNonzero (z - x))⁻¹ • (z - x))) d D (LinearAlgebra.firstNonzero (z - x)) (p (x + LinearAlgebra.firstNonzero (z - x) • (LinearAlgebra.firstNonzero (z - x))⁻¹ • (z - x)))

      The decoder at a pair of points. For z ≠ x, with c = firstNonzero (z - x) and v = c⁻¹ • (z - x), the decoder with advice p z is Sudan decoding with the hint p (x + c • v) at c on the line t ↦ x + t • v.

      theorem Cslib.Code.exists_card_lineListDecode_ne_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d D : ℕ} (hd : 1 ≤ d) (hn : Fintype.card F < (Sudan.monomials d D).card) (hDq : D < Fintype.card F) {p : (Fin m → F) → F} (hp : p ∈ reedMuller F m d) (g : (Fin m → F) → F) (hμ : ↑D < ↑(Fintype.card F) * ↑{y : Fin m → F | g y = p y}.card / ↑(Fintype.card F) ^ m) :
      ∃ (z : Fin m → F), ↑{x : Fin m → F | lineListDecode g d D z (p z) x ≠ p x}.card ≤ 1 + (↑(Fintype.card F) * ↑{y : Fin m → F | g y = p y}.card * (↑(Fintype.card F) ^ m - 1) / (↑(Fintype.card F) * ↑{y : Fin m → F | g y = p y}.card / ↑(Fintype.card F) ^ m - ↑D) ^ 2 + ↑(Fintype.card F) ^ m * (↑(Fintype.card F) ^ m - 1) * ↑(D - d) / (↑(Fintype.card F) - 1)) / ↑(Fintype.card F) ^ m

      Local list decoding of Reed–Muller codes, a variant of [STV01]. Let p be a codeword of the Reed–Muller code of degree d ≥ 1 in m variables over a field with q elements, Q = q ^ m, and let g agree with p on a points. Let D < q be such that there are more than q monomials of (1, d)-weighted degree at most D, and suppose D < μ = q * a / Q. Then for some advice point z, the decoder lineListDecode g d D z (p z) computes p at all but 1 + (q * a * (Q - 1) / (μ - D) ^ 2 + Q * (Q - 1) * (D - d) / (q - 1)) / Q points.