Stat.Concentration.Variance­Adaptive­VCExpected­Maximal

Umbrella import for the countable-class variance-adaptive VC-type expected maximal inequality and its polynomial-cover adapter.

Basic 6 core · 4 supporting This module defines the empirical-measure polynomial covering hypothesis, the countable empirical supremum, and the normalized logarithmic rate used by the variance-adaptive expected maximal inequality. ★ hasPolynomialEmpiricalL2Cover

Data for variance-adaptive VC-type maximal inequalities

This module defines the empirical-measure polynomial covering hypothesis, the countable empirical supremum, and the normalized logarithmic rate used by the variance-adaptive expected maximal inequality. The covering hypothesis only asks about positive-size finite empirical laws, which is the exact input needed by empirical-metric chaining.

def HasPolynomialEmpiricalL2Cover reviewed
Causalean.Stat.Concentration

Given a real-valued function class on an observation space, an envelope UU, an entropy base AA, and an exponent vv, the polynomial empirical L2L^2 covering property holds exactly when, for every positive sample size and every sample of that size, and for every radius ε\varepsilon with 0<ε10<\varepsilon\le 1, there is a finite index set forming an L2L^2 cover under the empirical measure at radius εU\varepsilon U and its cardinality is at most (A/ε)v(A/\varepsilon)^v.

Definition (Lean source)
𝒳 :
Type u
shared
ι :
Type v
shared
F :
ι → 𝒳 → ℝ
U A v :
m :
S :
Fin m → 𝒳
0 < m
ε :
0 < ε
ε ≤ 1
HasPolynomialEmpiricalL2Cover F U A v :
Prop
∃ C : Finset ι,
clause 1
clause 2
(C.card : ℝ) ≤ rpow (A / ε) v
Causalean.Stat.Concentration.HasPolynomialEmpiricalL2Cover · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Basic.lean:23
def vcMaximalLog reviewed
Causalean.Stat.Concentration

Given an entropy base AA, an envelope UU, and a variance scale σ\sigma, the normalized logarithmic complexity is log(max{e,AU/σ})\log(\max\{e,AU/\sigma\}). This normalization makes the logarithm at least one.

Definition (Lean source)
A U σ :
vcMaximalLog A U σ :
log (max (exp 1) (A * U / σ))
def vcExpectedMaximalRate reviewed
Causalean.Stat.Concentration

Given an envelope UU, a variance scale σ\sigma, an entropy base AA, an exponent vv, and a sample size nn, the variance-adaptive VC-type rate is σvL/n+vUL/n\sigma\sqrt{vL/n}+vUL/n, where L=log(max{e,AU/σ})L=\log(\max\{e,AU/\sigma\}).

Definition (Lean source)
U σ A v :
n :
vcExpectedMaximalRate U σ A v n :
σ * sqrt (v * vcMaximalLog A U σ / (n : ℝ)) + v * U * vcMaximalLog A U σ / (n : ℝ)
Causalean.Stat.Concentration.vcExpectedMaximalRate · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Basic.lean:138
def varianceAdaptiveVCConstant reviewed
Causalean.Stat.Concentration

The fixed numerical constant for the variance-adaptive VC-type expected maximal inequality is 1638416384.

Definition (Lean source)
varianceAdaptiveVCConstant :
16384
Causalean.Stat.Concentration.varianceAdaptiveVCConstant · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Basic.lean:147
def countableEmpiricalSup reviewed
Causalean.Stat.Concentration

Given a measure PP on an observation space, a real-valued function class indexed by a set ι\iota, and a sample of nn observations, the countable empirical supremum is the supremum, over the class, of the absolute difference between the sample average and the population mean.

Definition (Lean source)
𝒳 :
Type u
shared
ι :
Type v
shared
P :
Measure 𝒳
F :
ι → 𝒳 → ℝ
n :
S :
Fin n → 𝒳
countableEmpiricalSup P F S :
uniformDeviation n F P id S
Causalean.Stat.Concentration.countableEmpiricalSup · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Basic.lean:153
theorem hasPolynomialEmpiricalL2Cover reviewed
Causalean.Stat.Concentration.HasPolynomialL2Cover

Empirical covering from population covering. If a family F of real-valued functions with envelope U admits a uniform polynomial L2L^2 covering-number bound over every probability measure, then there exist a base A at least Euler's number and an exponent v at least one such that F has polynomial empirical L2L^2 covering numbers with envelope U, base A, and exponent v.

