Diagonal of the square root of an XOR-invariant Gram matrix (corrected: with the factor 2^{-k/2})
OpenQAlgorithms.LearningSurvey.sqrtGram_diag_leThis is the spectral estimate behind the pretty-good-measurement lower bounds for quantum PAC and agnostic learning, stated with the decay factor that the source's application needs.
Let , and let be a natural number with . Define by , where is the Hamming weight. Let and let have rank . Let be the real matrix , where is addition in and is the matrix-vector product over . The matrix is positive semidefinite; write for its positive semidefinite square root.
There is an absolute constant such that for all such and every ,
Because the pretty-good-measurement success probability of the ensemble with Gram matrix is , this bound gives the exponentially small success probability used in the proofs of Theorems 4.12 and 4.15.
Formalization Note The source prints the bound without the factor . In that form it always holds trivially, since . The factor is the decay that holds for every , and it cannot be improved (at and , ). is the entry of the square-root matrix, not the square root of the entry.
import Definitions.Def_QAlgorithms_Defs_LearningHardInstances set_option autoImplicit false
namespace QAlgorithms.LearningSurvey
open MeasureTheory QAlgorithms.Learning
/-- Corrected statement. survey p.13, Theorem 4.13 ([AW17, Theorem 17]). Printed: for `m ≥ 10`,
`f(w) = (1 − β|w|/m)^T` with `β ∈ (0, 1]`, `T ∈ [1, m/(e³β)]`, `k ≤ m`, `M ∈ F₂^{m×k}` of rank `k`
and `A(z, y) = (f ∘ M)(z ⊕ y)`, one has `√A(z, z) ≤ e^{O(Tβ²/m + √(Tmβ))}` for all `z`.
Changed: the bound carries the factor `2^{−k/2}`, i.e.
`√A(z, z) ≤ 2^{−k/2} · e^{K(Tβ²/m + √(Tmβ))}` with an absolute `K > 0`.
Why: as printed the bound is contentless. For integer `T`, `f ∘ M` has nonnegative Fourier
coefficients, so `A` is positive semidefinite with `A(z, z) = f(0) = 1`, and `√A(z, z) ≤ 1` always.
The source's own use (p.14, p.15: `P_pgm = Σ_z √G(z,z)² ≤ e^{O(Tε²/d + √(Tdε)) − d − Tε}`, with
`G = A/2^k`, so `P_pgm = √A(z,z)²`) needs a decaying factor that the printed statement drops
(trap 30). The decay that holds for every `k ≤ m` is `2^{−k/2}`. It cannot be `k`-independent
(at `k = 0`, `√A = 1`), and its rate is tight (at `T = 1`, `β → 0`, `√A(z,z) → 2^{−k/2}`). With
the proof's `k ≥ d/4` it gives the source's `e^{−Ω(d)}`.
`T` is a natural number (the number of copies in both applications), so `√A` is the positive
semidefinite square root (`psdSqrt`); `√A(z, z)` is the `(z, z)` entry of that root. -/
theorem sqrtGram_diag_le :
∃ K : ℝ, 0 < K ∧ ∀ (m k : ℕ) (β : ℝ) (T : ℕ) (M : Matrix (Fin m) (Fin k) (ZMod 2))
(z : Fin k → ZMod 2), 10 ≤ m → k ≤ m → 0 < β → β ≤ 1 → 1 ≤ T →
(T : ℝ) ≤ (m : ℝ) / (Real.exp 3 * β) → M.rank = k →
psdSqrt (xorConvMatrix fun x => weightPowFun m β T (M.mulVec x)) z z ≤
(Real.sqrt 2)⁻¹ ^ k *
Real.exp (K * ((T : ℝ) * β ^ 2 / (m : ℝ) + Real.sqrt ((T : ℝ) * (m : ℝ) * β))) := by sorry
end QAlgorithms.LearningSurvey
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The statement asserts that there is a single real constant such that the following holds for all natural numbers , every real , every matrix , and every vector .
Hypotheses. Assume:
- and ;
- ;
- and , a real inequality;
- , computed over , so has full column rank.
The case is not excluded. Here is the empty matrix and the index set is a single point.
The matrix. Define the real matrix , indexed by , by
Here is coordinatewise addition mod 2, is the matrix–vector product over , and is Hamming weight, the number of nonzero coordinates. In other words, is the XOR-convolution matrix of the function
The square root. Let be the matrix obtained by applying the real function to via the continuous functional calculus. Concretely, is symmetric because . Diagonalize it orthogonally and replace each eigenvalue by . The real square root used here sends negative numbers to , so any negative eigenvalue would be replaced by .
Conclusion. The diagonal entry of at index satisfies
The constant is chosen once, before all of , so it does not depend on any of them.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.