Documentation

CslibFrontier.Foundations.Data.Code.EliasBassalygo

The Elias–Bassalygo bound #

Let C be a code of length n over an alphabet of q letters, and let V = ∑_{j ≤ e} (n choose j) (q - 1) ^ j be the volume of a Hamming ball of radius e. Every codeword lies in V balls of radius e, so on average a ball of radius e contains |C| V / q ^ n codewords, and some ball contains at least that many (Cslib.Code.exists_card_mul_sum_choose_le_pow_mul) [GuruswamiRudraSudan2019, Lemma 8.1.2]. If the code has minimum distance at least d and q e ≤ (q - 1) n, the q-ary Johnson bound (Cslib.Code.card_filter_hammingDist_le_mul_le_of_mul_le) bounds the number of codewords in that ball, which gives the Elias–Bassalygo bound [Bas65], [GuruswamiRudraSudan2019, Section 8.1] in finite form: |C| V ((q - 1) (n - e) ^ 2 + e ^ 2 - (q - 1) n (n - d)) ≤ q ^ n (q - 1) n d (Cslib.Code.card_mul_sum_choose_mul_le). Below the q-ary Johnson radius, that is when (q - 1) n (n - d) < (q - 1) (n - e) ^ 2 + e ^ 2, this reads |C| V ≤ q ^ n (q - 1) n d (Cslib.Code.card_mul_sum_choose_le): the Hamming bound |C| V ≤ q ^ n at a radius that may exceed half the minimum distance, at the price of a polynomial factor.

Combining Cslib.Code.card_mul_sum_choose_le with the q-ary Johnson-radius bridge Cslib.Code.mul_le_sub_one_mul_and_lt_of_lt_johnsonRadius and the single-term entropy lower bound Cslib.exp_mul_qaryEntropy_le_succ_mul_choose_mul_pow (CslibFrontier.Foundations.Data.Nat.Choose.Entropy) gives the finite rate upper bound rate C ≤ 1 - H_q(e / n) / log q + log_q((q - 1) n d (n + 1)) / n for every e / n < J_q(d / n) (Cslib.Code.rate_le_of_lt_johnsonRadius), and passing to the limit as n → ∞ yields the asymptotic Elias–Bassalygo rate bound rate (C s) ≤ 1 - H_q(J_q(δ)) / log q + ε eventually along a filter (Cslib.Code.eventually_rate_le_one_sub_qaryEntropy_johnsonRadius).

Main results #

References #

theorem Cslib.Code.exists_card_mul_sum_choose_le_pow_mul {ι : Type u_1} {α : Type u_2} [Fintype ι] [Fintype α] [DecidableEq α] [Nonempty α] (C : Finset (ι → α)) (e : ℕ) :
∃ (w : ι → α), C.card * ∑ j ∈ Finset.range (e + 1), (Fintype.card ι).choose j * (Fintype.card α - 1) ^ j ≤ Fintype.card α ^ Fintype.card ι * {c ∈ C | hammingDist c w ≤ e}.card

Some Hamming ball contains its share of the code [GuruswamiRudraSudan2019, Lemma 8.1.2]: for a code C of length n over q letters and a radius e, some word w has at least |C| V / q ^ n codewords within distance e, where V = ∑_{j ≤ e} (n choose j) (q - 1) ^ j is the volume of a Hamming ball of radius e.

theorem Cslib.Code.card_mul_sum_choose_mul_le {ι : Type u_1} {α : Type u_2} [Fintype ι] [Fintype α] [DecidableEq α] [Nonempty α] {C : Finset (ι → α)} {d : ℕ} (hd : ↑d ≤ minDist ↑C) {e : ℕ} (he : Fintype.card α * e ≤ (Fintype.card α - 1) * Fintype.card ι) :
(C.card * ∑ j ∈ Finset.range (e + 1), (Fintype.card ι).choose j * (Fintype.card α - 1) ^ j) * ((Fintype.card α - 1) * (Fintype.card ι - e) ^ 2 + e ^ 2 - (Fintype.card α - 1) * Fintype.card ι * (Fintype.card ι - d)) ≤ Fintype.card α ^ Fintype.card ι * ((Fintype.card α - 1) * Fintype.card ι * d)

The Elias–Bassalygo bound, finite form [Bas65], [GuruswamiRudraSudan2019, Section 8.1]: a code C of length n and minimum distance at least d over q letters satisfies |C| V ((q - 1) (n - e) ^ 2 + e ^ 2 - (q - 1) n (n - d)) ≤ q ^ n (q - 1) n d for every radius e with q e ≤ (q - 1) n, where V = ∑_{j ≤ e} (n choose j) (q - 1) ^ j is the volume of a Hamming ball of radius e.