Formal statement
𝒳 :
Type u
shared
ι :
Type v
ι → 𝒳 → ℝ
shared
U :
∃ A v : ℝ,
conclusion 1
exp 1 ≤ A
conclusion 2
1 ≤ v
conclusion 3
Proof (Lean source)
theorem HasPolynomialL2Cover.hasPolynomialEmpiricalL2Cover {F : ι → 𝒳 → ℝ} {U : ℝ} (hF : HasPolynomialL2Cover F U) : ∃ A v : ℝ, exp 1 ≤ A ∧ 1 ≤ v ∧ HasPolynomialEmpiricalL2Cover F U A v := by /- Extract `A₀,p` from `hF.entropy` and take `A = max (exp 1) (2 * A₀)` and `v = (p + 1 : ℕ)`. Instantiate the arbitrary-measure certificate at `finiteSampleMeasure S`. For `x = A₀ / ε`, the hypotheses give `1 ≤ x`; hence `ceil (x^p) ≤ x^p + 1 ≤ 2*x^p ≤ (A/ε)^(p+1)`. Rewrite the final natural power as `rpow` with `Real.rpow_natCast`. -/ obtain ⟨A₀, p, hA₀, hentropy⟩ := hF.entropy refine ⟨max (exp 1) (2 * A₀), ((p + 1 : ℕ) : ℝ), le_max_left _ _, ?_, ?_⟩ · exact_mod_cast Nat.succ_le_succ (zero_le p) · intro m S hm ε hε hε1 letI : IsProbabilityMeasure (finiteSampleMeasure S) := finiteSampleMeasure_isProbabilityMeasure S hm obtain ⟨C, hCcard, hCcover⟩ := hentropy (finiteSampleMeasure S) inferInstance ε hε hε1 refine ⟨C, hCcover, ?_⟩ have hx : 1 ≤ A₀ / ε := (one_le_div hε).2 (hε1.trans hA₀) have hceil : (ceil ((A₀ / ε) ^ p) : ℝ) < (A₀ / ε) ^ p + 1 := Nat.ceil_lt_add_one (by positivity) have hxpow : 1 ≤ (A₀ / ε) ^ p := one_le_pow₀ hx have hbase : A₀ / ε ≤ max (exp 1) (2 * A₀) / ε := by apply div_le_div_of_nonneg_right _ hε.le exact (by linarith : A₀ ≤ 2 * A₀) |>.trans (le_max_right _ _) have htwo : 2 ≤ max (exp 1) (2 * A₀) / ε := by apply (le_div_iff₀ hε).2 calc 2 * ε ≤ 2 * 1 := by gcongr _ ≤ 2 * A₀ := by gcongr _ ≤ max (exp 1) (2 * A₀) := le_max_right _ _ calc (C.card : ℝ) ≤ (ceil ((A₀ / ε) ^ p) : ℝ) := by exact_mod_cast hCcard _ ≤ 2 * (A₀ / ε) ^ p := by linarith _ ≤ (max (exp 1) (2 * A₀) / ε) ^ (p + 1) := by have hp := pow_le_pow_left₀ (by positivity : 0 ≤ A₀ / ε) hbase p calc 2 * (A₀ / ε) ^ p ≤ (max (exp 1) (2 * A₀) / ε) * (A₀ / ε) ^ p := mul_le_mul_of_nonneg_right htwo (by positivity) _ ≤ (max (exp 1) (2 * A₀) / ε) * (max (exp 1) (2 * A₀) / ε) ^ p := mul_le_mul_of_nonneg_left hp (by positivity) _ = (max (exp 1) (2 * A₀) / ε) ^ (p + 1) := by rw [pow_succ] ring _ = rpow (max (exp 1) (2 * A₀) / ε) ((p + 1 : ℕ) : ℝ) := by exact (Real.rpow_natCast _ _).symm
Causalean.Stat.Concentration.HasPolynomialL2Cover.hasPolynomialEmpiricalL2Cover · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Basic.lean:161 · uses HasPolynomialEmpiricalL2Cover , HasPolynomialL2Cover
4 supporting declarations (lemmas, instances)
Empirical­Cover 1 core · 1 supporting This module translates the finite-cover certificate used by the variance-adaptive maximal inequality into total boundedness and a numerical covering-number bound for Causalean's empirical function space. ★ coveringNumber_le

Polynomial empirical covers in Dudley's metric space

This module translates the finite-cover certificate used by the variance-adaptive maximal inequality into total boundedness and a numerical covering-number bound for Causalean's empirical function space. These are the two deterministic inputs expected by the existing Dudley theorem.

theorem coveringNumber_le reviewed
Causalean.Stat.Concentration.HasPolynomialEmpiricalL2Cover

Covering-number bound from an empirical cover. Suppose F has polynomial empirical L2L^2 covering numbers with envelope U, base A, and exponent v, every member of F is measurable, the envelope U is strictly positive, the sample S has positive size n, and the relative scale ε lies in the interval (0,1](0,1] ; then Dudley's empirical covering number of the class at radius ε * U, taken in the totally bounded empirical pseudometric space this cover furnishes, is at most the real power (A / ε) ^ v.

Formal statement
𝒳 :
Type u
shared
ι :
Type v
ι → 𝒳 → ℝ
shared
U A v :
hmeas :
∀ i, Measurable (F i)
hU :
0 < U
n :
S :
Fin n → 𝒳
hn :
0 < n
ε :
:
0 < ε
hε1 :
ε ≤ 1
htot :
hcover.totallyBounded hmeas hU S hn
(coveringNumber htot (ε * U) : ℝ) ≤ rpow (A / ε) v
Proof (Lean source)
theorem HasPolynomialEmpiricalL2Cover.coveringNumber_le {F : ι → 𝒳 → ℝ} {U A v : ℝ} (hcover : HasPolynomialEmpiricalL2Cover F U A v) (hmeas : ∀ i, Measurable (F i)) (hU : 0 < U) {n : ℕ} (S : Fin n → 𝒳) (hn : 0 < n) (ε : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) : let htot := hcover.totallyBounded hmeas hU S hn (coveringNumber htot (ε * U) : ℝ) ≤ rpow (A / ε) v := by /- Follow `real_vcSubgraph_empirical_coveringNumber_le`, using the explicit `hcover S hn ε hε hε1` witness instead of the pseudo-dimension cover. The minimal covering cardinality is at most the image of that witness, whose cardinality is bounded by the supplied real power. -/ classical dsimp only let htot := hcover.totallyBounded hmeas hU S hn let r := ε * U have hr : 0 < r := mul_pos hε hU obtain ⟨C, hCcover, hCcard⟩ := hcover S hn ε hε hε1 let T : Finset (EmpiricalFunctionSpace F S) := C.image fun j => ⟨j⟩ have hTcover : (Set.univ : Set (EmpiricalFunctionSpace F S)) ⊆ ⋃ y ∈ T, ball y r := by intro q hq obtain ⟨j, hjC, hj⟩ := hCcover q.index have hj' : empiricalDist S (F q.index) (F j) < r := by rw [← measureL2Dist_finiteSampleMeasure_eq_empiricalDist S hn (hmeas q.index) (hmeas j)] exact hj refine Set.mem_iUnion_of_mem (⟨j⟩ : EmpiricalFunctionSpace F S) ?_ refine Set.mem_iUnion_of_mem ?_ ?_ · exact Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨j, hjC, rfl⟩) · exact hj' rw [coveringNumber_eq htot hr] calc (find (coveringNumber_exists htot hr) : ℝ) ≤ T.card := by exact_mod_cast Nat.find_min' (coveringNumber_exists htot hr) ⟨T, rfl, hTcover⟩ _ ≤ C.card := by exact_mod_cast Finset.card_image_le _ ≤ rpow (A / ε) v := hCcard
1 supporting declaration (lemmas, instances)
Entropy­Chaining 3 core · 0 supporting This file packages the measurable envelope, population-radius, and uniform polynomial-cover hypotheses needed by the variance-adaptive expected maximal inequality, and derives the corresponding countable chaining bound. ★ vcEntropy_chaining_bound

