Documentation

CslibFrontier.Foundations.Data.Code.ProximityGap.Unique

Proximity gaps for Reed–Solomon codes in the unique-decoding regime #

This module proves correlated agreement and proximity gaps for Reed–Solomon codes in the unique-decoding regime 2 * e + k ≤ |ι| over arbitrary fields, following Ben-Sasson, Carmon, Ishai, Kopparty, and Saraf [BSCI+23], Theorem 4.1 (affine lines), Theorem 6.1 (parameterized curves), and Theorem 1.2 (the finite-field proximity-gap dichotomy).

Mathematical overview #

Let α : ι → F be distinct evaluation points with n = |ι| and let e, k : ℕ satisfy 2 * e + k ≤ n. Given d + 1 words u : Fin (d + 1) → (ι → F) and a finite set S : Finset F of size strictly greater than d * n such that every curve point ∑ j, z ^ (j : ℕ) • u j (z ∈ S) lies within Hamming distance e of reedSolomon α k, there exists a single shared coordinate subset D' : Finset ι of size at least n - e together with codewords v : Fin (d + 1) → (ι → F) in reedSolomon α k such that u j i = v j i for all i ∈ D' and all j (Cslib.Code.exists_correlatedAgreement_curve_unique). Specializing d = 1 yields correlated agreement on affine lines u₀ + z • u₁ above the exact threshold n < #S (Cslib.Code.exists_correlatedAgreement_unique).

The proof follows the bivariate Berlekamp–Welch interpolation strategy of [BenSassonCarmonIshaiKoppartySaraf2020, Section 4]:

  1. Form the n × (2 * e + k + 1) Berlekamp–Welch linear system over F[Z] whose first k + e columns have Z-degree 0 and whose last e + 1 columns have Z-degree at most d.
  2. Show the system has nontrivial kernel over FractionRing F[Z] (using Cslib.Code.BerlekampWelch.exists_isSolution at every z ∈ S to annihilate any square full minor of Z-degree at most d * (e + 1) < #S) and extract a nonzero polynomial kernel vector (A, B) ∈ F[Z][X] × F[Z][X] via Matrix.cramer on a maximal independent column subset, giving deg_X A < k + e, deg_X B ≤ e, deg_Z A ≤ d * (e + 1), and deg_Z B ≤ d * e.
  3. Divide out the F[Z]-content of B (using Lagrange interpolation on k + e points to show it also divides A), obtaining primitive B so that B(X, z) ≠ 0 for every z : F.
  4. Factor out g = gcd A B in the GCD domain F[Z][X] to obtain relatively prime A₀, B₀, and apply a padded Sylvester resultant multiplicity bound symmetrically in both X and Z (via Polynomial.Bivariate.swap). The two resultant degree bounds force deg_Z B₀ ≤ d * deg_X B₀ and deg_X B₀ * #S ≤ d * n * deg_X B₀, forcing B₀ to be a nonzero scalar in F.
  5. Thus B ∣ A in F[Z][X], and the quotient P = A / B has X-degree < k and agrees with ∑ j, u j i * Z ^ j on D' = {i | B(α i, Z) ≠ 0} of size at least n - e.

Main results #

References #

Private algebraic helpers: degree bounds, Gauss coprimality, and Sylvester resultants #

Linear algebra helper: invertible submatrix and Cramer kernel extraction #

Stage 1: primitive bivariate Berlekamp–Welch interpolant #

Stage 2: symmetric Sylvester resultant elimination forces B ∣ A #

Stage 3: assembling the positive-regime curve theorem #

Public correlated agreement and proximity-gap theorems #

theorem Cslib.Code.hammingDist_curve_le_of_eq_on {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {e d : ℕ} {D' : Finset ι} {u v : Fin (d + 1) → ι → F} (hD' : Fintype.card ι - e ≤ D'.card) (hagree : ∀ i ∈ D', ∀ (j : Fin (d + 1)), u j i = v j i) (z : F) :
hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) (∑ j : Fin (d + 1), z ^ ↑j • v j) ≤ e

If d + 1 words u j agree with v j on a shared subset D' of size at least |ι| - e, then every linear combination ∑ j, z ^ j • u j on the parameterized curve is within Hamming distance e of ∑ j, z ^ j • v j.

theorem Cslib.Code.hammingDist_add_smul_le_of_eq_on {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {e : ℕ} {D' : Finset ι} {u₀ u₁ v₀ v₁ : ι → F} (hD' : Fintype.card ι - e ≤ D'.card) (hagree : ∀ i ∈ D', u₀ i = v₀ i ∧ u₁ i = v₁ i) (z : F) :
hammingDist (u₀ + z • u₁) (v₀ + z • v₁) ≤ e

If two words u₀, u₁ agree with v₀, v₁ on a shared subset D' of size at least |ι| - e, then u₀ + z • u₁ is within Hamming distance e of v₀ + z • v₁ for every scalar z : F.

theorem Cslib.Code.exists_correlatedAgreement_curve_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {α : ι → F} {e k d : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u : Fin (d + 1) → ι → F) (S : Finset F) (hS : d * Fintype.card ι < S.card) (hclose : ∀ z ∈ S, ∃ c ∈ reedSolomon α k, hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) c ≤ e) :
∃ (D' : Finset ι), Fintype.card ι - e ≤ D'.card ∧ ∃ (v : Fin (d + 1) → ι → F), (∀ (j : Fin (d + 1)), v j ∈ reedSolomon α k) ∧ ∀ i ∈ D', ∀ (j : Fin (d + 1)), u j i = v j i

Correlated agreement on parameterized curves in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 6.1]).

