Stat.Concentration.Rademacher
Rademacher and local Rademacher complexity and the tools that bound them: symmetrization, the Ledoux–Talagrand contraction principle, and star-hull localization.
StarHull 5 core · 7 supporting This file defines the star hull of a real-valued function class around the origin and gives the parameterizations used in local empirical-process arguments. ★ starHull_smul_mem
Star Hulls of Function Classes
This file defines the star hull of a real-valued function class around the origin and gives the parameterizations used in local empirical-process arguments.
The set-level definition starHull F contains all functions α • F i with
α ∈ [0, 1]. Basic membership and congruence lemmas show that the original
class, the zero function, and every admissible rescaling lie in this hull.
For Rademacher-complexity arguments, starHullParam ι packages the rescaling
coefficient together with the original index, and starHullEval F evaluates
the associated function. The lemmas starHullEval_mem_starHull,
starHullEval_one, and starHullEval_zero connect this parameterized view
back to the set-level star hull.
Given a real-valued family of functions on a covariate space, the star hull of that family about zero is the set of all functions obtained by multiplying one member of the family by a real coefficient between zero and one, inclusive.
Definition (Lean source)
Star-hull rescaling. For any coefficient α satisfying 0 ≤ α and α ≤ 1, the rescaled function α • F i lies in the star hull of the family F.
Formal statement
Proof (Lean source)
Given a real-valued family of functions on a covariate space, the star-hull index set is the collection of precisely those functions that belong to its star hull.
Definition (Lean source)
Given an index set, the star-hull parameter set consists of every pair of an index from that set and a real scaling coefficient between zero and one, inclusive.
Definition (Lean source)
Given a real-valued family of functions on a covariate space, the star-hull evaluation map assigns to each admissible scaling coefficient and family index the corresponding rescaled function, whose value at each covariate point is the coefficient times that function's value.
Definition (Lean source)
7 supporting declarations (lemmas, instances)
-
mem_starHull_selflemma — Each F i belongs to its own star hull (take α = 1).Proof (Lean source)
lemma mem_starHull_self {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (i : ι) : F i ∈ starHull F := by refine ⟨i, 1, by norm_num, le_refl 1, ?_⟩ simp -
zero_mem_starHulllemma — The zero function belongs to the star hull of any nonempty family (take α = 0).Proof (Lean source)
lemma zero_mem_starHull {ι 𝒳 : Type*} [Nonempty ι] (F : ι → 𝒳 → ℝ) : (fun _ : 𝒳 => (0 : ℝ)) ∈ starHull F := by refine ⟨Classical.arbitrary ι, 0, le_refl 0, by norm_num, ?_⟩ ext x simp -
starHull_congrlemma — Pointwise-equal families have the same star hull.Proof (Lean source)
lemma starHull_congr {ι 𝒳 : Type*} {F G : ι → 𝒳 → ℝ} (h : ∀ i x, F i x = G i x) : starHull F = starHull G := by have hFG : F = G := by funext i x exact h i x rw [hFG] -
starHullEval_mem_starHulllemma — The evaluation map lands inside the (set-level) star hull.Proof (Lean source)
lemma starHullEval_mem_starHull {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (p : starHullParam ι) : starHullEval F p ∈ starHull F := by refine ⟨p.2, p.1.val, p.1.property.1, p.1.property.2, ?_⟩ funext x simp [starHullEval, smul_eq_mul] -
starHullEval_onelemma — At parameter (1, i), evaluation recovers F i.hypothesesι 𝒳 :Type*F :ι → 𝒳 → ℝi :ιconclusionstarHullEval F (⟨(1 : ℝ), by simp [Set.mem_Icc]⟩, i) = F iProof (Lean source)
lemma starHullEval_one {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (i : ι) : starHullEval F (⟨(1 : ℝ), by simp [Set.mem_Icc]⟩, i) = F i := by funext x simp [starHullEval] -
starHullEval_zerolemma — At parameter (0, i), evaluation is the zero function.hypothesesι 𝒳 :Type*F :ι → 𝒳 → ℝi :ιconclusionstarHullEval F (⟨(0 : ℝ), by simp [Set.mem_Icc]⟩, i) = fun _ => 0Proof (Lean source)
lemma starHullEval_zero {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (i : ι) : starHullEval F (⟨(0 : ℝ), by simp [Set.mem_Icc]⟩, i) = fun _ => 0 := by funext x simp [starHullEval] -
instNonemptyinstance — starHullParam inherits Nonempty from its ι factor (the [0,1] factor is always nonempty).parametersι :Type*Nonempty ιinstancegiven by⟨(⟨1, by simp [Set.mem_Icc]⟩, Classical.arbitrary ι)⟩
Contraction 3 core · 11 supporting This file formalizes the Ledoux--Talagrand contraction principle for empirical Rademacher complexity. ★ rademacher_contraction★ rademacher_contraction_abs
Rademacher Contraction
This file formalizes the Ledoux--Talagrand contraction principle for empirical Rademacher complexity.
The public entry points are:
* LipschitzAt0, the hypothesis that a scalar map fixes zero and is
L-Lipschitz.
* rademacher_contraction, the signed finite-index contraction theorem with
constant L.
* rademacher_contraction_abs, the absolute-value finite-index contraction
theorem with the standard constant 2L.
* empiricalRademacherComplexity_smul_class and
empiricalRademacherComplexity_without_abs_smul_class, scaling laws for the
absolute-value and signed empirical complexities.
* empiricalRademacherComplexity_sub_le, sub-additivity for differences of
uniformly bounded classes.
* empiricalRademacherComplexity_contraction_abs_of_bddAbove, the
arbitrary-index contraction theorem obtained by reducing to finite
approximate maximizers.
The proof of the finite-index theorem uses the standard hybrid/sign-swap argument. The private hybrid lemmas expose the coordinate replacement steps, while the public statements give reusable empirical-process bounds.
For a real-valued transformation and a real constant, the transformation is Lipschitz at zero with constant exactly when (1) it maps zero to zero and (2) for every two real numbers and , its increment has absolute value at most .
Definition (Lean source)
Ledoux–Talagrand contraction principle (signed form). If L is nonnegative and φ : ℝ → ℝ is L-Lipschitz, i.e. |φ x - φ y| ≤ L * |x - y| for all x, y, then composing each function of the family F with φ does not increase the signed (without-abs) empirical Rademacher complexity on the sample S by more than the factor L.
Formal statement
Proof (Lean source)
Contraction principle, absolute-value form. If φ fixes 0 and is L-Lipschitz, i.e. φ 0 = 0 and |φ x - φ y| ≤ L * |x - y| for all x, y, then composing each function of the family F with φ multiplies the (absolute-value) empirical Rademacher complexity on the sample S by at most 2 * L.
Formal statement
Proof (Lean source)
11 supporting declarations (lemmas, instances)
-
finite_iSup_eq_valuelemma — A real-valued function on a nonempty finite population attains a largest value, and its supremum is that value.hypothesesα :Type*Nonempty αFinite αf :α → ℝconclusion∃ a : α,(⨆ x, f x) = f aconclusion 1x :f x ≤ f aProof (Lean source)
lemma finite_iSup_eq_value {α : Type*} [Nonempty α] [Finite α] (f : α → ℝ) : ∃ a : α, (⨆ x, f x) = f a ∧ ∀ x, f x ≤ f a := by classical rcases Finite.exists_max f with ⟨a, ha⟩ refine ⟨a, ?_, ha⟩ exact le_antisymm (ciSup_le ha) (le_ciSup (Finite.bddAbove_range f) a) -
sup_pair_lipschitz_scaledlemma — For a finite nonempty collection, the sum of the largest values obtained by adding and subtracting a nonnegative multiple of a transformation with a given Lipschitz constant is no greater than the corresponding sum using that linear bound.hypothesesι :Type*Nonempty ιFinite ιφ :ℝ → ℝL c :ℝhc :0 ≤ chφ :∀ x y, |φ x - φ y| ≤ L * |x - y|a :ι → ℝb :ι → ℝconclusion(⨆ i, a i + c * φ (b i)) + (⨆ i, a i - c * φ (b i))≤ (⨆ i, a i + c * (L * b i)) + (⨆ i, a i - c * (L * b i))Proof (Lean source)
lemma sup_pair_lipschitz_scaled {ι : Type*} [Nonempty ι] [Finite ι] (φ : ℝ → ℝ) {L c : ℝ} (hc : 0 ≤ c) (hφ : ∀ x y, |φ x - φ y| ≤ L * |x - y|) (a : ι → ℝ) (b : ι → ℝ) : (⨆ i, a i + c * φ (b i)) + (⨆ i, a i - c * φ (b i)) ≤ (⨆ i, a i + c * (L * b i)) + (⨆ i, a i - c * (L * b i)) := by classical rcases finite_iSup_eq_value (fun i : ι => a i + c * φ (b i)) with ⟨i₁, hi₁eq, _hi₁max⟩ rcases finite_iSup_eq_value (fun i : ι => a i - c * φ (b i)) with ⟨i₂, hi₂eq, _hi₂max⟩ rw [hi₁eq, hi₂eq] have hdiff : φ (b i₁) - φ (b i₂) ≤ L * |b i₁ - b i₂| := by exact (le_abs_self _).trans (hφ (b i₁) (b i₂)) have hcdiff : c * (φ (b i₁) - φ (b i₂)) ≤ c * (L * |b i₁ - b i₂|) := by exact mul_le_mul_of_nonneg_left hdiff hc by_cases hcase : b i₂ ≤ b i₁ · have habs : |b i₁ - b i₂| = b i₁ - b i₂ := abs_of_nonneg (sub_nonneg.mpr hcase) have hmain : a i₁ + c * φ (b i₁) + (a i₂ - c * φ (b i₂)) ≤ (a i₁ + c * (L * b i₁)) + (a i₂ - c * (L * b i₂)) := by rw [habs] at hcdiff linarith refine hmain.trans ?_ exact add_le_add (le_ciSup (Finite.bddAbove_range (fun i : ι => a i + c * (L * b i))) i₁) (le_ciSup (Finite.bddAbove_range (fun i : ι => a i - c * (L * b i))) i₂) · have hcase' : b i₁ ≤ b i₂ := le_of_not_ge hcase have habs : |b i₁ - b i₂| = b i₂ - b i₁ := by rw [abs_sub_comm] exact abs_of_nonneg (sub_nonneg.mpr hcase') have hmain : a i₁ + c * φ (b i₁) + (a i₂ - c * φ (b i₂)) ≤ (a i₂ + c * (L * b i₂)) + (a i₁ - c * (L * b i₁)) := by rw [habs] at hcdiff linarith refine hmain.trans ?_ have hp := le_ciSup (Finite.bddAbove_range (fun i : ι => a i + c * (L * b i))) i₂ have hm := le_ciSup (Finite.bddAbove_range (fun i : ι => a i - c * (L * b i))) i₁ linarith -
empiricalRademacherComplexity_without_abs_smul_classtheorem — Without-abs analogue of empiricalRademacherComplexity_smul_class: the signed scaling carries c, not |c|.hypothesesconclusionempiricalRademacherComplexity_without_abs n (fun i x => c * F i x) S= c * empiricalRademacherComplexity_without_abs n F SProof (Lean source)
theorem empiricalRademacherComplexity_without_abs_smul_class (F : ι → 𝒳 → ℝ) (c : ℝ) (hc : 0 ≤ c) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity_without_abs n (fun i x => c * F i x) S = c * empiricalRademacherComplexity_without_abs n F S := by unfold empiricalRademacherComplexity_without_abs have hsum : (∑ σ : Signs n, ⨆ i, (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k))) = c * ∑ σ : Signs n, ⨆ i, (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k) := by rw [Finset.mul_sum] refine Finset.sum_congr rfl fun σ _ => ?_ calc (⨆ i, (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k))) = ⨆ i, c * ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by refine iSup_congr fun i => ?_ calc (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k)) = (n : ℝ)⁻¹ * (c * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by congr 1 rw [Finset.mul_sum] refine Finset.sum_congr rfl fun k _ => by ring _ = c * ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by ring _ = c * ⨆ i, (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k) := by exact (Real.mul_iSup_of_nonneg hc (fun i => (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k))).symm rw [hsum] ring -
lipschitzAt0_neglemma — Negating a function that fixes zero preserves the same Lipschitz constant.Proof (Lean source)
lemma lipschitzAt0_neg (φ : ℝ → ℝ) {L : ℝ} (hφ : LipschitzAt0 φ L) : LipschitzAt0 (fun x => -φ x) L := by refine ⟨by simp [hφ.1], ?_⟩ intro x y rw [show -φ x - -φ y = -(φ x - φ y) from by ring, abs_neg] exact hφ.2 x y -
iSup_abs_le_iSup_add_iSup_neg_of_exists_zerolemma — If a finite collection of real numbers includes zero, its largest absolute value is at most the sum of its largest value and the largest value after negation.hypothesesα :Type*Finite αx :α → ℝh0 :∃ a : α, x a = 0conclusion(⨆ a, |x a|) ≤ (⨆ a, x a) + (⨆ a, -x a)Proof (Lean source)
lemma iSup_abs_le_iSup_add_iSup_neg_of_exists_zero {α : Type*} [Finite α] (x : α → ℝ) (h0 : ∃ a : α, x a = 0) : (⨆ a, |x a|) ≤ (⨆ a, x a) + (⨆ a, -x a) := by classical letI := ofFinite α rcases h0 with ⟨a0, ha0⟩ letI : Nonempty α := ⟨a0⟩ have hsup_nonneg : 0 ≤ ⨆ a, x a := by rw [← ha0] exact le_ciSup (Finite.bddAbove_range x) a0 have hsup_neg_nonneg : 0 ≤ ⨆ a, -x a := by rw [← show -x a0 = 0 by rw [ha0]; simp] exact le_ciSup (Finite.bddAbove_range fun a => -x a) a0 refine ciSup_le ?_ intro a by_cases hx : 0 ≤ x a · rw [abs_of_nonneg hx] have hxle : x a ≤ ⨆ a, x a := le_ciSup (Finite.bddAbove_range x) a linarith · have hxle : -x a ≤ ⨆ a, -x a := le_ciSup (Finite.bddAbove_range fun a => -x a) a rw [abs_of_neg (lt_of_not_ge hx)] linarith -
empirical_abs_withZero_le_no_abs_plus_neglemma — If a function class contains the zero function, its empirical Rademacher complexity with absolute values is bounded by the sum of the corresponding unsigned complexities for the class and its negation.hypothesesι :sharedType u_1𝒳 :sharedType u_2Finite ιF :Option ι → 𝒳 → ℝhzero :∀ x, F none x = 0n :ℕS :Fin n → 𝒳conclusionempiricalRademacherComplexity n F S≤ empiricalRademacherComplexity_without_abs n F S+ empiricalRademacherComplexity_without_abs n (fun i x => -F i x) SProof (Lean source)
lemma empirical_abs_withZero_le_no_abs_plus_neg [Finite ι] (F : Option ι → 𝒳 → ℝ) (hzero : ∀ x, F none x = 0) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n F S ≤ empiricalRademacherComplexity_without_abs n F S + empiricalRademacherComplexity_without_abs n (fun i x => -F i x) S := by classical letI := ofFinite ι unfold empiricalRademacherComplexity empiricalRademacherComplexity_without_abs rw [← mul_add] refine mul_le_mul_of_nonneg_left ?_ (by positivity) rw [← Finset.sum_add_distrib] refine Finset.sum_le_sum ?_ intro σ _ have hzero_inner : (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F none (S k) = 0 := by simp [hzero] have hpoint := iSup_abs_le_iSup_add_iSup_neg_of_exists_zero (fun i : Option ι => (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) ⟨none, hzero_inner⟩ have hneg : (⨆ i : Option ι, -((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k))) = (⨆ i : Option ι, (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (-F i (S k))) := by refine iSup_congr fun i => ?_ calc -((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) = (n : ℝ)⁻¹ * (-(∑ k : Fin n, (σ k : ℝ) * F i (S k))) := by ring _ = (n : ℝ)⁻¹ * (∑ k : Fin n, -((σ k : ℝ) * F i (S k))) := by rw [Finset.sum_neg_distrib] _ = (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (-F i (S k)) := by congr 1 refine Finset.sum_congr rfl fun k _ => by ring simpa [hneg] using hpoint -
empiricalRademacherComplexity_smul_classtheorem — Scalar-multiplication law for empirical Rademacher complexity. Scaling each element of a function class by c scales the absolute-value empirical Rademacher complexity by |c|.hypothesesconclusionempiricalRademacherComplexity n (fun i x => c * F i x) S= |c| * empiricalRademacherComplexity n F SProof (Lean source)
theorem empiricalRademacherComplexity_smul_class (F : ι → 𝒳 → ℝ) (c : ℝ) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n (fun i x => c * F i x) S = |c| * empiricalRademacherComplexity n F S := by unfold empiricalRademacherComplexity have hsum : (∑ σ : Signs n, ⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k))|) = |c| * ∑ σ : Signs n, ⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)| := by rw [Finset.mul_sum] refine Finset.sum_congr rfl fun σ _ => ?_ calc (⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k))|) = ⨆ i, |c| * |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)| := by refine iSup_congr fun i => ?_ have hlin : (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k)) = c * ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by calc (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (c * F i (S k)) = (n : ℝ)⁻¹ * (c * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by congr 1 rw [Finset.mul_sum] refine Finset.sum_congr rfl fun k _ => by ring _ = c * ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) := by ring rw [hlin, abs_mul] _ = |c| * ⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)| := by exact (Real.mul_iSup_of_nonneg (abs_nonneg c) (fun i => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)|)).symm rw [hsum] ring -
absInner_le_of_boundlemma — A signed empirical average of a uniformly bounded function has absolute value no larger than the same uniform bound.hypothesesι :sharedType u_1𝒳 :sharedType u_2H :ι → 𝒳 → ℝM :ℝhM0 :0 ≤ MhH :∀ i x, |H i x| ≤ Mn :ℕS :Fin n → 𝒳σ :Signs ni :ιconclusion|(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * H i (S k)| ≤ MProof (Lean source)
lemma absInner_le_of_bound (H : ι → 𝒳 → ℝ) {M : ℝ} (hM0 : 0 ≤ M) (hH : ∀ i x, |H i x| ≤ M) (n : ℕ) (S : Fin n → 𝒳) (σ : Signs n) (i : ι) : |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * H i (S k)| ≤ M := by by_cases hn : n = 0 · subst hn; simpa using hM0 · have hn_pos : 0 < (n : ℝ) := by positivity rw [abs_mul, abs_of_nonneg (by positivity : (0:ℝ) ≤ (n:ℝ)⁻¹)] calc (n : ℝ)⁻¹ * |∑ k : Fin n, (σ k : ℝ) * H i (S k)| ≤ (n : ℝ)⁻¹ * ∑ k : Fin n, M := by refine mul_le_mul_of_nonneg_left ?_ (by positivity) refine (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum ?_) intro k _ rw [abs_mul] rcases signAtom_coe_real_eq_neg_one_or_one (σ k) with h | h · rw [h]; simpa using hH i (S k) · rw [h]; simpa using hH i (S k) _ = M := by rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] field_simp -
absInner_bddAbovelemma — Signed empirical averages of a uniformly bounded function class are bounded above by the common absolute bound.hypothesesι :sharedType u_1𝒳 :sharedType u_2H :ι → 𝒳 → ℝM :ℝhM0 :0 ≤ MhH :∀ i x, |H i x| ≤ Mn :ℕS :Fin n → 𝒳σ :Signs nProof (Lean source)
lemma absInner_bddAbove (H : ι → 𝒳 → ℝ) {M : ℝ} (hM0 : 0 ≤ M) (hH : ∀ i x, |H i x| ≤ M) (n : ℕ) (S : Fin n → 𝒳) (σ : Signs n) : BddAbove (range (fun i => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * H i (S k)|)) := by refine ⟨M, ?_⟩ rintro _ ⟨i, rfl⟩ exact absInner_le_of_bound H hM0 hH n S σ i -
empiricalRademacherComplexity_sub_letheorem — Empirical Rademacher complexity is sub-additive over differences of classes. For classes F, G sharing the index ι, each with a uniform bound, the complexity of fun i x => F i x - G i x is at most the sum of the individual complexities.hypothesesι :sharedType u_1𝒳 :sharedType u_2Nonempty ιF G :ι → 𝒳 → ℝMF MG :ℝhMF0 :0 ≤ MFhMG0 :0 ≤ MGhF :∀ i x, |F i x| ≤ MFhG :∀ i x, |G i x| ≤ MGn :ℕS :Fin n → 𝒳conclusionempiricalRademacherComplexity n (fun i x => F i x - G i x) S≤ empiricalRademacherComplexity n F S + empiricalRademacherComplexity n G SProof (Lean source)
theorem empiricalRademacherComplexity_sub_le [Nonempty ι] (F G : ι → 𝒳 → ℝ) {MF MG : ℝ} (hMF0 : 0 ≤ MF) (hMG0 : 0 ≤ MG) (hF : ∀ i x, |F i x| ≤ MF) (hG : ∀ i x, |G i x| ≤ MG) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n (fun i x => F i x - G i x) S ≤ empiricalRademacherComplexity n F S + empiricalRademacherComplexity n G S := by classical unfold empiricalRademacherComplexity rw [← mul_add, ← Finset.sum_add_distrib] refine mul_le_mul_of_nonneg_left (Finset.sum_le_sum ?_) (by positivity) intro σ _ have hbddF := absInner_bddAbove F hMF0 hF n S σ have hbddG := absInner_bddAbove G hMG0 hG n S σ refine ciSup_le (fun i => ?_) have hsplit : (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (F i (S k) - G i (S k)) = ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k)) - ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * G i (S k)) := by rw [← mul_sub, ← Finset.sum_sub_distrib] refine congrArg _ (Finset.sum_congr rfl fun k _ => by ring) rw [hsplit] refine (abs_sub _ _).trans ?_ exact add_le_add (le_ciSup hbddF i) (le_ciSup hbddG i) -
empiricalRademacherComplexity_contraction_abs_of_bddAbovetheorem — Ledoux–Talagrand contraction over an arbitrary (possibly infinite) index. For an L-Lipschitz φ with φ 0 = 0 and a class F with a uniform bound M, R̂_n(φ ∘ F) ≤ 2L · R̂_n(F) for *any* nonempty index ι. The infinite-index case is reduced to the finite-index rademacher_contraction_abs by choosing, for each of the finitely many sign vectors, an ε-approximate maximizer; their finite collection is a finite subindex on which the Fintype contraction applies.hypothesesι :sharedType u_1𝒳 :sharedType u_2Nonempty ιφ :ℝ → ℝL :ℝhφ :LipschitzAt0 φ LF :ι → 𝒳 → ℝM :ℝhM0 :0 ≤ MhM :∀ i x, |F i x| ≤ Mn :ℕS :Fin n → 𝒳conclusionempiricalRademacherComplexity n (fun i x => φ (F i x)) S≤ 2 * L * empiricalRademacherComplexity n F SProof (Lean source)
theorem empiricalRademacherComplexity_contraction_abs_of_bddAbove [Nonempty ι] (φ : ℝ → ℝ) {L : ℝ} (hφ : LipschitzAt0 φ L) (F : ι → 𝒳 → ℝ) {M : ℝ} (hM0 : 0 ≤ M) (hM : ∀ i x, |F i x| ≤ M) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n (fun i x => φ (F i x)) S ≤ 2 * L * empiricalRademacherComplexity n F S := by classical have hL : 0 ≤ L := by have h := hφ.2 0 1 norm_num [hφ.1] at h exact (abs_nonneg _).trans h haveI hSigns : Nonempty (Signs n) := ⟨fun _ => ⟨1, by decide⟩⟩ -- uniform bound for the composed class `φ ∘ F` have hLM0 : 0 ≤ L * M := mul_nonneg hL hM0 have hφM : ∀ i x, |φ (F i x)| ≤ L * M := by intro i x have h := hφ.2 (F i x) 0 rw [hφ.1, sub_zero, sub_zero] at h exact h.trans (mul_le_mul_of_nonneg_left (hM i x) hL) have hcard : (0 : ℝ) < (card (Signs n) : ℝ) := by exact_mod_cast Fintype.card_pos (α := Signs n) refine le_of_forall_pos_le_add (fun ε hε => ?_) -- per-sign ε-approximate maximizers (explicit supremand form) have hex : ∀ σ : Signs n, ∃ i, (⨆ j, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j (S k))|) - ε < |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F i (S k))| := by intro σ exact exists_lt_of_lt_ciSup (sub_lt_self _ hε) choose iσ hiσ using hex -- the finite subindex collecting all per-sign maximizers set T : Finset ι := Finset.image iσ Finset.univ with hT haveI : Nonempty {x // x ∈ T} := ⟨⟨iσ (Classical.arbitrary (Signs n)), Finset.mem_image.mpr ⟨_, Finset.mem_univ _, rfl⟩⟩⟩ -- Fintype contraction on the subindex `↥T` have hcontr := rademacher_contraction_abs (ι := {x // x ∈ T}) φ hφ (fun j => F j.val) n S -- (b) restricting the index only lowers the (with-abs) complexity have hb : empiricalRademacherComplexity n (fun j : {x // x ∈ T} => F j.val) S ≤ empiricalRademacherComplexity n F S := by unfold empiricalRademacherComplexity refine mul_le_mul_of_nonneg_left (Finset.sum_le_sum ?_) (by positivity) intro σ _ exact ciSup_le (fun j => le_ciSup (absInner_bddAbove F hM0 hM n S σ) j.val) -- (a) the ε-maximizers recover the full supremum up to ε have ha : empiricalRademacherComplexity n (fun i x => φ (F i x)) S ≤ empiricalRademacherComplexity n (fun (j : {x // x ∈ T}) x => φ (F j.val x)) S + ε := by unfold empiricalRademacherComplexity have hpt : ∀ σ : Signs n, (⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F i (S k))|) ≤ (⨆ j : {x // x ∈ T}, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j.val (S k))|) + ε := by intro σ have hmem : iσ σ ∈ T := Finset.mem_image.mpr ⟨σ, Finset.mem_univ _, rfl⟩ have hbddT : BddAbove (range (fun j : {x // x ∈ T} => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j.val (S k))|)) := Finite.bddAbove_range _ have hle := le_ciSup hbddT (⟨iσ σ, hmem⟩ : {x // x ∈ T}) have := hiσ σ linarith calc (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, ⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F i (S k))| ≤ (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, ((⨆ j : {x // x ∈ T}, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j.val (S k))|) + ε) := by refine mul_le_mul_of_nonneg_left (Finset.sum_le_sum fun σ _ => hpt σ) (by positivity) _ = (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, (⨆ j : {x // x ∈ T}, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j.val (S k))|) + (card (Signs n) : ℝ)⁻¹ * (card (Signs n) : ℝ) * ε := by rw [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, nsmul_eq_mul] ring _ = (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, (⨆ j : {x // x ∈ T}, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * φ (F j.val (S k))|) + ε := by rw [inv_mul_cancel₀ (ne_of_gt hcard)]; ring calc empiricalRademacherComplexity n (fun i x => φ (F i x)) S ≤ empiricalRademacherComplexity n (fun (j : {x // x ∈ T}) x => φ (F j.val x)) S + ε := ha _ ≤ 2 * L * empiricalRademacherComplexity n (fun j : {x // x ∈ T} => F j.val) S + ε := by linarith [hcontr] _ ≤ 2 * L * empiricalRademacherComplexity n F S + ε := by nlinarith [mul_le_mul_of_nonneg_left hb (by linarith : (0:ℝ) ≤ 2 * L)]
LocalRademacher 2 core · 8 supporting This file develops local Rademacher complexity for star-hull neighborhoods of a function class, using the zero-out parameterization starHullZeroOut F norm r : starHullParam ι → 𝒳 → ℝ. ★ localRademacher_le_critical_radius
Local Rademacher Complexity
This file develops local Rademacher complexity for star-hull neighborhoods of a
function class, using the zero-out parameterization
starHullZeroOut F norm r : starHullParam ι → 𝒳 → ℝ.
The main definition is localRademacherComplexity, the Rademacher complexity
of the localized star-hull class at radius r. The supporting lemmas establish
non-negativity, radius monotonicity, pointwise zero-out comparison, and the
bridge from an ordinary ι-indexed zero-out class to the star-hull
parameterization.
The headline theorem localRademacher_le_critical_radius consumes a
RademacherUpperBound and a SubRoot envelope to show that, above the critical
radius, the localized Rademacher complexity is bounded by
r * criticalRadius ψ. This is the local-complexity step used in uniform
deviation bounds.
Given a real-valued family of functions indexed by a set of labels, a real-valued functional measuring the size of such functions, a measure on a sample space equipped with a σ-algebra, a sample-space-valued covariate map, a nonnegative integer sample size, and a real radius, the localized Rademacher complexity is the Rademacher complexity of the star-hull family after functions whose size exceeds that radius are replaced by zero.
Definition (Lean source)
Localized inequality (headline). Suppose the envelope ψ is sub-root: nonnegative, non-decreasing, and with the ratio ψ r / r non-increasing in r, and ψ upper-bounds the localized population Rademacher complexity of the class F (measured by norm, under the sampling law μ, map X, and sample size n) at every nonnegative radius. Writing δ* := criticalRadius ψ, suppose δ* is positive and it satisfies the fixed-point bound ψ δ* ≤ δ*². Then for every radius r ≥ δ*, the localized Rademacher complexity at radius r is at most r · δ*.
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
localRademacherComplexity_nonneglemma — The localized Rademacher complexity is non-negative.hypothesesΩ :sharedType u_1ι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝμ :Measure ΩX :Ω → 𝒳n :ℕr :ℝconclusion0 ≤ localRademacherComplexity F norm μ X n rProof (Lean source)
lemma localRademacherComplexity_nonneg (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) (n : ℕ) (r : ℝ) : 0 ≤ localRademacherComplexity F norm μ X n r := by unfold localRademacherComplexity rademacherComplexity apply MeasureTheory.integral_nonneg intro ω unfold empiricalRademacherComplexity refine mul_nonneg ?_ ?_ · positivity · refine sum_nonneg ?_ intro σ _ refine Real.iSup_nonneg ?_ intro p exact abs_nonneg _ -
empiricalRademacherComplexity_mono_of_innerlemma — Per-σ, per-i inner-expression bound implies empirical Rademacher comparison.hypothesesconclusionempiricalRademacherComplexity n f S ≤ empiricalRademacherComplexity n g SProof (Lean source)
lemma empiricalRademacherComplexity_mono_of_inner {ι' : Type*} {n : ℕ} (f g : ι' → 𝒳 → ℝ) (S : Fin n → 𝒳) (hbdd_g : ∀ σ : Signs n, BddAbove (range fun i => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * g i (S k)|)) (h : ∀ σ : Signs n, ∀ i : ι', |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * f i (S k)| ≤ |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * g i (S k)|) : empiricalRademacherComplexity n f S ≤ empiricalRademacherComplexity n g S := by unfold empiricalRademacherComplexity refine mul_le_mul_of_nonneg_left ?_ (by positivity) refine Finset.sum_le_sum ?_ intro σ _ refine Real.iSup_le ?_ ?_ · intro i exact le_trans (h σ i) (le_ciSup (hbdd_g σ) i) · refine Real.iSup_nonneg ?_ intro i exact abs_nonneg _ -
abs_inner_starHullZeroOut_monolemma — Per-(p, σ, S) zero-out inner-expression bound. For r₁ ≤ r₂, the inner expression of empiricalRademacherComplexity for the zero-out family at r₁ is dominated in absolute value by that at r₂. This is the precise ingredient the helper above consumes for localRademacherComplexity_mono_r.hypothesesι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝr₁ r₂ :ℝhr :r₁ ≤ r₂n :ℕS :Fin n → 𝒳σ :Signs np :conclusion|(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₁ p (S k)|≤ |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₂ p (S k)|Proof (Lean source)
lemma abs_inner_starHullZeroOut_mono (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) {r₁ r₂ : ℝ} (hr : r₁ ≤ r₂) {n : ℕ} (S : Fin n → 𝒳) (σ : Signs n) (p : starHullParam ι) : |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₁ p (S k)| ≤ |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₂ p (S k)| := by -- Three-way case split on `norm (starHullEval F p)` vs `r₁, r₂`. -- Cases (A) `≤ r₁` and (C) `> r₂`: both inner sums are equal pointwise -- (either both zero, or both `α • F i`). Case (B) `r₁ < · ≤ r₂`: LHS -- inner sum is `0` (every k is zeroed), so |LHS| = 0 ≤ |RHS|. by_cases h₁ : norm (starHullEval F p) ≤ r₁ · have h₂ : norm (starHullEval F p) ≤ r₂ := le_trans h₁ hr apply le_of_eq have hsum : ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₁ p (S k) = ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₂ p (S k) := by refine Finset.sum_congr rfl fun k _ => ?_ simp [starHullZeroOut, h₁, h₂] rw [hsum] · -- LHS evaluates to 0 since every coordinate is zeroed out have hlhs : (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₁ p (S k) = 0 := by have : ∀ k ∈ (Finset.univ : Finset (Fin n)), (σ k : ℝ) * starHullZeroOut F norm r₁ p (S k) = 0 := by intro k _ simp [starHullZeroOut, h₁] rw [Finset.sum_eq_zero this] ring rw [hlhs] simp only [abs_zero, Int.reduceNeg, abs_mul, abs_inv, Nat.abs_cast, ge_iff_le] positivity -
abs_starHullZeroOut_monolemma — Pointwise monotonicity of the zero-out family in the radius. For r₁ ≤ r₂, |starHullZeroOut F norm r₁ p x| ≤ |starHullZeroOut F norm r₂ p x| coordinatewise.hypothesesι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝr₁ r₂ :ℝh :r₁ ≤ r₂p :x :𝒳conclusion|starHullZeroOut F norm r₁ p x| ≤ |starHullZeroOut F norm r₂ p x|Proof (Lean source)
lemma abs_starHullZeroOut_mono (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) {r₁ r₂ : ℝ} (h : r₁ ≤ r₂) (p : starHullParam ι) (x : 𝒳) : |starHullZeroOut F norm r₁ p x| ≤ |starHullZeroOut F norm r₂ p x| := by unfold starHullZeroOut by_cases h₁ : norm (starHullEval F p) ≤ r₁ · -- both branches active and equal have h₂ : norm (starHullEval F p) ≤ r₂ := le_trans h₁ h simp [h₁, h₂] · -- LHS is 0 in absolute value; RHS is non-negative simp [h₁] -
abs_starHullZeroOut_le_starHullEvallemma — Pointwise dominance by the inclusion. The zero-out family is dominated coordinatewise (in absolute value) by the un-localised inclusion starHullEval F.hypothesesι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝr :ℝp :x :𝒳conclusion|starHullZeroOut F norm r p x| ≤ |starHullEval F p x|Proof (Lean source)
lemma abs_starHullZeroOut_le_starHullEval (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (r : ℝ) (p : starHullParam ι) (x : 𝒳) : |starHullZeroOut F norm r p x| ≤ |starHullEval F p x| := by unfold starHullZeroOut by_cases h : norm (starHullEval F p) ≤ r · simp [h] · simp [h] -
localRademacherComplexity_mono_rlemma — The localized Rademacher complexity is monotone in the radius.hypothesesΩ :sharedType u_1ι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝμ :Measure ΩX :Ω → 𝒳n :ℕr₁ r₂ :ℝh :r₁ ≤ r₂hbdd :∀ S : Fin n → 𝒳,∀ σ : Signs n,BddAbove (Set.range fun p : starHullParam ι => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₂ p (S k)|)hint :Integrable (fun ω : Fin n → Ω => empiricalRademacherComplexity n (starHullZeroOut F norm r₂) (X ∘ ω)) (Measure.pi (fun _ => μ))conclusionlocalRademacherComplexity F norm μ X n r₁ ≤ localRademacherComplexity F norm μ X n r₂Proof (Lean source)
lemma localRademacherComplexity_mono_r (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) (n : ℕ) {r₁ r₂ : ℝ} (h : r₁ ≤ r₂) (hbdd : ∀ S : Fin n → 𝒳, ∀ σ : Signs n, BddAbove (Set.range fun p : starHullParam ι => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r₂ p (S k)|)) (hint : Integrable (fun ω : Fin n → Ω => empiricalRademacherComplexity n (starHullZeroOut F norm r₂) (X ∘ ω)) (Measure.pi (fun _ => μ))) : localRademacherComplexity F norm μ X n r₁ ≤ localRademacherComplexity F norm μ X n r₂ := by unfold localRademacherComplexity rademacherComplexity apply MeasureTheory.integral_mono_of_nonneg · exact Filter.Eventually.of_forall fun ω => by unfold empiricalRademacherComplexity refine mul_nonneg ?_ ?_ · positivity · refine sum_nonneg ?_ intro σ _ refine Real.iSup_nonneg ?_ intro p exact abs_nonneg _ · exact hint · exact Filter.Eventually.of_forall fun ω => empiricalRademacherComplexity_mono_of_inner (starHullZeroOut F norm r₁) (starHullZeroOut F norm r₂) (X ∘ ω) (fun σ => hbdd (X ∘ ω) σ) (fun σ p => abs_inner_starHullZeroOut_mono F norm h (X ∘ ω) σ p) -
localRademacherComplexity_le_upperBoundlemma — Upper-bound consumption. A RademacherUpperBound ψ directly bounds the localized Rademacher complexity by ψ r for every r ≥ 0 — by definition, since RademacherUpperBound is stated in terms of starHullZeroOut, the same integrand defining localRademacherComplexity.hypothesesΩ :sharedType u_1ι :sharedType u_2𝒳 :sharedType u_3ι → 𝒳 → ℝ(𝒳 → ℝ) → ℝμ :Measure ΩX :Ω → 𝒳n :ℕψ :ℝ → ℝhub :RademacherUpperBound F norm μ X n ψr :ℝhr :0 ≤ rconclusionlocalRademacherComplexity F norm μ X n r ≤ ψ rProof (Lean source)
lemma localRademacherComplexity_le_upperBound {F : ι → 𝒳 → ℝ} {norm : (𝒳 → ℝ) → ℝ} {μ : Measure Ω} {X : Ω → 𝒳} {n : ℕ} {ψ : ℝ → ℝ} (hub : RademacherUpperBound F norm μ X n ψ) {r : ℝ} (hr : 0 ≤ r) : localRademacherComplexity F norm μ X n r ≤ ψ r := by unfold localRademacherComplexity exact hub r hr -
rademacherComplexity_zeroOut_le_starHullZeroOutlemma — Bridge lemma: ι-indexed zero-out class ≤ starHullParam ι-indexed zero-out class.hypothesesΩ :sharedType u_1ι :sharedType u_2𝒳 :sharedType u_3F :ι → 𝒳 → ℝnorm :(𝒳 → ℝ) → ℝμ :Measure ΩX :Ω → 𝒳n :ℕr :ℝhbdd :∀ S : Fin n → 𝒳,∀ σ : Signs n,BddAbove (Set.range fun p : starHullParam ι => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r p (S k)|)hint :Integrable (fun ω : Fin n → Ω => empiricalRademacherComplexity n (starHullZeroOut F norm r) (X ∘ ω)) (Measure.pi (fun _ => μ))conclusionrademacherComplexity n (fun i ω => if norm (F i) ≤ r then F i (X ω) else 0) μ id≤ rademacherComplexity n (starHullZeroOut F norm r) μ XProof (Lean source)
lemma rademacherComplexity_zeroOut_le_starHullZeroOut (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) (n : ℕ) {r : ℝ} (hbdd : ∀ S : Fin n → 𝒳, ∀ σ : Signs n, BddAbove (Set.range fun p : starHullParam ι => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r p (S k)|)) (hint : Integrable (fun ω : Fin n → Ω => empiricalRademacherComplexity n (starHullZeroOut F norm r) (X ∘ ω)) (Measure.pi (fun _ => μ))) : rademacherComplexity n (fun i ω => if norm (F i) ≤ r then F i (X ω) else 0) μ id ≤ rademacherComplexity n (starHullZeroOut F norm r) μ X := by -- The LHS integrand is `empiricalRademacherComplexity n f (id ∘ ω)` where -- `f i x = if norm (F i) ≤ r then F i x else 0`. For any sample path -- `S = X ∘ ω`, the function `f i (S k) = starHullZeroOut F norm r (⟨1, _⟩, i) (S k)`, -- so the sup over `i : ι` is dominated by the sup over `p : starHullParam ι`. -- The integral inequality then follows from pointwise dominance plus integrability. unfold rademacherComplexity apply MeasureTheory.integral_mono_of_nonneg · exact Filter.Eventually.of_forall fun ω => by unfold empiricalRademacherComplexity refine mul_nonneg ?_ ?_ · positivity · refine sum_nonneg ?_ intro σ _ refine Real.iSup_nonneg ?_ intro i exact abs_nonneg _ · exact hint · exact Filter.Eventually.of_forall fun ω => by unfold empiricalRademacherComplexity refine mul_le_mul_of_nonneg_left ?_ (by positivity) refine Finset.sum_le_sum ?_ intro σ _ refine Real.iSup_le ?_ ?_ · intro i let p : starHullParam ι := (⟨(1 : ℝ), by simp [Set.mem_Icc]⟩, i) have hsum : ∑ k : Fin n, (σ k : ℝ) * (if norm (F i) ≤ r then F i (X ((id ∘ ω) k)) else 0) = ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r p ((X ∘ ω) k) := by refine Finset.sum_congr rfl ?_ intro k _ have hp : starHullZeroOut F norm r p ((X ∘ ω) k) = if norm (F i) ≤ r then F i (X ((id ∘ ω) k)) else 0 := by unfold starHullZeroOut rw [starHullEval_one] rfl rw [hp] rw [hsum] exact le_ciSup (hbdd (X ∘ ω) σ) p · refine Real.iSup_nonneg ?_ intro i exact abs_nonneg _
Rademacher 1 core · 4 supporting Re-exports FoML Rademacher-complexity primitives and adds congruence lemmas for empirical and population complexities. ★ rademacherComplexity_congr_ae
Re-exports FoML Rademacher-complexity primitives and adds congruence lemmas for empirical and population complexities.
The FoML symbols (Signs, empiricalRademacherComplexity,
rademacherComplexity, empiricalRademacherComplexity_without_abs,
uniformDeviation, uniformDeviation_measurable) live in the root
namespace and are imported transitively above. We declare the namespace
Causalean.Stat.Concentration so that downstream `open
Causalean.Stat.Concentration` continues to elaborate, but we do not
re-export the FoML names — root-namespace symbols are already in scope
unqualified, and declaring abbrev aliases here would trigger
ambiguous-term errors when both forms are visible.
We also collect a few generic congruence facts for empirical and population
Rademacher complexity (invariance under sample-pointwise / almost-everywhere
agreement of the function family). The public lemmas are
empiricalRademacherComplexity_congr_sample,
rademacherComplexity_congr_ae, and rademacherComplexity_congr_ae_all,
which let callers replace a function class by an equal-on-samples or
almost-everywhere equal representative without changing the corresponding
Rademacher complexity.
The population Rademacher complexity is unchanged when each member of the function family is replaced by an almost-everywhere-equal version: if for every index i, f i ∘ sample equals f' i ∘ sample almost everywhere with respect to μ, then the two families f and f' have equal Rademacher complexity.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
empiricalRademacherComplexity_eqlemma — The empirical Rademacher complexity of a function family on a fixed sample is the average, over all sign vectors of the sample length, of the largest absolute sign-weighted sample average attained across the family.hypothesesProof (Lean source)
@[causal_defs_simps] lemma empiricalRademacherComplexity_eq {𝒳 ι : Type*} (n : ℕ) (f : ι → 𝒳 → ℝ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n f S = (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, ⨆ i, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * f i (S k)| := rfl -
rademacherComplexity_eqlemma — The population Rademacher complexity of a function family is the mean, over samples of independent draws, of the empirical Rademacher complexity of that family on the drawn sample.hypothesesProof (Lean source)
@[causal_defs_simps] lemma rademacherComplexity_eq {Ω 𝒳 ι : Type*} [MeasurableSpace Ω] (n : ℕ) (f : ι → 𝒳 → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) : rademacherComplexity n f μ X = ∫ ω : Fin n → Ω, empiricalRademacherComplexity n f (X ∘ ω) ∂(pi fun _ => μ) := rfl -
empiricalRademacherComplexity_congr_samplelemma — The empirical Rademacher complexity sees the function family only through its values on the observed sample: two families that agree at every sample point have equal empirical Rademacher complexity.hypothesesconclusionempiricalRademacherComplexity n f sample = empiricalRademacherComplexity n f' sampleProof (Lean source)
lemma empiricalRademacherComplexity_congr_sample {𝒳 ι : Type*} (n : ℕ) (f f' : ι → 𝒳 → ℝ) (sample : Fin n → 𝒳) (h : ∀ i k, f i (sample k) = f' i (sample k)) : empiricalRademacherComplexity n f sample = empiricalRademacherComplexity n f' sample := by simp only [causal_defs_simps] congr 1 apply Finset.sum_congr rfl intro σ _hσ congr 1 ext i congr 2 apply Finset.sum_congr rfl intro k _hk rw [h i k] -
rademacherComplexity_congr_ae_alllemma — The population Rademacher complexity is unchanged under an almost-everywhere agreement of the whole family at once: if almost every ω satisfies f i (sample ω) = f' i (sample ω) for all indices i simultaneously, the two families have equal Rademacher complexity.hypothesesΩ 𝒳 ι :Type*n :ℕf f' :ι → 𝒳 → ℝμ :sample :Ω → 𝒳h :∀ᵐ ω ∂μ, ∀ i : ι, f i (sample ω) = f' i (sample ω)conclusionrademacherComplexity n f μ sample = rademacherComplexity n f' μ sampleProof (Lean source)
lemma rademacherComplexity_congr_ae_all {Ω 𝒳 ι : Type*} [MeasurableSpace Ω] (n : ℕ) (f f' : ι → 𝒳 → ℝ) (μ : Measure Ω) [SigmaFinite μ] (sample : Ω → 𝒳) (h : ∀ᵐ ω ∂μ, ∀ i : ι, f i (sample ω) = f' i (sample ω)) : rademacherComplexity n f μ sample = rademacherComplexity n f' μ sample := by simp only [causal_defs_simps] apply integral_congr_ae have hprod : ∀ᵐ s : Fin n → Ω ∂Measure.pi (fun _ : Fin n => μ), ∀ i : ι, ∀ k : Fin n, f i (sample (s k)) = f' i (sample (s k)) := by filter_upwards [Filter.eventually_all.2 fun k : Fin n => Measure.tendsto_eval_ae_ae.eventually h] with s hs i k exact hs k i filter_upwards [hprod] with s hs exact empiricalRademacherComplexity_congr_sample n f f' (sample ∘ s) (fun i k => hs i k)