VC entropy chaining for expected empirical maxima

This file packages the measurable envelope, population-radius, and uniform polynomial-cover hypotheses needed by the variance-adaptive expected maximal inequality, and derives the corresponding countable chaining bound.

def HasVCUniformEntropy reviewed
Causalean.Stat.Concentration

For a measure on a measurable sample space, a class of real-valued functions indexed by a set, an envelope bound, a radius, a covering constant, and an entropy exponent, the class has uniform VC-type entropy exactly when (1) the radius is positive, (2) the radius is strictly smaller than the envelope bound, (3) the covering constant is at least ee, (4) the entropy exponent is at least one, (5) every function in the class is measurable, (6) every function is bounded in absolute value by the envelope bound at every sample point, (7) every function has population L2L^2 distance at most the radius from the zero function, and (8) for every sequence of indices, the resulting sequence of functions has the stipulated polynomial empirical L2L^2 covering property.

Definition (Lean source)
Ω ι :
μ :
g :
ι → Ω → ℝ
U σ A v :
HasVCUniformEntropy μ g U σ A v :
Prop
clause 1
0 < σ
clause 2
σ < U
clause 3
exp 1 ≤ A
clause 4
1 ≤ v
clause 5
i :
clause 6
i z :
|g i z| ≤ U
clause 7
i :
measureL2Dist μ (g i) (fun _ => 0) ≤ σ
clause 8
g0 :
ℕ → ι
HasPolynomialEmpiricalL2Cover (fun k => g (g0 k)) U A v
def countableEmpiricalProcessSup reviewed
Causalean.Stat.Concentration

For a measure on a measurable sample space, a class of real-valued functions, a countable enumeration of that class, and a finite sample, the countable empirical-process supremum is the extended nonnegative real supremum, over the enumerated functions, of the absolute centered empirical average.

Definition (Lean source)
Ω ι :
μ :
g :
ι → Ω → ℝ
g0 :
ℕ → ι
n :
w :
Fin n → Ω
countableEmpiricalProcessSup μ g g0 w :
ℝ≥0∞
⨆ k : ℕ, ofReal |centeredEmpiricalAverage μ w (g (g0 k))|
Causalean.Stat.Concentration.countableEmpiricalProcessSup · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/EntropyChaining.lean:34
lemma vcEntropy_chaining_bound reviewed
Causalean.Stat.Concentration

Dudley chaining bound for VC-type entropy. Let μ be a probability measure on Ω, g : ι → Ω → ℝ a family of functions, and g0 : ℕ → ι a sequence of indices (for example an enumeration of a countable dense subfamily). If g has uniform VC-type entropy relative to μ, with envelope U, population L2L^2 radius σ, covering-entropy base A, and exponent v, then there is a constant C > 0, which may depend on U, σ, A and v, such that, for every sample size n ≥ 1, the expectation of the countable empirical-process supremum along the enumeration g0 over the n-fold product of μ is at most C · (σ √(log(U/σ)/n) + U log(U/σ)/n).