Let α : ι → F be distinct evaluation points, 2 * e + k ≤ |ι|, and u : Fin (d + 1) → (ι → F). If strictly more than d * |ι| scalars z ∈ S satisfy that the curve point ∑ j : Fin (d + 1), z ^ (j : ℕ) • u j lies within Hamming distance e of reedSolomon α k, then there exist a single shared coordinate subset D' : Finset ι with |ι| - e ≤ #D' and codewords v : Fin (d + 1) → (ι → F) in reedSolomon α k agreeing with u at every coordinate in D'.

theorem Cslib.Code.exists_correlatedAgreement_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {α : ι → F} {e k : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u₀ u₁ : ι → F) (S : Finset F) (hS : Fintype.card ι < S.card) (hclose : ∀ z ∈ S, ∃ c ∈ reedSolomon α k, hammingDist (u₀ + z • u₁) c ≤ e) :
∃ (D' : Finset ι), Fintype.card ι - e ≤ D'.card ∧ ∃ v₀ ∈ reedSolomon α k, ∃ v₁ ∈ reedSolomon α k, ∀ i ∈ D', u₀ i = v₀ i ∧ u₁ i = v₁ i

Correlated agreement on affine lines in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 4.1]).

Let α : ι → F be distinct evaluation points, 2 * e + k ≤ |ι|, and u₀, u₁ : ι → F. If strictly more than |ι| scalars z ∈ S satisfy that u₀ + z • u₁ lies within Hamming distance e of reedSolomon α k, then there exist a single shared coordinate subset D' : Finset ι with |ι| - e ≤ #D' and codewords v₀, v₁ ∈ reedSolomon α k agreeing with u₀, u₁ on D'.

theorem Cslib.Code.proximityGap_curve_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] [Fintype F] {α : ι → F} {e k d : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u : Fin (d + 1) → ι → F) [DecidablePred fun (z : F) => ∃ c ∈ reedSolomon α k, hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) c ≤ e] :
(∀ (z : F), ∃ c ∈ reedSolomon α k, hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) c ≤ e) ∨ {z : F | ∃ c ∈ reedSolomon α k, hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) c ≤ e}.card ≤ d * Fintype.card ι

Proximity-gap dichotomy for parameterized curves in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 6.1]).

Over a finite field F, for any d + 1 words u : Fin (d + 1) → (ι → F) and 2 * e + k ≤ |ι|, either every point on the curve ∑ j, z ^ j • u j lies within Hamming distance e of reedSolomon α k, or at most d * |ι| scalars z : F do.

theorem Cslib.Code.proximityGap_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] [Fintype F] {α : ι → F} {e k : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u₀ u₁ : ι → F) [DecidablePred fun (z : F) => ∃ c ∈ reedSolomon α k, hammingDist (u₀ + z • u₁) c ≤ e] :
(∀ (z : F), ∃ c ∈ reedSolomon α k, hammingDist (u₀ + z • u₁) c ≤ e) ∨ {z : F | ∃ c ∈ reedSolomon α k, hammingDist (u₀ + z • u₁) c ≤ e}.card ≤ Fintype.card ι

Proximity-gap dichotomy for affine lines in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 1.2]).

Over a finite field F, for any two words u₀, u₁ : ι → F and 2 * e + k ≤ |ι|, either every point u₀ + z • u₁ on the affine line lies within Hamming distance e of reedSolomon α k, or at most |ι| scalars z : F do.

Unique maximal agreement set and unique codewords (Theorems 1.4–1.6) #

