Lemma 5.14: Sparse Varshamov-Gilbert Bound #
From Chapter 5.4 of Rigollet's "High Dimensional Statistics."
Lemma 5.14 (Sparse Varshamov-Gilbert). For 1 ≤ k ≤ d/8, there exist M binary vectors
ω₁, …, ω_M ∈ {0,1}^d with:
(i) ρ(ωⱼ, ωₖ) ≥ k/2 for j ≠ k,
(ii) log M ≥ (k/8) log(1 + d/(2k)),
(iii) |ωⱼ|₀ = k for all j.
This variant of the Varshamov-Gilbert bound additionally ensures that all vectors have exactly k nonzero entries (sparsity constraint).
Proof structure #
The textbook proof uses the probabilistic method:
- Sample ω uniformly from C₀(k) = {ω ∈ {0,1}^d : |ω|₀ = k}
- Chernoff bound: P(ρ(ω,x₀) < k/2) ≤ 2^k · (1+d/(2k))^{-k/2}
- Union bound + probabilistic method: a good packing exists
The proof is decomposed as follows:
chernoff_counting_bound_ceil(proved): The counting consequence of the Chernoff bound on Hamming ball sizes, for the ceiling-radius ball (textbook-faithful). Uses a combinatorial argument via binomial coefficient ratio bounds and Vandermonde's identity.chernoff_counting_bound(proved): The floor-radius version, derived from the ceiling version viasparseBall ⊆ sparseBallCeil.chernoff_ball_bound/chernoff_ball_bound_ceil(proved): Derive the existence of a packing number N from the counting bounds.sparse_vec_k1_count(proved): For k=1, the count of 1-sparse vectors.greedy_packing_bound(proved): Greedy packing from ball size bounds.probabilistic_method_sparse_vg(proved): Main theorem from the above.sparse_vg_card_bound(proved): Strengthened version with 8 ≤ M and ℝ distance ≥ k/2.
The k-sparse binary vectors as a subtype.
Instances For
The cardinality of SparseVec d k equals Nat.choose d k.
The proof constructs an equivalence between SparseVec d k (Boolean functions with
exactly k true entries) and {S : Finset (Fin d) // S.card = k} (k-element subsets
of Fin d), then applies the Mathlib result Fintype.card_finset_len.
Symmetry of Hamming distance.
Greedy packing bound: given a finite type with a symmetric ball relation and a uniform bound B on ball sizes, there exists a maximal packing T with |universe| ≤ |T| * B. The proof constructs T as a maximum-cardinality independent set in the ball overlap relation, using the finite maximum principle.
A vector is always in its own Hamming ball (distance 0 < k/2 for k ≥ 2).
Construct a k-sparse vector (ones in first k positions) when k ≤ d.
Instances For
Hamming ball in sparse vector space with ceiling radius: vectors within Hamming distance < ⌈k/2⌉ = (k+1)/2. This is the ball corresponding to the textbook's real-valued radius k/2, since for integer distances, dist < k/2 (real) iff dist < ⌈k/2⌉ (nat).
Instances For
The floor-radius ball is a subset of the ceiling-radius ball.
The sparse ball (ceiling radius) has cardinality bounded by a sum of products of binomial coefficients. For each y in the ball, the support shift from x has some size j < (k+1)/2, contributing C(k,j) · C(d−k,j) possible vectors.
Tighter ball cardinality bound: the range is (k+3)/4 instead of (k+1)/2. Since the Hamming distance between k-sparse vectors is always even (= 2j where j is the support shift), dist < (k+1)/2 implies j < (k+3)/4.
Chernoff-type counting bound for sparse Hamming balls (Lemma 5.14 helper).
For k-sparse binary vectors in {0,1}^d with d ≥ 8k, the Hamming ball of radius ⌈(k+1)/2⌉ around any sparse vector x contains at most C(d,k) / ⌈exp(k/8 · log(1+d/(2k)))⌉ elements.
Equivalently: ball.card * ⌈exp(k/8 · log(1+d/(2k)))⌉₊ ≤ C(d,k).
Proved using a combinatorial argument:
- Ball cardinality ≤ Σ_{j < (k+3)/4} C(k,j)·C(d-k,j) (injection counting)
- For each j in range: C(k,j)·C(d-k,j)·⌈E⌉₊ ≤ C(k,j)·C(d-k,k-j) (ratio bound)
- Σ_{j} C(k,j)·C(d-k,k-j) ≤ C(d,k) (Vandermonde identity)
The Chernoff counting bound for the floor-radius ball, derived from the
ceiling-radius version. Since sparseBall ⊆ sparseBallCeil, the bound transfers.
The Chernoff bound on Hamming ball sizes within k-sparse vectors (k ≥ 2).
The textbook proof of Lemma 5.14 shows via the Chernoff method: for any x₀ ∈ C₀(k) with |x₀|₀ = k and d ≥ 8k, the proportion of k-sparse vectors within Hamming distance < k/2 from x₀ is bounded. Specifically:
- Write ρ(ω, x₀) ≥ k - Σᵢ Zᵢ where Zᵢ = 𝟙(Uᵢ ∈ supp(x₀)) are conditionally Bernoulli with parameter Qᵢ ≤ 2k/d.
- Chernoff bound with s = log(1 + d/(2k)): E[exp(s·Σ Zᵢ)] ≤ (2k/d·(eˢ-1)+1)^k = 2^k
- Therefore P(ρ < k/2) ≤ 2^k · (1+d/(2k))^{-k/2}
- This gives: |ball(x)| · N ≤ |C₀(k)| where N ≥ exp((k/8)·log(1+d/(2k)))
Proved from chernoff_counting_bound which axiomatizes the counting consequence
of the Chernoff bound (Steps 3-5 of the textbook proof, where the MGF induction
is partially elided).
Injection from Fin d to SparseVec d 1: each coordinate gives a 1-sparse vector.
Instances For
For k = 1: C₀(1) has exactly d elements (one per coordinate), and the inequality d ≥ exp((1/8)·log(1 + d/2)) holds for d ≥ 8.
The count |C₀(1)| = d is a basic combinatorial fact: each 1-sparse binary vector is determined by its single nonzero coordinate. The inequality follows from d ≥ 1 + d/2 ≥ (1 + d/2)^{1/8} for d ≥ 2.
The probabilistic method step for the Sparse Varshamov-Gilbert bound (Lemma 5.14).
Proved from chernoff_ball_bound (Chernoff bound on ball sizes, axiomatized due to
missing discrete probability infrastructure in Mathlib), sparse_vec_k1_count
(elementary counting axiom for k=1), and greedy_packing_bound (proved greedy
packing construction).
Lemma 5.14 (Sparse Varshamov-Gilbert).
For 1 ≤ k ≤ d/8, there exists a set of M binary vectors in {0,1}^d such that:
log M ≥ (k/8) log(1 + d/(2k))(sufficiently many vectors),- every vector has exactly
knonzero entries (sparsity), and - any two distinct vectors have Hamming distance at least
k/2.
The proof uses the probabilistic method: sample vectors uniformly from the set of k-sparse binary vectors and show via Chernoff bound + union bound that a good packing exists with positive probability.
Chernoff ball bound with ceiling radius, derived from chernoff_counting_bound_ceil.
There are at least 8 k-sparse vectors when k ≤ d/8.
Distinct binary vectors have positive Hamming distance.
Symmetry of sparseBallCeil.
Self-membership in sparseBallCeil (for k ≥ 2).
Strengthened Sparse Varshamov-Gilbert with cardinality lower bound 8 ≤ M.
The proof splits into three cases:
- k = 1: use all d unit vectors (d ≥ 8, pairwise distance = 2 ≥ 1/2 = k/2)
- k ≥ 2, N < 8: use block vectors (M = 8, distance ≥ k ≥ k/2, log 8 ≥ bound)
- k ≥ 2, N ≥ 8: ceiling ball greedy packing (M ≥ N ≥ 8, distance ≥ ⌈k/2⌉ ≥ k/2)