Formal statement
Ω ι :
g :
ι → Ω → ℝ
g0 :
ℕ → ι
U σ A v :
hent :
HasVCUniformEntropy μ g U σ A v
∃ C : ℝ,
0 < C
conclusion 1
n :
1 ≤ n
∫⁻ w, countableEmpiricalProcessSup μ g g0 w ∂Measure.pi (fun _ : Fin n => μ)
ofReal (C * (σ * sqrt (log (U / σ) / n) + U * log (U / σ) / n))
Proof (Lean source)
lemma vcEntropy_chaining_bound {Ω ι : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (g : ι → Ω → ℝ) (g0 : ℕ → ι) (U σ A v : ℝ) (hent : HasVCUniformEntropy μ g U σ A v) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 1 ≤ n → ∫⁻ w, countableEmpiricalProcessSup μ g g0 w ∂Measure.pi (fun _ : Fin n => μ) ≤ ofReal (C * (σ * sqrt (log (U / σ) / n) + U * log (U / σ) / n)) := by rcases hent with ⟨hσ, hσU, hA, hv, hmeas, henv, hL2, hcover⟩ let L0 := log (U / σ) let L := vcMaximalLog A U σ let q := max (sqrt (v * L / L0)) (v * L / L0) let C := varianceAdaptiveVCConstant * q have hU : 0 < U := hσ.trans hσU have hratio : 1 < U / σ := (lt_div_iff₀ hσ).2 (by simpa using hσU) have hL0 : 0 < L0 := Real.log_pos hratio have hA1 : 1 ≤ A := (Real.one_le_exp (by norm_num)).trans hA have hbase : U / σ ≤ max (exp 1) (A * U / σ) := by apply le_trans ?_ (le_max_right _ _) calc U / σ ≤ A * (U / σ) := le_mul_of_one_le_left (div_nonneg hU.le hσ.le) hA1 _ = A * U / σ := by ring have hLle : L0 ≤ L := by dsimp only [L0, L, vcMaximalLog] exact Real.log_le_log (div_pos hU hσ) hbase have hL : 0 < L := hL0.trans_le hLle have hq : 0 < q := by dsimp only [q] exact lt_of_lt_of_le (div_pos (mul_pos (lt_of_lt_of_le zero_lt_one hv) hL) hL0) (le_max_right _ _) refine ⟨C, mul_pos (by norm_num [varianceAdaptiveVCConstant]) hq, ?_⟩ intro n hn have hn0 : 0 < n := Nat.zero_lt_of_lt hn let F : ℕ → Ω → ℝ := fun k => g (g0 k) let μn : Measure (Fin n → Ω) := Measure.pi (fun _ : Fin n => μ) have hFmeas : ∀ k, Measurable (F k) := fun k => hmeas (g0 k) have hFenv : ∀ k x, |F k x| ≤ U := fun k x => henv (g0 k) x have hmain := varianceAdaptiveExpectedMaximal_le μ F hσ hσU hA hv hFmeas hFenv (fun k => hL2 (g0 k)) (hcover g0) n hn0 have hrate := varianceAdaptiveRate_le_logRatio hσ hσU hA hv hn0 have hreal : ∫ w, countableEmpiricalSup μ F w ∂μn ≤ C * (σ * sqrt (log (U / σ) / (n : ℝ)) + U * log (U / σ) / (n : ℝ)) := by calc ∫ w, countableEmpiricalSup μ F w ∂μn ≤ varianceAdaptiveVCConstant * vcExpectedMaximalRate U σ A v n := hmain _ ≤ varianceAdaptiveVCConstant * (q * (σ * sqrt (log (U / σ) / (n : ℝ)) + U * log (U / σ) / (n : ℝ))) := mul_le_mul_of_nonneg_left hrate (by norm_num [varianceAdaptiveVCConstant]) _ = C * (σ * sqrt (log (U / σ) / (n : ℝ)) + U * log (U / σ) / (n : ℝ)) := by simp only [C]; ring have hdevMeas : Measurable (fun w : Fin n → Ω => countableEmpiricalSup μ F w) := by exact uniformDeviation_measurable id hFmeas have hdevBound : ∀ w : Fin n → Ω, countableEmpiricalSup μ F w ≤ 2 * U := by intro w exact countableEmpiricalSup_le_two_envelope μ g g0 hU hmeas henv hn0 w have hdevNonneg : ∀ w : Fin n → Ω, 0 ≤ countableEmpiricalSup μ F w := by intro w exact Real.iSup_nonneg fun k => abs_nonneg _ have hdevInt : Integrable (fun w : Fin n → Ω => countableEmpiricalSup μ F w) μn := Integrable.of_bound hdevMeas.aestronglyMeasurable (2 * U) (ae_of_all _ fun w => by rw [Real.norm_eq_abs, abs_of_nonneg (hdevNonneg w)] exact hdevBound w) simp_rw [countableEmpiricalProcessSup_eq_of_envelope μ g g0 hU hmeas henv hn0] rw [← ofReal_integral_eq_lintegral_ofReal hdevInt (ae_of_all _ hdevNonneg)] exact ENNReal.ofReal_le_ofReal hreal
Expected­Maximal 1 core · 1 supporting This module proves the countable-class expected empirical-supremum bound from the variance-adaptive Rademacher chaining estimate and symmetrization. ★ varianceAdaptiveExpectedMaximal_le

Variance-adaptive expected maximal inequality for countable VC-type classes

This module proves the countable-class expected empirical-supremum bound from the variance-adaptive Rademacher chaining estimate and symmetrization. It also provides an adapter for Causalean's existing uniform polynomial covering certificate.

theorem varianceAdaptiveExpectedMaximal_le reviewed
Causalean.Stat.Concentration

Variance-adaptive expected maximal inequality. Let P be a probability measure on the sample space and F a countable family of real-valued functions on it. Suppose the population L2L^2 radius σ is strictly positive and strictly less than the envelope U, the covering-entropy base A is at least Euler's number and the exponent v is at least one, every function in F is measurable and bounded in absolute value by U, each function's population L2L^2 distance from the zero function is at most σ, F has polynomial empirical L2L^2 covering numbers with envelope U, base A, and exponent v, and the sample size n is positive. Then the expected empirical supremum of F over an n-point i.i.d. sample drawn from P is at most the universal constant varianceAdaptiveVCConstant times the variance-adaptive rate σ √(v log(AU/σ)/n) + v U log(AU/σ)/n.

Formal statement
𝒳 :
Type u
shared
ι :
Type v
Nonempty ι
Countable ι
shared
F :
ι → 𝒳 → ℝ
U σ A v :
:
0 < σ
hσU :
σ < U
hA :
exp 1 ≤ A
hv :
1 ≤ v
hmeas :
∀ i, Measurable (F i)
henvelope :
∀ i x, |F i x| ≤ U
hL2 :
∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σ
n :
hn :
0 < n
∫ S : Fin n → 𝒳, countableEmpiricalSup P F S ∂Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
theorem varianceAdaptiveExpectedMaximal_le [Nonempty ι] [Countable ι] (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) {U σ A v : ℝ} (hσ : 0 < σ) (hσU : σ < U) (hA : exp 1 ≤ A) (hv : 1 ≤ v) (hmeas : ∀ i, Measurable (F i)) (henvelope : ∀ i x, |F i x| ≤ U) (hL2 : ∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σ) (hcover : HasPolynomialEmpiricalL2Cover F U A v) (n : ℕ) (hn : 0 < n) : ∫ S : Fin n → 𝒳, countableEmpiricalSup P F S ∂Measure.pi (fun _ : Fin n => P) ≤ varianceAdaptiveVCConstant * vcExpectedMaximalRate U σ A v n := by /- Apply countable-class symmetrization with the identity observation map, then substitute `varianceAdaptiveRademacherComplexity_le`. The envelope hypotheses make every indexed function integrable, and countability makes the pointwise supremum measurable; no continuum-supremum measurability premise is needed. -/ have hsymm := uniform_deviation_expectation_le_two_smul_rademacher_complexity (μ := P) (f := F) hn id (fun i => by simpa [Function.comp_def] using hmeas i) (hσ.trans hσU).le henvelope have hrad := varianceAdaptiveRademacherComplexity_le P F hσ hσU hA hv hmeas henvelope hL2 hcover n hn calc ∫ S : Fin n → 𝒳, countableEmpiricalSup P F S ∂Measure.pi (fun _ : Fin n => P) ≤ 2 • rademacherComplexity n F P id := by simpa [countableEmpiricalSup, Function.comp_def] using hsymm _ ≤ 2 • ((varianceAdaptiveVCConstant / 2) * vcExpectedMaximalRate U σ A v n) := by have hmul := mul_le_mul_of_nonneg_left hrad (by norm_num : (0 : ℝ) ≤ 2) simp only [nsmul_eq_mul, Nat.cast_ofNat] exact hmul _ = varianceAdaptiveVCConstant * vcExpectedMaximalRate U σ A v n := by simp only [nsmul_eq_mul] ring
1 supporting declaration (lemmas, instances)
Rademacher 1 core · 2 supporting This module contains the chaining core of the countable-class maximal inequality. ★ varianceAdaptiveRademacherComplexity_le

Variance-adaptive Rademacher chaining

This module contains the chaining core of the countable-class maximal inequality. It combines empirical polynomial covers with Dudley chaining and a self-bounding empirical-radius argument, retaining the population radius in the leading term.

The statement follows the constant-envelope specialization of the maximal inequality recorded as Corollary 5.1 in Chernozhukov, Chetverikov, and Kato, Gaussian approximation of suprema of empirical processes (2014). In that corollary the empirical process is scaled by sqrt n; a constant envelope has population norm and sample maximum both bounded by U, so dividing their conclusion by sqrt n gives exactly the two terms below. The canonical normalization there is A ≥ exp 1 and v ≥ 1.

theorem varianceAdaptiveRademacherComplexity_le reviewed
Causalean.Stat.Concentration

Variance-adaptive Rademacher complexity bound. Let P be a probability measure on the sample space and F a countable family of real-valued functions on it. Suppose the population L2L^2 radius σ is strictly positive and strictly less than the envelope U, the covering-entropy base A is at least Euler's number and the exponent v is at least one, every function in F is measurable and bounded in absolute value by U, each function's population L2L^2 distance from the zero function is at most σ, F has polynomial empirical L2L^2 covering numbers with envelope U, base A, and exponent v, and the sample size n is positive. Then the Rademacher complexity of F under P with n i.i.d. observations is at most half the universal constant varianceAdaptiveVCConstant times the variance-adaptive rate σ √(v log(AU/σ)/n) + v U log(AU/σ)/n.

Formal statement
𝒳 :
Type u
shared
ι :
Type v
Nonempty ι
Countable ι
shared
F :
ι → 𝒳 → ℝ
U σ A v :
:
0 < σ
hσU :
σ < U
hA :
exp 1 ≤ A
hv :
1 ≤ v
hmeas :
∀ i, Measurable (F i)
henvelope :
∀ i x, |F i x| ≤ U
hL2 :
∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σ
n :
hn :
0 < n
rademacherComplexity n F P id
Proof (Lean source)
theorem varianceAdaptiveRademacherComplexity_le [Nonempty ι] [Countable ι] (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) {U σ A v : ℝ} (hσ : 0 < σ) (hσU : σ < U) (hA : exp 1 ≤ A) (hv : 1 ≤ v) (hmeas : ∀ i, Measurable (F i)) (henvelope : ∀ i x, |F i x| ≤ U) (hL2 : ∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σ) (hcover : HasPolynomialEmpiricalL2Cover F U A v) (n : ℕ) (hn : 0 < n) : rademacherComplexity n F P id ≤ (varianceAdaptiveVCConstant / 2) * vcExpectedMaximalRate U σ A v n := by /- Proof route: 1. Anchor at one index and apply the existing signed Dudley theorem to the increment class (which contains zero). Bound the anchor directly by its empirical `L²` norm. This is the countable absolute-Dudley bridge; it avoids treating the signed theorem as if it already had an outer absolute value. 2. Conditional on a sample, use `hcover` and `measureL2Dist_finiteSampleMeasure_eq_empiricalDist` to bound every empirical covering number at envelope-relative scales. 3. Truncate Dudley's integral at a variable lower scale and at the random empirical radius `R_S = sup_f ‖f‖_{L²(Pₙ)}`. Integrate the polynomial entropy bound to obtain a conditional estimate proportional to `R_S * sqrt (v * log (max e (A*U/R_S)) / n)` plus the truncation term. 4. In the bounded-envelope specialization, symmetrization of the square class followed by `empiricalRademacherComplexity_contraction_abs_of_bddAbove` gives directly `E R_S² ≤ σ² + 8 U R_n(F)`; unlike the unbounded-envelope source proof, no Hoffmann–Jørgensen second-moment step is needed. Solve the resulting quadratic inequality, producing the leading `σ` term and the second-order `U/n` term. All constants may be rounded upward to `varianceAdaptiveVCConstant / 2`. -/ classical let μn : Measure (Fin n → 𝒳) := Measure.pi (fun _ : Fin n => P) have hU : 0 < U := hσ.trans hσU have hU0 : 0 ≤ U := hU.le have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn have hL1 : 1 ≤ vcMaximalLog A U σ := by have hratio : exp 1 < A * U / σ := by have hUσ : 1 < U / σ := (one_lt_div₀ hσ).2 hσU calc exp 1 ≤ A := hA _ < A * (U / σ) := by nlinarith [Real.exp_pos 1] _ = A * U / σ := by ring rw [vcMaximalLog, max_eq_right hratio.le, ← Real.log_exp 1] exact Real.log_le_log (Real.exp_pos 1) hratio.le have hv0 : 0 ≤ v := zero_le_one.trans hv have hvL1 : 1 ≤ v * vcMaximalLog A U σ := by nlinarith let rad : (Fin n → 𝒳) → ℝ := fun S => empiricalRademacherComplexity n F S let radius : (Fin n → 𝒳) → ℝ := fun S => empiricalL2Radius F S let floorRadius : ℝ := U / (n : ℝ) let radius' : (Fin n → 𝒳) → ℝ := fun S => max (radius S) floorRadius have hradMeas : Measurable rad := empiricalRademacherComplexity_measurable_countable F hmeas n have hradiusMeas : Measurable radius := empiricalL2Radius_measurable F hmeas n have hradius'Meas : Measurable radius' := hradiusMeas.max measurable_const have hradMem : ∀ S, rad S ∈ Icc 0 U := fun S => empiricalRademacherComplexity_mem_Icc F hU0 henvelope n S have hradiusMem : ∀ S, radius S ∈ Icc 0 U := fun S => empiricalL2Radius_mem_Icc F hU0 henvelope S have hfloor0 : 0 < floorRadius := div_pos hU hnR have hfloorU : floorRadius ≤ U := by dsimp [floorRadius] apply (div_le_iff₀ hnR).2 nlinarith have hradius'Mem : ∀ S, radius' S ∈ Icc 0 U := by intro S exact ⟨le_max_of_le_right hfloor0.le, max_le (hradiusMem S).2 hfloorU⟩ have hradInt : Integrable rad μn := (integrable_const U).mono' hradMeas.aestronglyMeasurable (ae_of_all _ fun S => by simpa [Real.norm_eq_abs, abs_of_nonneg (hradMem S).1] using (hradMem S).2) have hradiusInt : Integrable radius μn := (integrable_const U).mono' hradiusMeas.aestronglyMeasurable (ae_of_all _ fun S => by simpa [Real.norm_eq_abs, abs_of_nonneg (hradiusMem S).1] using (hradiusMem S).2) have hradius'Int : Integrable radius' μn := (integrable_const U).mono' hradius'Meas.aestronglyMeasurable (ae_of_all _ fun S => by simpa [Real.norm_eq_abs, abs_of_nonneg (hradius'Mem S).1] using (hradius'Mem S).2) let q : ℝ := sqrt (v * vcMaximalLog A U σ / (n : ℝ)) have hq0 : 0 ≤ q := Real.sqrt_nonneg _ have hconditional : ∀ S, rad S ≤ 26 * q * (radius' S + σ) := by intro S have hri : ∀ i, empiricalNorm S (F i) ≤ radius' S := by intro i have hbdd : BddAbove (range fun j => empiricalNorm S (F j)) := ⟨U, by rintro _ ⟨j, rfl⟩; exact empiricalNorm_le_of_envelope F hU0 henvelope S j⟩ exact (le_ciSup hbdd i).trans (le_max_left _ _) have hc := empiricalRademacher_conditional_le F hσ hσU hA hv hmeas henvelope hcover hn S hri (lt_of_lt_of_le hfloor0 (le_max_right _ _)) (hradius'Mem S).2 have hsqrt : sqrt (v * vcMaximalLog A U σ) / sqrt (n : ℝ) = q := by dsimp [q] rw [Real.sqrt_div (mul_nonneg hv0 (zero_le_one.trans hL1))] calc rad S ≤ 26 / sqrt (n : ℝ) * sqrt (v * vcMaximalLog A U σ) * (radius' S + σ) := hc _ = 26 * q * (radius' S + σ) := by rw [← hsqrt]; ring have hrhsInt : Integrable (fun S => 26 * q * (radius' S + σ)) μn := (hradius'Int.add (integrable_const σ)).const_mul _ have hxchain : rademacherComplexity n F P id ≤ 26 * q * ((∫ S, radius' S ∂μn) + σ) := by simp only [causal_defs_simps] change (∫ S, rad S ∂μn) ≤ _ calc (∫ S, rad S ∂μn) ≤ ∫ S, 26 * q * (radius' S + σ) ∂μn := integral_mono hradInt hrhsInt hconditional _ = 26 * q * ((∫ S, radius' S ∂μn) + σ) := by integral_linearity simp [μn, smul_eq_mul] have hradius'Expectation : (∫ S, radius' S ∂μn) ≤ (∫ S, radius S ∂μn) + floorRadius := by have hsumInt := hradiusInt.add (integrable_const floorRadius) calc (∫ S, radius' S ∂μn) ≤ ∫ S, radius S + floorRadius ∂μn := by apply integral_mono hradius'Int hsumInt intro S exact max_le_add_of_nonneg (hradiusMem S).1 hfloor0.le _ = (∫ S, radius S ∂μn) + floorRadius := by integral_linearity simp [μn] let sqF : ι → 𝒳 → ℝ := fun i x => F i x ^ 2 have hsqMeas : ∀ i, Measurable (sqF i) := fun i => (hmeas i).pow_const 2 have hsqEnv : ∀ i x, |sqF i x| ≤ U ^ 2 := by intro i x rw [abs_of_nonneg (sq_nonneg _), sq_le_sq] simpa [abs_of_pos hU] using henvelope i x have hsymm := uniform_deviation_expectation_le_two_smul_rademacher_complexity (μ := P) (f := sqF) hn id hsqMeas (sq_nonneg U) hsqEnv let φ : ℝ → ℝ := fun x => (clipIcc (-U) U x) ^ 2 have hφeq : ∀ i x, φ (F i x) = sqF i x := by intro i x simp [φ, sqF, clipIcc_neg_eq_self (henvelope i x)] have hφMeas : ∀ i, Measurable (fun x => φ (F i x)) := fun i => by simpa [hφeq i] using hsqMeas i have hcontractPoint : ∀ S, empiricalRademacherComplexity n sqF S ≤ 4 * U * rad S := by intro S have hc := empiricalRademacherComplexity_contraction_abs_of_bddAbove φ (clippedSquare_lipschitzAt0 hU0) F hU0 henvelope n S have heq := empiricalRademacherComplexity_congr_sample n sqF (fun i x => φ (F i x)) S (fun i k => (hφeq i (S k)).symm) rw [heq] calc empiricalRademacherComplexity n (fun i x => φ (F i x)) S ≤ 2 * (2 * U) * empiricalRademacherComplexity n F S := hc _ = 4 * U * rad S := by simp only [rad]; ring have hsqRadMeas := empiricalRademacherComplexity_measurable_countable sqF hsqMeas n have hsqRadInt : Integrable (fun S => empiricalRademacherComplexity n sqF S) μn := (integrable_const (U ^ 2)).mono' hsqRadMeas.aestronglyMeasurable (ae_of_all _ fun S => by have hm := empiricalRademacherComplexity_mem_Icc sqF (sq_nonneg U) hsqEnv n S simpa [Real.norm_eq_abs, abs_of_nonneg hm.1] using hm.2) have hcontractPop : rademacherComplexity n sqF P id ≤ 4 * U * rademacherComplexity n F P id := by simp only [causal_defs_simps] change (∫ S, empiricalRademacherComplexity n sqF S ∂μn) ≤ 4 * U * ∫ S, rad S ∂μn rw [← integral_const_mul] exact integral_mono hsqRadInt (hradInt.const_mul _) hcontractPoint have hdevExpectation : (∫ S, uniformDeviation n sqF P id S ∂μn) ≤ 8 * U * rademacherComplexity n F P id := by have hsymm' : (∫ S, uniformDeviation n sqF P id S ∂μn) ≤ 2 * rademacherComplexity n sqF P id := by simpa [μn, two_smul ℝ] using hsymm have hs := hsymm'.trans (mul_le_mul_of_nonneg_left hcontractPop (show (0 : ℝ) ≤ 2 by norm_num)) exact hs.trans_eq (by ring) have hradiusSqMeas : Measurable (fun S => radius S ^ 2) := hradiusMeas.pow_const 2 have hradiusSqInt : Integrable (fun S => radius S ^ 2) μn := (integrable_const (U ^ 2)).mono' hradiusSqMeas.aestronglyMeasurable (ae_of_all _ fun S => by rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] exact (sq_le_sq₀ (hradiusMem S).1 hU0).2 (hradiusMem S).2) have hdevMeas : Measurable (fun S => uniformDeviation n sqF P id S) := uniformDeviation_measurable id hsqMeas have hdevInt : Integrable (fun S => uniformDeviation n sqF P id S) μn := by have hsqInt : ∀ i, Integrable (sqF i) P := fun i => (integrable_const (U ^ 2)).mono' (hsqMeas i).aestronglyMeasurable (ae_of_all _ fun x => by simpa [Real.norm_eq_abs] using hsqEnv i x) have hsqPop : ∀ i, (∫ x, sqF i x ∂P) ∈ Icc 0 (U ^ 2) := by intro i constructor · exact integral_nonneg fun x => by exact sq_nonneg (F i x) · calc (∫ x, sqF i x ∂P) ≤ ∫ _x, U ^ 2 ∂P := integral_mono (hsqInt i) (integrable_const (U ^ 2)) (fun x => by have := hsqEnv i x simpa [abs_of_nonneg (sq_nonneg (F i x)), sqF] using this) _ = U ^ 2 := by simp have hsqAvg : ∀ (T : Fin n → 𝒳) (i : ι), ((n : ℝ)⁻¹ * ∑ k : Fin n, sqF i (T k)) ∈ Icc 0 (U ^ 2) := by intro T i constructor · positivity · dsimp [sqF] calc _ ≤ (n : ℝ)⁻¹ * ∑ _k : Fin n, U ^ 2 := by refine mul_le_mul_of_nonneg_left (Finset.sum_le_sum fun k _ => ?_) (by positivity) exact (sq_le_sq).2 (by simpa [abs_of_pos hU] using henvelope i (T k)) _ = U ^ 2 := by rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] simp only [Fintype.card_fin] field_simp have hdevBound : ∀ S, uniformDeviation n sqF P id S ∈ Icc 0 (2 * U ^ 2) := by intro S have hbdd : BddAbove (range fun i => |(n : ℝ)⁻¹ * ∑ k : Fin n, sqF i (S k) - ∫ x, sqF i x ∂P|) := by refine ⟨2 * U ^ 2, ?_⟩ rintro _ ⟨i, rfl⟩ have havg := hsqAvg S i have hpop := hsqPop i rw [abs_le] constructor <;> nlinarith [havg.1, havg.2, hpop.1, hpop.2, sq_nonneg U] constructor · let i₀ : ι := choice inferInstance unfold uniformDeviation exact (abs_nonneg _).trans (le_ciSup hbdd i₀) · unfold uniformDeviation exact ciSup_le fun i => by have havg := hsqAvg S i have hpop := hsqPop i simp only [Function.comp_apply, id_eq] rw [abs_le] constructor <;> nlinarith [havg.1, havg.2, hpop.1, hpop.2, sq_nonneg U] exact (integrable_const (2 * U ^ 2)).mono' hdevMeas.aestronglyMeasurable (ae_of_all _ fun S => by simpa [Real.norm_eq_abs, abs_of_nonneg (hdevBound S).1] using (hdevBound S).2) have hradiusSecond : (∫ S, radius S ^ 2 ∂μn) ≤ σ ^ 2 + 8 * U * rademacherComplexity n F P id := by have hpoint := fun S => empiricalL2Radius_sq_le_uniformDeviation P F hσ hσU hmeas henvelope hL2 hn S calc (∫ S, radius S ^ 2 ∂μn) ≤ ∫ S, σ ^ 2 + uniformDeviation n sqF P id S ∂μn := by exact integral_mono hradiusSqInt ((integrable_const (σ ^ 2)).add hdevInt) hpoint -- … truncated; follow the source link for the rest …
2 supporting declarations (lemmas, instances)
Separability 3 core · 0 supporting This file gives a paper-neutral criterion reducing an uncountable empirical supremum to a fixed countable, pointwise-dense subfamily under every finite product law. ★ hasCountableEmpiricalSupReduction_of_pointwise_dense