theorem Cslib.Code.exists_uniqueMaximal_correlatedAgreement_of_exists {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] {α : ι → F} {e k : ℕ} {κ : Type u_3} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) {u : κ → ι → F} (hex : ∃ (D₀ : Finset ι), Fintype.card ι - e ≤ D₀.card ∧ ∃ (v : κ → ι → F), (∀ (j : κ), v j ∈ reedSolomon α k) ∧ ∀ i ∈ D₀, ∀ (j : κ), u j i = v j i) :
∃ (D' : Finset ι), Fintype.card ι - e ≤ D'.card ∧ ∃ (v : κ → ι → F), (∀ (j : κ), v j ∈ reedSolomon α k) ∧ (∀ i ∈ D', ∀ (j : κ), u j i = v j i) ∧ ∀ (D'' : Finset ι) (w : κ → ι → F), Fintype.card ι - e ≤ D''.card → (∀ (j : κ), w j ∈ reedSolomon α k) → (∀ i ∈ D'', ∀ (j : κ), u j i = w j i) → D'' ⊆ D' ∧ w = v

Generic uniqueness step in the unique-decoding regime: given an existing correlated-agreement witness (D₀, v) in the unique-decoding regime 2 * e + k ≤ |ι|, upgrades it to the unique maximal shared agreement set and unique codewords (used to prove the uniqueness clauses of [BenSassonCarmonIshaiKoppartySaraf2020, Theorems 1.4, 1.5, and 1.6], accepted JACM 2023 manuscript pp. 5–6; Remark 4.1, p. 13).

Let α : ι → F be distinct evaluation points and 2 * e + k ≤ |ι|. For any indexed family of words u : κ → (ι → F) whose premise already supplies a shared agreement set D₀ of size at least |ι| - e with codewords v : κ → (ι → F) in reedSolomon α k, there exist a greatest (hence unique maximal) shared agreement set D' : Finset ι of size at least |ι| - e and unique codewords v : κ → (ι → F) in reedSolomon α k: every qualifying pair (D'', w) satisfies D'' ⊆ D' and w = v.

theorem Cslib.Code.exists_uniqueMaximal_correlatedAgreement_curve_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {α : ι → F} {e k d : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u : Fin (d + 1) → ι → F) (S : Finset F) (hS : d * Fintype.card ι < S.card) (hclose : ∀ z ∈ S, ∃ c ∈ reedSolomon α k, hammingDist (∑ j : Fin (d + 1), z ^ ↑j • u j) c ≤ e) :
∃ (D' : Finset ι), Fintype.card ι - e ≤ D'.card ∧ ∃ (v : Fin (d + 1) → ι → F), (∀ (j : Fin (d + 1)), v j ∈ reedSolomon α k) ∧ (∀ i ∈ D', ∀ (j : Fin (d + 1)), u j i = v j i) ∧ ∀ (D'' : Finset ι) (w : Fin (d + 1) → ι → F), Fintype.card ι - e ≤ D''.card → (∀ (j : Fin (d + 1)), w j ∈ reedSolomon α k) → (∀ i ∈ D'', ∀ (j : Fin (d + 1)), u j i = w j i) → D'' ⊆ D' ∧ w = v

Unique maximal correlated agreement on parameterized curves in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 1.5 & Theorem 6.1], accepted JACM 2023 manuscript pp. 6 and 28).

Extends Cslib.Code.exists_correlatedAgreement_curve_unique with the unique-decoding uniqueness clause: the maximal shared agreement set D' of size at least |ι| - e and the codewords v : Fin (d + 1) → (ι → F) are uniquely determined, with every qualifying (D'', w) satisfying D'' ⊆ D' and w = v.

theorem Cslib.Code.exists_uniqueMaximal_correlatedAgreement_unique {F : Type u_1} {ι : Type u_2} [Field F] [Fintype ι] [DecidableEq F] {α : ι → F} {e k : ℕ} (hα : Function.Injective α) (he : 2 * e + k ≤ Fintype.card ι) (u₀ u₁ : ι → F) (S : Finset F) (hS : Fintype.card ι < S.card) (hclose : ∀ z ∈ S, ∃ c ∈ reedSolomon α k, hammingDist (u₀ + z • u₁) c ≤ e) :
∃ (D' : Finset ι), Fintype.card ι - e ≤ D'.card ∧ ∃ v₀ ∈ reedSolomon α k, ∃ v₁ ∈ reedSolomon α k, (∀ i ∈ D', u₀ i = v₀ i ∧ u₁ i = v₁ i) ∧ ∀ (D'' : Finset ι) (w₀ w₁ : ι → F), Fintype.card ι - e ≤ D''.card → w₀ ∈ reedSolomon α k → w₁ ∈ reedSolomon α k → (∀ i ∈ D'', u₀ i = w₀ i ∧ u₁ i = w₁ i) → D'' ⊆ D' ∧ w₀ = v₀ ∧ w₁ = v₁

Unique maximal correlated agreement on affine lines in the unique-decoding regime ([BenSassonCarmonIshaiKoppartySaraf2020, Theorem 1.4, Theorem 4.1 & Remark 4.1], accepted JACM 2023 manuscript pp. 5 and 13).

Extends Cslib.Code.exists_correlatedAgreement_unique with the unique-decoding uniqueness clause: the maximal shared agreement set D' of size at least |ι| - e and the codewords v₀, v₁ are uniquely determined, with every qualifying (D'', w₀, w₁) satisfying D'' ⊆ D', w₀ = v₀, and w₁ = v₁.