Hanson-Wright Inequality #
This file formalizes a finite-dimensional Hanson-Wright tail bound for real quadratic forms. The public theorem proves the required Hanson-Wright MGF certificate from independent sub-Gaussian coordinates, using local diagonal/off-diagonal MGF infrastructure and then optimizing the resulting two-scale Chernoff bound.
Main definitions #
HansonWright.quadraticForm: the deterministic quadratic formxᵀ A x.HansonWright.centeredQuadraticForm: the centered random quadratic form.HansonWright.frobeniusNorm: the Frobenius norm of a finite real matrix.HansonWright.operatorNorm: theℓ²operator norm of a finite real matrix.HansonWright.entrywiseL1Norm: the entrywiseℓ¹norm of a finite real matrix.HansonWright.HasHansonWrightMGF: the local quadratic CGF hypothesis used internally by the tail optimization step.
Main results #
HansonWright.hasSubgaussianMGF_of_abs_le_of_integral_eq_zero: local symmetric bounded-variable MGF estimate.HansonWright.hasHansonWrightMGF_of_subgaussian: a proved Hanson-Wright MGF certificate for independent sub-Gaussian coordinates.HansonWright.hasHansonWrightMGF_of_bounded: a proved Hanson-Wright MGF certificate for bounded coordinates.HansonWright.hanson_wright_inequality: Hanson-Wright tail bound after deriving the MGF certificate from independent sub-Gaussian coordinates.HansonWright.hanson_wright_inequality_hdp: HDP-style Hanson-Wright tail bound using the maximum coordinate least global-MGF sub-Gaussian scale.
The random quadratic form associated to a random vector X.
Equations
- LeanPool.HansonWright.randomQuadraticForm A X ω = LeanPool.HansonWright.quadraticForm A fun (i : Fin n) => X i ω
Instances For
The coordinate random vector as an element of Euclidean space.
Equations
- LeanPool.HansonWright.randomVector X ω = WithLp.toLp 2 fun (i : Fin n) => X i ω
Instances For
The centered random quadratic form Xᵀ A X - E Xᵀ A X.
Equations
- LeanPool.HansonWright.centeredQuadraticForm μ A X ω = LeanPool.HansonWright.randomQuadraticForm A X ω - ∫ (ω : Ω), LeanPool.HansonWright.randomQuadraticForm A X ω ∂μ
Instances For
The Frobenius norm of a finite real matrix.
Instances For
The ℓ² operator norm of a finite real matrix.
Equations
Instances For
Coordinate projection onto a finite set of coordinates.
Equations
- LeanPool.HansonWright.coordinateMask s x = WithLp.toLp 2 fun (i : Fin n) => if i ∈ s then x.ofLp i else 0
Instances For
Embed a tuple indexed by a finite set into Euclidean space, filling other coordinates by zero.
Equations
- LeanPool.HansonWright.subtypeMask s x = WithLp.toLp 2 fun (i : Fin n) => if h : i ∈ s then x ⟨i, h⟩ else 0
Instances For
The local quadratic CGF estimate used in the Hanson-Wright proof.
For Y = Xᵀ A X - E Xᵀ A X, this records
cgf Y λ ≤ C λ² K⁴ ‖A‖_F² for
|λ| ≤ (2 C K² ‖A‖)⁻¹, together with local exponential integrability.
- cgf_le (l : ℝ) : |l| ≤ (2 * C * K ^ 2 * operatorNorm A)⁻¹ → ProbabilityTheory.cgf (centeredQuadraticForm μ A X) μ l ≤ C * l ^ 2 * K ^ 4 * frobeniusNorm A ^ 2
- integrable_exp (l : ℝ) : |l| ≤ (2 * C * K ^ 2 * operatorNorm A)⁻¹ → MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (l * centeredQuadraticForm μ A X ω)) μ
Instances For
A self-contained bounded, centered MGF estimate.
This is the symmetric bounded-variable form of Hoeffding's lemma, proved locally
from the chord bound for exp and cosh x ≤ exp (x² / 2).
A two-sided exponential consequence of a sub-Gaussian MGF bound.
Sub-Gaussian MGF control bounds every integrated even Taylor term.
Even moment bound obtained from sub-Gaussian MGF control at an arbitrary scale.
A geometric Taylor-term bound using any positive real proxy above the sub-Gaussian parameter.
A geometric bound for each integrated square-exponential Taylor term.
Summability of square-exponential Taylor integrals using a positive proxy C0 ≥ c.
The square-exponential Taylor integrals are summable below the explicit radius.
Integral form of the square-exponential Taylor expansion.
A quantitative square-exponential integral bound below the proxy radius.
A sharper square-exponential bound with the exact zeroth Taylor term isolated.
A square-exponential bound with the zeroth and first Taylor terms isolated.
A linear-in-θ square-exponential bound at half the explicit radius.
Gaussian square-form bound for a positive symmetric operator, proved by spectral diagonalization and one-dimensional square-exponential estimates.
A second-moment bound from the square-exponential Taylor-term estimate.
A fourth-moment bound from the square-exponential Taylor-term estimate.
Positive-parameter MGF bound for a centered square of a sub-Gaussian variable.
Negative-parameter MGF bound for a centered square of a sub-Gaussian variable.
Square-exponential integrability from summability of the nonnegative moment series.
Square-exponential integrability for a sub-Gaussian variable at small positive parameter.
Small-parameter square-exponential integrability using a positive proxy C0 ≥ c.
Gaussian square-form integrability for a positive symmetric operator, under the strict version of the same coordinate smallness condition.
Integrability of the exponential of a Gaussian bilinear form.
A Frobenius-scale bound for the exponential moment of a Gaussian bilinear form.
Local exponential integrability for centered squares of sub-Gaussian variables.
The MGF of the identity under a push-forward law is the MGF of the original variable.
CGF bound for a centered square of a sub-Gaussian variable.
The centered diagonal part of a quadratic form.
Equations
Instances For
Hanson-Wright MGF certificate for diagonal quadratic forms with sub-Gaussian coordinates.
A finite independent linear combination of sub-Gaussian variables is sub-Gaussian.
Fixed linear forms of an independent sub-Gaussian coordinate vector are sub-Gaussian.
Gaussian-comparison square-exponential bound for a linear image of an independent sub-Gaussian vector.
Hanson-Wright MGF certificate from independent sub-Gaussian coordinates.
A proved Hanson-Wright MGF certificate for bounded coordinates.
If each coordinate satisfies |Xᵢ| ≤ K almost surely, then the quadratic form lies
in the interval [-K²‖A‖₁, K²‖A‖₁]. The centered quadratic form is therefore
bounded by 2K²‖A‖₁; the local bounded MGF lemma above gives a quadratic CGF
estimate. The explicit side condition compares this bounded-coordinate constant
with the Frobenius-scale constant used by the Hanson-Wright tail statement.
Hanson-Wright tail bound with the MGF certificate proved from sub-Gaussian coordinates.
This theorem does not take HasHansonWrightMGF as a hypothesis. Instead it proves
that certificate from independence and coordinate sub-Gaussian MGF bounds, then
optimizes the resulting Chernoff bound.
Hanson-Wright inequality in the HDP normalization.
The scale K is the maximum coordinate least global-MGF sub-Gaussian scale.
The proof expands this definition into the exact MGF bounds required by
hanson_wright_inequality.
Hanson-Wright inequality in the nondegenerate form of Theorem 6.2.2 of HDP.
For independent coordinates and K equal to their positive maximum least
global-MGF sub-Gaussian scale, this gives the usual two-regime tail bound with
the fixed universal coefficient 1 / (256 * exp 1 ^ 2). The MGF hypothesis
implied by finiteness of the coordinate scales also forces the coordinates to
have mean zero.