theorem Cslib.Code.card_mul_sum_choose_le {ι : Type u_1} {α : Type u_2} [Fintype ι] [Fintype α] [DecidableEq α] [Nonempty α] {C : Finset (ι → α)} {d e : ℕ} (hd : ↑d ≤ minDist ↑C) (he : Fintype.card α * e ≤ (Fintype.card α - 1) * Fintype.card ι) (h : (Fintype.card α - 1) * Fintype.card ι * (Fintype.card ι - d) < (Fintype.card α - 1) * (Fintype.card ι - e) ^ 2 + e ^ 2) :
C.card * ∑ j ∈ Finset.range (e + 1), (Fintype.card ι).choose j * (Fintype.card α - 1) ^ j ≤ Fintype.card α ^ Fintype.card ι * ((Fintype.card α - 1) * Fintype.card ι * d)

The Elias–Bassalygo bound, finite form below the q-ary Johnson radius [Bas65], [GuruswamiRudraSudan2019, Section 8.1]: if q e ≤ (q - 1) n and (q - 1) n (n - d) < (q - 1) (n - e) ^ 2 + e ^ 2, a code C of length n and minimum distance at least d over q letters satisfies |C| V ≤ q ^ n (q - 1) n d, where V = ∑_{j ≤ e} (n choose j) (q - 1) ^ j is the volume of a Hamming ball of radius e.

Finite and asymptotic rate bounds #

theorem Cslib.Code.rate_le_of_lt_johnsonRadius {ι : Type u_1} {α : Type u_2} [Fintype ι] [Nonempty ι] [Fintype α] [DecidableEq α] (hq : 2 ≤ Fintype.card α) {C : Finset (ι → α)} {d e : ℕ} (hd : ↑d ≤ minDist ↑C) (hdn : d ≤ Fintype.card ι) (he : ↑e / ↑(Fintype.card ι) < johnsonRadius (↑(Fintype.card α)) (↑d / ↑(Fintype.card ι))) :
rate ↑C ≤ 1 - Real.qaryEntropy (Fintype.card α) (↑e / ↑(Fintype.card ι)) / Real.log ↑(Fintype.card α) + Real.logb (↑(Fintype.card α)) ((↑(Fintype.card α) - 1) * ↑(Fintype.card ι) * ↑d * (↑(Fintype.card ι) + 1)) / ↑(Fintype.card ι)

Finite Elias–Bassalygo rate bound [Bas65] (locator unverified), [GRS19] (locator unverified): for a code C of length n ≥ 1 and minimum distance at least d ≤ n over an alphabet of q ≥ 2 letters, any integer radius e strictly below the q-ary Johnson radius (e / n < J_q(d / n)) satisfies rate C ≤ 1 - H_q(e / n) / log q + log_q ((q - 1) * n * d * (n + 1)) / n.

theorem Cslib.Code.eventually_rate_le_one_sub_qaryEntropy_johnsonRadius {α : Type u_2} {σ : Type u_3} {ιs : σ → Type u_4} [(s : σ) → Fintype (ιs s)] [Fintype α] [DecidableEq α] [Nontrivial α] {l : Filter σ} {C : (s : σ) → Finset (ιs s → α)} {δ : ℝ} (hδ0 : 0 ≤ δ) (hδ : ↑(Fintype.card α) * δ ≤ ↑(Fintype.card α) - 1) (hC : ∀ (s : σ), ∀ x ∈ C s, ∀ y ∈ C s, x ≠ y → δ * ↑(Fintype.card (ιs s)) ≤ ↑(hammingDist x y)) (hn : Filter.Tendsto (fun (s : σ) => Fintype.card (ιs s)) l Filter.atTop) {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (s : σ) in l, rate ↑(C s) ≤ 1 - Real.qaryEntropy (Fintype.card α) (johnsonRadius (↑(Fintype.card α)) δ) / Real.log ↑(Fintype.card α) + ε

The asymptotic Elias–Bassalygo bound [Bas65] (locator unverified), [GRS19] (locator unverified): for any family of codes C s over q ≥ 2 letters whose block lengths n_s = |ιs s| tend to infinity along a filter l and whose relative minimum distances are at least δ (0 ≤ δ ≤ 1 - 1 / q), rate (C s) ≤ 1 - H_q(J_q(δ)) / log q + ε holds eventually along l for every ε > 0.