Stat.Concentration
Concentration inequalities: Hoeffding/Bernstein-type bounds, bounded differences, symmetrization, empirical-process separability, entropy chaining, and empirical-Bernstein refinements.
Chebyshev 1 core · 0 supporting This module provides a real-valued Chebyshev probability bound for one square-integrable statistic whose mean is known and whose variance has a supplied upper bound. ★ probability_abs_sub_mean_gt_le
Chebyshev bounds with a supplied variance envelope
This module provides a real-valued Chebyshev probability bound for one
square-integrable statistic whose mean is known and whose variance has a
supplied upper bound. This differs from iid_sum_chebyshev, which specializes
to an i.i.d. sum with its exact variance and states the result as an ENNReal
measure bound.
For a finite measure Q and a statistic F on the underlying space, if F is square-integrable under Q, the deviation threshold a is positive, F has mean equal to mean under Q, and the variance of F under Q is at most the envelope v, then the probability that F deviates from mean by more than a in absolute value is at most v/a².
Formal statement
Proof (Lean source)
ConditionalKernel 1 core · 3 supporting This module collects measure-theoretic bridges used before applying ordinary probability inequalities on almost every fiber of a regular conditional distribution. ★ hasSubgaussianMGF_linearCombination_of_iIndep
Fiberwise facts for regular conditional distributions
This module collects measure-theoretic bridges used before applying ordinary probability inequalities on almost every fiber of a regular conditional distribution. In particular, ambient almost-sure facts remain almost sure on almost every conditional fiber, and a real random variable measurable with respect to the conditioning σ-algebra is constant on almost every fiber.
For a finite family of real random variables eps and real coefficients v, if each eps i is a.e. measurable, each eps i is a.s. bounded by 1 in absolute value, each eps i has mean zero, and the family eps is independent, then the linear combination is sub-Gaussian with variance proxy .
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
ae_iIndepFun_realtheorem — Kernel independence of a finite family of measurable real random variables specializes to ordinary independence on almost every probability fiber. The countable rational half-line generator is what permits one common outer null set for all measurable events.hypothesesconclusion∀ᵐ a ∂ν, iIndepFun X (κ a)Proof (Lean source)
theorem ProbabilityTheory.Kernel.iIndepFun.ae_iIndepFun_real {α Ω ι : Type*} [MeasurableSpace α] [MeasurableSpace Ω] {κ : Kernel α Ω} {ν : Measure α} [Finite ι] {X : ι → Ω → ℝ} (hX : ∀ i, Measurable (X i)) (h : iIndepFun X κ ν) : ∀ᵐ a ∂ν, iIndepFun X (κ a) := by classical let cuts : Set (Set ℝ) := ⋃ q : ℚ, {Iic (q : ℝ)} have hident : ∀ᵐ a ∂ν, ∀ (S : Finset ι) (q : ι → ℚ), κ a (⋂ i ∈ S, X i ⁻¹' Iic (q i : ℝ)) = ∏ i ∈ S, κ a (X i ⁻¹' Iic (q i : ℝ)) := by rw [ae_all_iff] intro S rw [ae_all_iff] intro q exact (ProbabilityTheory.Kernel.iIndepFun_iff_measure_inter_preimage_eq_mul (fun _ : ι ↦ borel ℝ) X).mp h S (fun i _ ↦ measurableSet_Iic) filter_upwards [h.ae_isProbabilityMeasure, hident] with a hprob ha let π : ι → Set (Set Ω) := fun i ↦ (fun s : Set ℝ ↦ X i ⁻¹' s) '' cuts have hπ_pi : ∀ i, IsPiSystem (π i) := by intro i convert Real.isPiSystem_Iic_rat.comap (X i) using 1 rfl have hπ_gen : ∀ i, comap (X i) (borel ℝ) = MeasurableSpace.generateFrom (π i) := by intro i rw [Real.borel_eq_generateFrom_Iic_rat, MeasurableSpace.comap_generateFrom] have hπ_ind : ProbabilityTheory.iIndepSets π (κ a) := by rw [ProbabilityTheory.iIndepSets_iff] intro S sets hsets have hrat (i : ι) (hi : i ∈ S) : ∃ q : ℚ, X i ⁻¹' Iic (q : ℝ) = sets i := by rcases hsets i hi with ⟨t, ht, htset⟩ simp only [cuts, Set.mem_iUnion, Set.mem_singleton_iff] at ht obtain ⟨q, hq⟩ := ht subst t exact ⟨q, htset⟩ let q : ι → ℚ := fun i ↦ if hi : i ∈ S then choose (hrat i hi) else 0 have hset (i : ι) (hi : i ∈ S) : sets i = X i ⁻¹' Iic (q i : ℝ) := by simp only [q, dif_pos hi] exact (Classical.choose_spec (hrat i hi)).symm have hinter : (⋂ i ∈ S, sets i) = ⋂ i ∈ S, X i ⁻¹' Iic (q i : ℝ) := by apply Set.iInter_congr intro i apply Set.iInter_congr intro hi exact hset i hi have hprod : (∏ i ∈ S, κ a (sets i)) = ∏ i ∈ S, κ a (X i ⁻¹' Iic (q i : ℝ)) := by apply Finset.prod_congr rfl intro i hi rw [hset i hi] rw [hinter, hprod] exact ha S q haveI : IsProbabilityMeasure (κ a) := hprob have hspaces : ProbabilityTheory.iIndep (fun i ↦ comap (X i) (borel ℝ)) (κ a) := ProbabilityTheory.iIndepSets.iIndep (fun i ↦ comap_le (hX i)) π hπ_pi hπ_gen hπ_ind exact hspaces -
ae_ae_condExpKernel_of_aetheorem — An ambient almost-sure proposition holds on almost every fiber of the regular conditional distribution.hypothesesΩ :m :hm :m ≤ mΩp :Ω → Prophp :∀ᵐ ω ∂μ, p ωconclusion∀ᵐ ω ∂μ.trim hm, ∀ᵐ ω' ∂ProbabilityTheory.condExpKernel (mΩ := mΩ) μ m ω, p ω'Proof (Lean source)
theorem ae_ae_condExpKernel_of_ae {Ω : Type*} [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] {μ : Measure Ω} [IsFiniteMeasure μ] {m : MeasurableSpace Ω} (hm : m ≤ mΩ) {p : Ω → Prop} (hp : ∀ᵐ ω ∂μ, p ω) : ∀ᵐ ω ∂μ.trim hm, ∀ᵐ ω' ∂ProbabilityTheory.condExpKernel (mΩ := mΩ) μ m ω, p ω' := by apply Measure.ae_ae_of_ae_comp rwa [ProbabilityTheory.condExpKernel_comp_trim (mΩ := mΩ) hm] -
ae_eq_const_condExpKernel_of_measurabletheorem — A random variable measurable with respect to the conditioning σ-algebra equals its observed value on almost every conditional fiber.hypothesesconclusion∀ᵐ ω ∂μ.trim hm, ∀ᵐ ω' ∂ProbabilityTheory.condExpKernel (mΩ := mΩ) μ m ω, f ω' = f ωProof (Lean source)
theorem ae_eq_const_condExpKernel_of_measurable {Ω : Type*} [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] {μ : Measure Ω} [IsFiniteMeasure μ] {m : MeasurableSpace Ω} (hm : m ≤ mΩ) {β : Type*} [MeasurableSpace β] [MeasurableEq β] {f : Ω → β} (hf : Measurable[m] f) : ∀ᵐ ω ∂μ.trim hm, ∀ᵐ ω' ∂ProbabilityTheory.condExpKernel (mΩ := mΩ) μ m ω, f ω' = f ω := by refine @Measure.ae_ae_of_ae_compProd Ω Ω m mΩ (μ.trim hm) (condExpKernel (mΩ := mΩ) μ m) _ _ (fun pair ↦ f pair.2 = f pair.1) ?_ rw [ProbabilityTheory.compProd_trim_condExpKernel (mΩ := mΩ) hm] rw [ae_map_iff] · exact Filter.Eventually.of_forall fun ω ↦ rfl · have hfirst : @Measurable Ω Ω mΩ m id := measurable_id'' hm have hsecond : @Measurable Ω Ω mΩ mΩ id := measurable_id have hdiag : @Measurable Ω (Ω × Ω) mΩ (m.prod mΩ) (fun ω ↦ (id ω, id ω)) := by refine Measurable.of_comap_le ?_ rw [prod, MeasurableSpace.comap_sup, MeasurableSpace.comap_comp] apply sup_le · change m.comap (Prod.fst ∘ fun ω ↦ (ω, ω)) ≤ mΩ rw [show (Prod.fst ∘ fun ω : Ω ↦ (ω, ω)) = id by rfl, MeasurableSpace.comap_id] exact hm · rw [MeasurableSpace.comap_comp] rw [show (Prod.snd ∘ fun ω : Ω ↦ (id ω, id ω)) = id by rfl, MeasurableSpace.comap_id] exact @aemeasurable Ω (Ω × Ω) mΩ (m.prod mΩ) (fun ω ↦ (id ω, id ω)) μ hdiag · have hfst : @Measurable (Ω × Ω) Ω (m.prod mΩ) m Prod.fst := measurable_fst have hsnd : @Measurable (Ω × Ω) Ω (m.prod mΩ) mΩ Prod.snd := measurable_snd have hf' : @Measurable Ω β mΩ _ f := hf.mono hm le_rfl exact measurableSet_eq_fun (hf'.comp hsnd) (hf.comp hfst)
ConditionalProjectionTail 1 core · 0 supporting This module lifts the rank-sensitive projection tail bound to regular conditional distributions. ★ ae_condExpKernel_projection_energy_gt_le
Conditional concentration of projected bounded noise
This module lifts the rank-sensitive projection tail bound to regular conditional distributions. A projector measurable with respect to the conditioning sigma-algebra is frozen on almost every conditional fiber before the unconditional result is applied.
Fix a sub-σ-algebra m of the ambient σ-algebra and a finite family eps of real random variables on Ω that is measurable and almost surely bounded by 1 in absolute value under μ; suppose further that, on almost every m-conditioning fiber, each eps i has conditional mean zero under the regular conditional kernel given m, and that the family eps is conditionally independent given m. Let Pi be a matrix-valued map that is m-measurable entrywise and, on almost every m-conditioning fiber, symmetric, idempotent (Pi·Pi = Pi), and of rank at most r, and fix a positive tolerance zeta. Then, on almost every m-conditioning fiber, the conditional probability — under the regular conditional kernel given m — that the projected noise's squared energy exceeds the threshold is at most zeta.
Formal statement
Proof (Lean source)
FiniteDimensionalNet 1 core · 2 supporting This file provides dimension-explicit finite nets for bounded subsets of a finite-dimensional real normed space. ★ exists_half_net_card_le_five_pow_finrank
Finite nets in finite-dimensional normed spaces
This file provides dimension-explicit finite nets for bounded subsets of a
finite-dimensional real normed space. The general statement
exists_internal_net_card_le covers an arbitrary subset of the closed unit ball
at an arbitrary scale v, with net points drawn from the set itself and
cardinality at most (1 + 2 / v) ^ finrank ℝ E; exists_unit_ball_net_card_le
and exists_half_net_card_le_five_pow_finrank are the unit-ball and
unit-sphere-at-scale-1/2 specializations.
For a finite-dimensional real normed space E, there exists a finite set of unit vectors, of size at most 5 raised to the dimension of E, that forms a half-net of the unit sphere: every unit vector lies within distance 1/2 of some point in the set.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
exists_internal_net_card_lelemma — Every subset of the closed unit ball of a finite-dimensional real normed space admits an internal net at any prescribed accuracy v: finitely many points, all taken from the set itself, such that every point of the set is within distance v of one of them, and the number of net points is at most (1 + 2 / v) raised to the dimension of the space.hypothesesProof (Lean source)
lemma exists_internal_net_card_le (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] (A : Set E) (hA : ∀ x ∈ A, ‖x‖ ≤ 1) {v : ℝ} (hv : 0 < v) : ∃ N : Finset E, (∀ y ∈ N, y ∈ A) ∧ (∀ x ∈ A, ∃ y ∈ N, ‖x - y‖ ≤ v) ∧ (N.card : ℝ) ≤ (1 + 2 / v) ^ finrank ℝ E := by classical let ε : ℝ≥0 := ⟨v, hv.le⟩ have hε : (ε : ℝ≥0∞) = ofReal v := by exact ENNReal.coe_nnreal_eq ε have hAball : A ⊆ closedBall (0 : E) 1 := fun x hx ↦ by simpa [mem_closedBall, dist_zero_right] using hA x hx obtain ⟨M, hM⟩ : ∃ M : Set E, Maximal (fun N ↦ N ⊆ A ∧ Metric.IsSeparated ε N) M := by apply zorn_subset intro c hc hchain refine ⟨⋃₀ c, ?_, fun s hs ↦ subset_sUnion_of_mem hs⟩ constructor · exact sUnion_subset fun s hs ↦ (hc hs).1 · rw [Metric.IsSeparated, hchain.pairwise_sUnion] exact fun s hs ↦ (hc hs).2 have hMsub : M ⊆ A := hM.prop.1 have hMsep : Metric.IsSeparated ε M := hM.prop.2 have hMcover : Metric.IsCover ε A M := Metric.IsCover.of_maximal_isSeparated hM obtain ⟨t, _htB, htfinite, htcover⟩ := finite_cover_balls_of_compact (isCompact_closedBall (0 : E) 1) (half_pos hv) have hsmall : ∀ c : E, (M ∩ ball c (v / 2)).Subsingleton := by intro c x hx y hy by_contra hxy have hsep := hMsep hx.1 hy.1 hxy have hdist : dist x y < v := by calc dist x y ≤ dist x c + dist y c := dist_triangle_right x y c _ < v / 2 + v / 2 := add_lt_add (mem_ball.mp hx.2) (mem_ball.mp hy.2) _ = v := by ring have hdist' : edist x y < (ε : ℝ≥0∞) := by rw [edist_dist, hε, ENNReal.ofReal_lt_ofReal_iff hv] exact hdist exact (not_lt_of_ge hsep.le) hdist' have hMfinite : M.Finite := by have hUfinite : (⋃ c ∈ t, M ∩ ball c (v / 2)).Finite := htfinite.biUnion fun c _ ↦ (hsmall c).finite apply hUfinite.subset intro x hx obtain ⟨c, hct, hxc⟩ := mem_iUnion₂.mp (htcover (hAball (hMsub hx))) exact mem_iUnion₂.mpr ⟨c, hct, hx, hxc⟩ let N : Finset E := hMfinite.toFinset have hNsub : ∀ y ∈ N, y ∈ A := fun y hy ↦ hMsub (by simpa [N] using hy) have hNmem : ∀ y ∈ N, ‖y‖ ≤ 1 := fun y hy ↦ hA y (hNsub y hy) have hNcover : ∀ x ∈ A, ∃ y ∈ N, ‖x - y‖ ≤ v := by intro x hx obtain ⟨y, hyM, hxy⟩ := hMcover hx refine ⟨y, by simpa [N] using hyM, ?_⟩ change edist x y ≤ (ε : ℝ≥0∞) at hxy rw [edist_dist, hε, ENNReal.ofReal_le_ofReal_iff hv.le] at hxy simpa [dist_eq_norm] using hxy refine ⟨N, hNsub, hNcover, ?_⟩ borelize E let μ : Measure E := Measure.addHaar let δ : ℝ := v / 2 let ρ : ℝ := 1 + v / 2 have hδ : 0 < δ := div_pos hv (by norm_num) have hρ : 0 < ρ := by positivity set U := ⋃ c ∈ N, ball (c : E) δ with hU have hdisj : Pairwise (N : Set E) (Disjoint on fun c ↦ ball (c : E) δ) := by rintro c hc d hd hcd apply ball_disjoint_ball have hsep := hMsep (by simpa [N] using hc) (by simpa [N] using hd) hcd have hdist : v < dist c d := by change (ε : ℝ≥0∞) < edist c d at hsep rw [edist_dist, hε, ENNReal.ofReal_lt_ofReal_iff_of_nonneg hv.le] at hsep exact hsep simpa [δ] using hdist.le have hUsub : U ⊆ ball (0 : E) ρ := by refine iUnion₂_subset fun x hx ↦ ?_ apply ball_subset_ball' calc δ + dist x 0 ≤ δ + 1 := by rw [dist_zero_right] exact add_le_add le_rfl (hNmem x hx) _ = ρ := by simp [δ, ρ, add_comm] have hvol : (N.card : ℝ≥0∞) * ofReal (δ ^ finrank ℝ E) * μ (ball 0 1) ≤ ofReal (ρ ^ finrank ℝ E) * μ (ball 0 1) := calc (N.card : ℝ≥0∞) * ofReal (δ ^ finrank ℝ E) * μ (ball 0 1) = μ U := by rw [hU, measure_biUnion_finset hdisj fun c _ ↦ measurableSet_ball] simp only [μ.addHaar_ball_of_pos _ hδ, Finset.sum_const, nsmul_eq_mul, mul_assoc] _ ≤ μ (ball (0 : E) ρ) := measure_mono hUsub _ = ofReal (ρ ^ finrank ℝ E) * μ (ball 0 1) := by simp only [μ.addHaar_ball_of_pos _ hρ] have hcancel : (N.card : ℝ≥0∞) * ofReal (δ ^ finrank ℝ E) ≤ ofReal (ρ ^ finrank ℝ E) := (ENNReal.mul_le_mul_iff_left (measure_ball_pos μ (0 : E) zero_lt_one).ne' measure_ball_lt_top.ne).1 hvol have hreal : (N.card : ℝ) * δ ^ finrank ℝ E ≤ ρ ^ finrank ℝ E := by have h := (ENNReal.toReal_le_toReal (ENNReal.mul_ne_top (by simp) (by simp)) (by simp : ofReal (ρ ^ finrank ℝ E) ≠ ∞)).2 hcancel simpa [ENNReal.toReal_ofReal (pow_nonneg hδ.le _), ENNReal.toReal_ofReal (pow_nonneg hρ.le _)] using h have hδpow : 0 < δ ^ finrank ℝ E := pow_pos hδ _ calc (N.card : ℝ) ≤ ρ ^ finrank ℝ E / δ ^ finrank ℝ E := (le_div_iff₀ hδpow).2 hreal _ = (1 + 2 / v) ^ finrank ℝ E := by rw [← div_pow] congr 1 field_simp [δ, ρ, hv.ne'] ring -
exists_unit_ball_net_card_lelemma — The closed unit ball of a finite-dimensional real normed space has, at every accuracy v, a finite net of at most (1 + 2 / v) raised to the dimension of the space many points.hypothesesProof (Lean source)
lemma exists_unit_ball_net_card_le (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {v : ℝ} (hv : 0 < v) : ∃ N : Finset E, (∀ x : E, ‖x‖ ≤ 1 → ∃ y ∈ N, ‖x - y‖ ≤ v) ∧ (N.card : ℝ) ≤ (1 + 2 / v) ^ finrank ℝ E := by obtain ⟨N, _hNsub, hNcover, hNcard⟩ := exists_internal_net_card_le E {x : E | ‖x‖ ≤ 1} (by simp) hv exact ⟨N, by simpa using hNcover, hNcard⟩
ProjectionMatrixTail 1 core · 1 supporting This module gives a dimension-sensitive tail bound for the squared Euclidean energy of independent, centered, unit-bounded noise after an orthogonal matrix projection. ★ measure_projection_energy_gt_le
Concentration of projected bounded noise
This module gives a dimension-sensitive tail bound for the squared Euclidean energy of independent, centered, unit-bounded noise after an orthogonal matrix projection. The ambient dimension is replaced by an a priori bound on the matrix rank.
Projected bounded-noise tail bound. Let eps : Fin n → Ω → ℝ be coordinate noise terms such that each eps i is measurable, each is bounded by 1 in absolute value almost surely, each has mean zero, and the coordinates are mutually independent. If the n × n matrix Pi is symmetric and idempotent — so it is an orthogonal projection — and has rank at most r, then for any nonnegative t, the squared Euclidean norm of the projected vector Pi · eps exceeds 4 * t ^ 2 with probability at most 5 ^ r * exp (-t ^ 2 / 2).
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
matrix_rank_le_of_gram_factortheorem — A matrix admitting a Gram factorization through r vectors has rank at most r.hypothesesR ι :r :ℕPi :Matrix ι ι Rvectors :Fin r → ι → Rhfactor :∀ i j, Pi i j = ∑ k, vectors k i * vectors k jconclusionrank Pi ≤ rProof (Lean source)
theorem matrix_rank_le_of_gram_factor {R ι : Type*} [Nontrivial R] [CommRing R] [Fintype ι] {r : ℕ} (Pi : Matrix ι ι R) (vectors : Fin r → ι → R) (hfactor : ∀ i j, Pi i j = ∑ k, vectors k i * vectors k j) : rank Pi ≤ r := by let B : Matrix ι (Fin r) R := fun i k ↦ vectors k i have hPi : Pi = B * B.transpose := by ext i j simp only [Matrix.mul_apply, Matrix.transpose_apply, B] exact hfactor i j rw [hPi] exact (Matrix.rank_mul_le_left B B.transpose).trans <| by simpa using Matrix.rank_le_card_width B
SubGaussianNorm 1 core · 2 supporting This file turns scalar sub-Gaussian bounds on a finite half-net into a tail bound for the norm of a finite-dimensional random vector. ★ measure_norm_gt_le_five_pow_finrank
Norm tails from finite directional nets
This file turns scalar sub-Gaussian bounds on a finite half-net into a tail bound for the norm of a finite-dimensional random vector. It also supplies a dimension-only version by constructing a half-net in the supporting subspace.
Dimension-only sub-Gaussian norm tail. Let V be a finite-dimensional subspace of E. If Z lies in V almost surely under P and every unit vector v in V has the scalar projection ⟪v, Z⟫ sub-Gaussian with parameter 1 under P, then for any nonnegative t, the probability that ‖Z‖ exceeds 2 * t is at most 5 raised to the dimension of V, times exp (-t ^ 2 / 2).
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
half_norm_lt_inner_of_mem_netlemma — Every nonzero vector in a subspace has a point in a finite half-net whose inner product with that vector is at least half of its norm.hypothesesE :V :Submodule ℝ Ehnet :∀ x ∈ Vif‖x‖ = 1then∃ v ∈ N, ‖x - v‖ ≤ (1 : ℝ) / 2hzV :z ∈ Vhz :z ≠ 0conclusion∃ v ∈ N, ‖z‖ / 2 ≤ ⟪v, z⟫Proof (Lean source)
lemma half_norm_lt_inner_of_mem_net {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {N : Finset E} {z : E} (V : Submodule ℝ E) (hnet : ∀ x ∈ V, ‖x‖ = 1 → ∃ v ∈ N, ‖x - v‖ ≤ (1 : ℝ) / 2) (hzV : z ∈ V) (hz : z ≠ 0) : ∃ v ∈ N, ‖z‖ / 2 ≤ ⟪v, z⟫ := by let x : E := ‖z‖⁻¹ • z have hxnorm : ‖x‖ = 1 := by simp [x, norm_smul, hz] obtain ⟨v, hvN, hv⟩ := hnet x (V.smul_mem _ hzV) hxnorm refine ⟨v, hvN, ?_⟩ have hinner : ⟪x - v, x⟫ ≤ (1 : ℝ) / 2 := by calc ⟪x - v, x⟫ ≤ |⟪x - v, x⟫| := le_abs_self _ _ ≤ ‖x - v‖ * ‖x‖ := abs_real_inner_le_norm _ _ _ ≤ ((1 : ℝ) / 2) * 1 := mul_le_mul hv hxnorm.le (norm_nonneg _) (by norm_num) _ = (1 : ℝ) / 2 := by norm_num have hvx : (1 : ℝ) / 2 ≤ ⟪v, x⟫ := by have hid : ⟪x - v, x⟫ = 1 - ⟪v, x⟫ := by rw [inner_sub_left, real_inner_self_eq_norm_sq, hxnorm] ring linarith have hzrepr : z = ‖z‖ • x := by simp [x, smul_smul, hz] rw [hzrepr, inner_smul_right, norm_smul, hxnorm] simp only [mul_one, Real.norm_eq_abs, abs_of_nonneg (norm_nonneg z)] have hmul := mul_le_mul_of_nonneg_left hvx (norm_nonneg z) simpa [div_eq_mul_inv, mul_comm] using hmul -
measure_norm_gt_le_of_half_nettheorem — If a finite half-net controls every scalar projection with unit sub-Gaussian parameter, then the norm has a Gaussian upper tail. The support condition is only required almost everywhere.hypothesesΩ E :P :Z :Ω → EV :Submodule ℝ EN :Finset Ehnet :∀ x ∈ Vif‖x‖ = 1then∃ v ∈ N, ‖x - v‖ ≤ (1 : ℝ) / 2hZV :∀ᵐ ω ∂P, Z ω ∈ Vhsubg :∀ v ∈ N, HasSubgaussianMGF (fun ω ↦ ⟪v, Z ω⟫) 1 Pt :ℝht :0 ≤ tconclusionP.real {ω | 2 * t < ‖Z ω‖} ≤ (N.card : ℝ) * exp (-t ^ 2 / 2)Proof (Lean source)
theorem measure_norm_gt_le_of_half_net {Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [InnerProductSpace ℝ E] (P : Measure Ω) [IsFiniteMeasure P] (Z : Ω → E) (V : Submodule ℝ E) (N : Finset E) (hnet : ∀ x ∈ V, ‖x‖ = 1 → ∃ v ∈ N, ‖x - v‖ ≤ (1 : ℝ) / 2) (hZV : ∀ᵐ ω ∂P, Z ω ∈ V) (hsubg : ∀ v ∈ N, HasSubgaussianMGF (fun ω ↦ ⟪v, Z ω⟫) 1 P) {t : ℝ} (ht : 0 ≤ t) : P.real {ω | 2 * t < ‖Z ω‖} ≤ (N.card : ℝ) * exp (-t ^ 2 / 2) := by let U : Set Ω := ⋃ v ∈ N, {ω | t ≤ ⟪v, Z ω⟫} have hAU : {ω | 2 * t < ‖Z ω‖} ≤ᵐ[P] U := by filter_upwards [hZV] with ω hω htail change 2 * t < ‖Z ω‖ at htail have hz : Z ω ≠ 0 := by intro hz simp [hz] at htail linarith obtain ⟨v, hvN, hv⟩ := half_norm_lt_inner_of_mem_net V hnet hω hz refine mem_iUnion₂.mpr ⟨v, hvN, ?_⟩ change t ≤ ⟪v, Z ω⟫ nlinarith calc P.real {ω | 2 * t < ‖Z ω‖} ≤ P.real U := by exact ENNReal.toReal_mono (measure_ne_top P U) (measure_mono_ae hAU) _ ≤ ∑ v ∈ N, P.real {ω | t ≤ ⟪v, Z ω⟫} := measureReal_biUnion_finset_le N _ _ ≤ ∑ _v ∈ N, exp (-t ^ 2 / 2) := by apply Finset.sum_le_sum intro v hv simpa using (hsubg v hv).measure_ge_le ht _ = (N.card : ℝ) * exp (-t ^ 2 / 2) := by rw [Finset.sum_const, nsmul_eq_mul]