Counting index sequences whose basis vectors sum to S
ProvedQAlgorithms.Arunachalam.count_basis_sumsFix with Hamming weight , and let be the standard basis vectors of . For every integer with , the number of sequences with (sum over ) satisfies
This combinatorial estimate controls the Fourier expansion of in Lemma 7.5.4.
import Definitions.Def_QAlgorithms_Defs_LearningHardInstances set_option autoImplicit false
namespace QAlgorithms.Arunachalam
open QAlgorithms.Learning
/-- Arunachalam p.173, Claim 7.5.5: fix `S ∈ {0,1}^m` of Hamming weight `|S| = q`. For every
`ℓ ∈ {q, …, T}`, the number of index sequences `(i₁, …, i_ℓ) ∈ [m]^ℓ` with
`e_{i₁} + ⋯ + e_{i_ℓ} = S` (over `F₂`, `e_i` the `i`-th standard basis vector) is at most
`ℓ! · m^{(ℓ−q)/2} / (2^{(ℓ−q)/2} ((ℓ − q)/2)!)` if `ℓ − q` is even, and is `0` otherwise. -/
theorem count_basis_sums {m T ℓ : ℕ} (S : Fin m → ZMod 2) (hqℓ : hammingNorm S ≤ ℓ)
(hℓT : ℓ ≤ T) :
(Even (ℓ - hammingNorm S) →
(((Finset.univ.filter fun i : Fin ℓ → Fin m =>
∑ j, Pi.single (i j) (1 : ZMod 2) = S).card : ℕ) : ℝ) ≤
((ℓ.factorial : ℕ) : ℝ) * (m : ℝ) ^ ((ℓ - hammingNorm S) / 2) /
((2 : ℝ) ^ ((ℓ - hammingNorm S) / 2) *
(((ℓ - hammingNorm S) / 2).factorial : ℕ))) ∧
(¬ Even (ℓ - hammingNorm S) →
(Finset.univ.filter fun i : Fin ℓ → Fin m =>
∑ j, Pi.single (i j) (1 : ZMod 2) = S).card = 0) := by
sorry
end QAlgorithms.Arunachalam
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let , and let with Hamming weight . Assume . The number appears only in this hypothesis, so it serves only to require . Because , the difference is an honest natural number.
Let be the number of functions such that
where is the -th standard basis vector of .
The theorem asserts two things:
- Even case. If is even, set . Then
where .
- Odd case. If is odd, then .
Degenerate cases are included. For , is the empty vector and is if and otherwise. For , the only function is the empty one.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.