import Mathlib /-! # Maurey's lemma (finite dictionary): `m`-term approximation at rate `B / √m` **Stated.** Let `H` be a real inner product space, `φ : I → H` a *finite* dictionary with `‖φ i‖ ≤ B`, and `v = ∑ i, p i • φ i` a convex combination (`p ≥ 0`, `∑ p = 1`). Then for every `m ≥ 1` there are indices `θ : Fin m → I` (repetitions allowed) such that the empirical average `(1/m) ∑ₖ φ (θ k)` satisfies `‖v - (1/m) ∑ₖ φ (θ k)‖ ≤ B / √m`. The rate does not depend on the dimension of `H` (this is the mechanism behind Barron's dimension-free approximation bound for shallow networks). **Not stated.** The dictionary is finite and `v` lies exactly in its convex hull. The passage to Barron spaces (infinite dictionaries, closure of the convex hull in `L²(μ)`, the Barron norm of a target function, and the fact that the HJB value function belongs to such a space with a norm polynomial in `d`) is NOT part of this problem. -/ open scoped BigOperators namespace NSHJB.MaureyBarron variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] /-- Maurey's lemma for a finite dictionary. -/ theorem maurey_approximation {I : Type*} [Fintype I] {m : ℕ} (hm : 0 < m) (p : I → ℝ) (hp : ∀ i, 0 ≤ p i) (hp_sum : ∑ i : I, p i = 1) (φ : I → H) (v : H) (hv : v = ∑ i : I, p i • φ i) (B : ℝ) (hB : 0 ≤ B) (hφ_bound : ∀ i, ‖φ i‖ ≤ B) : ∃ θ : Fin m → I, ‖v - (m : ℝ)⁻¹ • ∑ k : Fin m, φ (θ k)‖ ≤ B / Real.sqrt m := by sorry end NSHJB.MaureyBarron