Countable reduction of empirical suprema

This file gives a paper-neutral criterion reducing an uncountable empirical supremum to a fixed countable, pointwise-dense subfamily under every finite product law.

def centeredEmpiricalAverage reviewed
Causalean.Stat.Concentration

Given a measure μ\mu on an observation space, a sample of nn observations, and a real-valued function, the centered empirical average is its sample average minus its integral with respect to μ\mu. For an empty sample the average term is zero by the inverse-of-zero convention, so the value is minus the integral.

Definition (Lean source)
Ω :
μ :
n :
w :
Fin n → Ω
g :
Ω → ℝ
centeredEmpiricalAverage μ w g :
(n : ℝ)⁻¹ * ∑ i, g (w i) - ∫ z, g z ∂μ
Causalean.Stat.Concentration.centeredEmpiricalAverage · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Separability.lean:25
def HasCountableEmpiricalSupReduction reviewed
Causalean.Stat.Concentration

Given a measure μ\mu on an observation space and a family of real-valued functions indexed by a set ι\iota, the countable empirical-supremum reduction property holds exactly when every member of the family is measurable and there is a sequence of indices whose associated countable subfamily has, for every sample size, the same supremum of absolute centered empirical averages as the full family almost surely under the corresponding product measure.

Definition (Lean source)
Ω ι :
μ :
g :
ι → Ω → ℝ
HasCountableEmpiricalSupReduction μ g :
Prop
clause 1
i :
clause 2
∃ g0 : ℕ → ι,
∀ n,
(∀ᵐ w ∂Measure.pi (fun _ : Fin n => μ), (⨆ i : ι, ofReal |centeredEmpiricalAverage μ w (g i)|) = ⨆ k : ℕ, ofReal |centeredEmpiricalAverage μ w (g (g0 k))|)
Causalean.Stat.Concentration.HasCountableEmpiricalSupReduction · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Separability.lean:33
lemma hasCountableEmpiricalSupReduction_of_pointwise_dense reviewed
Causalean.Stat.Concentration

