Documentation

CslibFrontier.Foundations.Data.Code.BallVolume

The entropy bound on the volume of a Hamming ball #

Over an alphabet of q letters at each of n positions, a Hamming ball of radius r ≤ α n with α ≤ 1 - 1 / q has at most exp (n H_q(α)) words, where H_q = Real.qaryEntropy q is the q-ary entropy in nats Guruswami, Rudra and Sudan, Proposition 3.3.3. This is the size of the ball (Cslib.Code.card_filter_hammingDist_le_eq_sum, Cslib.Code.card_filter_hammingDist_eq_choose_mul_pow) combined with the entropy bound on partial binomial sums Cslib.sum_choose_mul_pow_le_exp_mul_qaryEntropy. Over 𝔽₂, the punctured ball of nonzero words of weight less than d has ∑_{1 ≤ i < d} C(n, i) words (Cslib.Code.card_filter_ne_zero_hammingNorm_lt).

Main results #

References #

theorem Cslib.Code.card_filter_hammingDist_le_le_exp_mul_qaryEntropy {ι : Type u_1} [Fintype ι] [DecidableEq ι] {β : ι → Type u_2} [(i : ι) → Fintype (β i)] [(i : ι) → DecidableEq (β i)] {q : ℕ} (hq : ∀ (i : ι), Fintype.card (β i) = q) (x : (i : ι) → β i) {r : ℕ} {α : ℝ} (hα : α ≤ 1 - 1 / ↑q) (hr : ↑r ≤ α * ↑(Fintype.card ι)) :
↑{y : (i : ι) → β i | hammingDist x y ≤ r}.card ≤ Real.exp (↑(Fintype.card ι) * Real.qaryEntropy q α)

The entropy bound on the volume of a Hamming ball Guruswami, Rudra and Sudan, Proposition 3.3.3: over q letters at each of n positions, the ball of radius r ≤ α n about any word has at most exp (n H_q(α)) words when α ≤ 1 - 1 / q.

theorem Cslib.Code.card_filter_ne_zero_hammingNorm_lt (n d : ℕ) :
{x : Fin n → ZMod 2 | x ≠ 0 ∧ hammingNorm x < d}.card = ∑ i ∈ Finset.Ico 1 d, n.choose i

The size of a punctured binary Hamming ball: there are ∑_{1 ≤ i < d} C(n, i) nonzero words of weight less than d in 𝔽₂ⁿ.