Countable supremum reduction from pointwise density. Let μ be a σ-finite measure on Ω, g : ι → Ω → ℝ a family of functions, and g0 : ℕ → ι a countable subfamily. Suppose S is a μ-conull subset of Ω, on S, every g i is the pointwise limit, along some subsequence, of the countable subfamily g ∘ g0, each g i is measurable, and there is a single μ-integrable envelope G dominating |g i| uniformly in i. Then the countable subfamily indexed by g0 realizes the full continuum empirical-process supremum of g almost surely under every finite product law of μ.

Formal statement
Ω ι :
μ :
g :
ι → Ω → ℝ
g0 :
ℕ → ι
S :
Set Ω
hS :
∀ᵐ z ∂μ, z ∈ S
hdense :
∀ i, ∃ kseq : ℕ → ℕ, ∀ z ∈ S, Tendsto (fun m => g (g0 (kseq m)) z) atTop (nhds (g i z))
hmeas :
∀ i, Measurable (g i)
hdom :
∃ G : Ω → ℝ, Integrable G μ ∧ ∀ i z, |g i z| ≤ G z
Proof (Lean source)
lemma hasCountableEmpiricalSupReduction_of_pointwise_dense {Ω ι : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [SigmaFinite μ] (g : ι → Ω → ℝ) (g0 : ℕ → ι) (S : Set Ω) (hS : ∀ᵐ z ∂μ, z ∈ S) (hdense : ∀ i, ∃ kseq : ℕ → ℕ, ∀ z ∈ S, Tendsto (fun m => g (g0 (kseq m)) z) atTop (nhds (g i z))) (hmeas : ∀ i, Measurable (g i)) (hdom : ∃ G : Ω → ℝ, Integrable G μ ∧ ∀ i z, |g i z| ≤ G z) : HasCountableEmpiricalSupReduction μ g := by rcases hdom with ⟨G, hG, hbound⟩ refine ⟨hmeas, g0, ?_⟩ intro n have hsampleS : ∀ᵐ w ∂Measure.pi (fun _ : Fin n => μ), ∀ j, w j ∈ S := eventually_all.2 fun j => Measure.tendsto_eval_ae_ae (μ := fun _ : Fin n => μ) (i := j) hS filter_upwards [hsampleS] with w hw apply le_antisymm · refine iSup_le fun i => ?_ obtain ⟨kseq, hseq⟩ := hdense i have hint : Tendsto (fun m => ∫ z, g (g0 (kseq m)) z ∂μ) atTop (nhds (∫ z, g i z ∂μ)) := by refine MeasureTheory.tendsto_integral_of_dominated_convergence G (fun m => (hmeas _).aestronglyMeasurable) hG ?_ ?_ · intro m exact Eventually.of_forall fun z => by simpa only [Real.norm_eq_abs] using hbound (g0 (kseq m)) z · exact hS.mono fun z hz => hseq z hz have havg : Tendsto (fun m => centeredEmpiricalAverage μ w (g (g0 (kseq m)))) atTop (nhds (centeredEmpiricalAverage μ w (g i))) := by unfold centeredEmpiricalAverage apply Tendsto.sub · apply Tendsto.const_mul apply tendsto_finset_sum intro j _hj exact hseq (w j) (hw j) · exact hint have hval : Tendsto (fun m => ofReal |centeredEmpiricalAverage μ w (g (g0 (kseq m)))|) atTop (nhds (ofReal |centeredEmpiricalAverage μ w (g i)|)) := ENNReal.continuous_ofReal.continuousAt.tendsto.comp (continuous_abs.continuousAt.tendsto.comp havg) apply le_of_tendsto hval exact Eventually.of_forall fun m => le_iSup (fun k : ℕ => ofReal |centeredEmpiricalAverage μ w (g (g0 k))|) (kseq m) · refine iSup_le fun k => ?_ exact le_iSup (fun i : ι => ofReal |centeredEmpiricalAverage μ w (g i)|) (g0 k)
Causalean.Stat.Concentration.hasCountableEmpiricalSupReduction_of_pointwise_dense · Causalean/Stat/Concentration/VarianceAdaptiveVCExpectedMaximal/Separability.lean:47 · uses HasCountableEmpiricalSupReduction