Stat.Concentration.Rademacher

Rademacher and local Rademacher complexity and the tools that bound them: symmetrization, the Ledoux–Talagrand contraction principle, and star-hull localization.

Star­Hull 5 core · 6 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.

def starHull reviewed
Causalean.Stat.Concentration

The star hull of a function family F : ι → 𝒳 → ℝ around the origin. Each element is an α-rescaling of some F i for α ∈ [0, 1].

Definition (Lean source)
def starHull {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) : Set (𝒳 → ℝ) := {f | ∃ (i : ι) (α : ℝ), 0 ≤ α ∧ α ≤ 1 ∧ f = α • F i}
Causalean.Stat.Concentration.starHull · Causalean/Stat/Concentration/Rademacher/StarHull.lean:42
lemma starHull_smul_mem reviewed
Causalean.Stat.Concentration

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
ι 𝒳 :
Type*
F :
ι → 𝒳 → ℝ
i :
ι
α :
h₀ :
0 ≤ α
h₁ :
α ≤ 1
(α • F i) ∈ starHull F
Proof (Lean source)
lemma starHull_smul_mem {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (i : ι) {α : ℝ} (h₀ : 0 ≤ α) (h₁ : α ≤ 1) : (α • F i) ∈ starHull F := by exact ⟨i, α, h₀, h₁, rfl⟩
Causalean.Stat.Concentration.starHull_smul_mem · Causalean/Stat/Concentration/Rademacher/StarHull.lean:69 · uses starHull
def starHullIndex reviewed
Causalean.Stat.Concentration

The star hull re-indexed as a Type (subtype carrier), suitable for the ι-parameter slot in empiricalRademacherComplexity, rademacherComplexity, etc.

Definition (Lean source)
noncomputable def starHullIndex {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) : Type _ := { f : 𝒳 → ℝ // f ∈ starHull F }
Causalean.Stat.Concentration.starHullIndex · Causalean/Stat/Concentration/Rademacher/StarHull.lean:76
def starHullParam reviewed
Causalean.Stat.Concentration

Star-hull parameter type. A pair (α, i) with α ∈ [0, 1] and i : ι parameterises the star-hull element α • F i. This is the preferred index for downstream Rademacher-complexity arguments: it carries the multiplicative parameter explicitly, and monotonicity in α reduces to a per-coordinate scalar inequality.

Definition (Lean source)
def starHullParam (ι : Type*) : Type _ := Icc (0 : ℝ) 1 × ι
Causalean.Stat.Concentration.starHullParam · Causalean/Stat/Concentration/Rademacher/StarHull.lean:89
def starHullEval reviewed
Causalean.Stat.Concentration

The star-hull element associated to a parameter (α, i): pointwise α · F i x. This is the "evaluation map" through which all star-hull arguments factor in the new starHullParam substrate.

Definition (Lean source)
def starHullEval {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) : starHullParam ι → 𝒳 → ℝ := fun p x => p.1.val * F p.2 x
Causalean.Stat.Concentration.starHullEval · Causalean/Stat/Concentration/Rademacher/StarHull.lean:97 · uses starHullParam
6 supporting declarations (lemmas, instances)
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.

def LipschitzAt0 reviewed
Causalean.Stat.Concentration

A real-valued function φ is "Lipschitz at 0" with constant L if φ 0 = 0 and |φ x - φ y| ≤ L |x - y| for all x, y. The "at 0" pin-down is used by the absolute-value contraction theorem; the signed theorem needs only the global Lipschitz inequality.

Definition (Lean source)
def LipschitzAt0 (φ : ℝ → ℝ) (L : ℝ) : Prop := φ 0 = 0 ∧ ∀ x y, |φ x - φ y| ≤ L * |x - y|
Causalean.Stat.Concentration.LipschitzAt0 · Causalean/Stat/Concentration/Rademacher/Contraction.lean:56
theorem rademacher_contraction reviewed
Causalean.Stat.Concentration

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
Nonempty ι
Finite ι
φ :
ℝ → ℝ
L :
hL :
0 ≤ L
hLip :
∀ x y, |φ x - φ y| ≤ L * |x - y|
F :
ι → 𝒳 → ℝ
n :
S :
Fin n → 𝒳
empiricalRademacherComplexity_without_abs n (fun i x => φ (F i x)) S
≤ L * empiricalRademacherComplexity_without_abs n F S
Proof (Lean source)
theorem rademacher_contraction [Nonempty ι] [Finite ι] (φ : ℝ → ℝ) {L : ℝ} (hL : 0 ≤ L) (hLip : ∀ x y, |φ x - φ y| ≤ L * |x - y|) (F : ι → 𝒳 → ℝ) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity_without_abs n (fun i x => φ (F i x)) S ≤ L * empiricalRademacherComplexity_without_abs n F S := by classical letI := ofFinite ι exact rademacher_contraction_core φ hL hLip F n S
Causalean.Stat.Concentration.rademacher_contraction · Causalean/Stat/Concentration/Rademacher/Contraction.lean:501
theorem rademacher_contraction_abs reviewed
Causalean.Stat.Concentration

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
Nonempty ι
Finite ι
φ :
ℝ → ℝ
L :
:
F :
ι → 𝒳 → ℝ
n :
S :
Fin n → 𝒳
empiricalRademacherComplexity n (fun i x => φ (F i x)) S
≤ 2 * L * empiricalRademacherComplexity n F S
Proof (Lean source)
theorem rademacher_contraction_abs [Nonempty ι] [Finite ι] (φ : ℝ → ℝ) {L : ℝ} (hφ : LipschitzAt0 φ L) (F : ι → 𝒳 → ℝ) (n : ℕ) (S : Fin n → 𝒳) : empiricalRademacherComplexity n (fun i x => φ (F i x)) S ≤ 2 * L * empiricalRademacherComplexity n F S := by classical letI := Fintype.ofFinite ι have hL : 0 ≤ L := by have h := hφ.2 0 1 norm_num [hφ.1] at h exact (abs_nonneg _).trans h let F0 : Option ι → 𝒳 → ℝ := withZero F let G0 : Option ι → 𝒳 → ℝ := fun i x => φ (F0 i x) have hG0_zero : ∀ x, G0 none x = 0 := by intro x simp [G0, F0, withZero, hφ.1] have hG0_eq : G0 = withZero (fun i x => φ (F i x)) := by funext o x cases o with | none => simp [G0, F0, withZero, hφ.1] | some i => simp [G0, F0, withZero] have h_abs_split : empiricalRademacherComplexity n G0 S ≤ empiricalRademacherComplexity_without_abs n G0 S + empiricalRademacherComplexity_without_abs n (fun i x => -G0 i x) S := empirical_abs_withZero_le_no_abs_plus_neg G0 hG0_zero n S have h_contraction_pos : empiricalRademacherComplexity_without_abs n G0 S ≤ L * empiricalRademacherComplexity_without_abs n F0 S := by simpa [G0] using rademacher_contraction_core φ hL hφ.2 F0 n S have h_contraction_neg : empiricalRademacherComplexity_without_abs n (fun i x => -G0 i x) S ≤ L * empiricalRademacherComplexity_without_abs n F0 S := by simpa [G0] using rademacher_contraction_core (fun x => -φ x) hL (lipschitzAt0_neg φ hφ).2 F0 n S have hF0_le : empiricalRademacherComplexity_without_abs n F0 S ≤ empiricalRademacherComplexity n F S := by simpa [F0] using empirical_without_abs_withZero_le_abs F n S calc empiricalRademacherComplexity n (fun i x => φ (F i x)) S = empiricalRademacherComplexity n (withZero (fun i x => φ (F i x))) S := by exact (empirical_abs_withZero_eq (fun i x => φ (F i x)) n S).symm _ = empiricalRademacherComplexity n G0 S := by rw [hG0_eq] _ ≤ empiricalRademacherComplexity_without_abs n G0 S + empiricalRademacherComplexity_without_abs n (fun i x => -G0 i x) S := h_abs_split _ ≤ L * empiricalRademacherComplexity_without_abs n F0 S + L * empiricalRademacherComplexity_without_abs n F0 S := add_le_add h_contraction_pos h_contraction_neg _ = 2 * L * empiricalRademacherComplexity_without_abs n F0 S := by ring _ ≤ 2 * L * empiricalRademacherComplexity n F S := by exact mul_le_mul_of_nonneg_left hF0_le (by nlinarith)
Causalean.Stat.Concentration.rademacher_contraction_abs · Causalean/Stat/Concentration/Rademacher/Contraction.lean:664 · uses LipschitzAt0
11 supporting declarations (lemmas, instances)
  • finite_iSup_eq_value lemma — A real-valued function on a nonempty finite population attains a largest value, and its supremum is that value.
    α :
    Type*
    Nonempty α
    Finite α
    f :
    α → ℝ
    ∃ a : α, (⨆ x, f x) = f a ∧ ∀ x, f x ≤ f a
    Proof (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)
    Causalean.Stat.Concentration.finite_iSup_eq_value · Causalean/Stat/Concentration/Rademacher/Contraction.lean:103
  • sup_pair_lipschitz_scaled lemma — 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.
    ι :
    Type*
    Nonempty ι
    Finite ι
    φ :
    ℝ → ℝ
    L c :
    hc :
    0 ≤ c
    :
    ∀ 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))
    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
    Causalean.Stat.Concentration.sup_pair_lipschitz_scaled · Causalean/Stat/Concentration/Rademacher/Contraction.lean:112
  • empiricalRademacherComplexity_without_abs_smul_class theorem — Without-abs analogue of empiricalRademacherComplexity_smul_class: the signed scaling carries c, not |c|.
    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
    Proof (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
    Causalean.Stat.Concentration.empiricalRademacherComplexity_without_abs_smul_class · Causalean/Stat/Concentration/Rademacher/Contraction.lean:438
  • lipschitzAt0_neg lemma — Negating a function that fixes zero preserves the same Lipschitz constant.
    φ :
    ℝ → ℝ
    L :
    :
    LipschitzAt0 (fun x => -φ x) L
    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
    Causalean.Stat.Concentration.lipschitzAt0_neg · Causalean/Stat/Concentration/Rademacher/Contraction.lean:522
  • iSup_abs_le_iSup_add_iSup_neg_of_exists_zero lemma — 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.
    α :
    Type*
    Finite α
    x :
    α → ℝ
    h0 :
    ∃ a : α, x a = 0
    (⨆ 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
    Causalean.Stat.Concentration.iSup_abs_le_iSup_add_iSup_neg_of_exists_zero · Causalean/Stat/Concentration/Rademacher/Contraction.lean:531
  • empirical_abs_withZero_le_no_abs_plus_neg lemma — 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.
    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
    Proof (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
    Causalean.Stat.Concentration.empirical_abs_withZero_le_no_abs_plus_neg · Causalean/Stat/Concentration/Rademacher/Contraction.lean:617
  • empiricalRademacherComplexity_smul_class theorem — 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|.
    F :
    ι → 𝒳 → ℝ
    c :
    n :
    S :
    Fin n → 𝒳
    empiricalRademacherComplexity n (fun i x => c * F i x) S
    = |c| * empiricalRademacherComplexity n F S
    Proof (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
    Causalean.Stat.Concentration.empiricalRademacherComplexity_smul_class · Causalean/Stat/Concentration/Rademacher/Contraction.lean:729
  • absInner_le_of_bound lemma — A signed empirical average of a uniformly bounded function has absolute value no larger than the same uniform 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
    Proof (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
    Causalean.Stat.Concentration.absInner_le_of_bound · Causalean/Stat/Concentration/Rademacher/Contraction.lean:779
  • absInner_bddAbove lemma — Signed empirical averages of a uniformly bounded function class are bounded above by the common absolute bound.
    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)|))
    Proof (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
    Causalean.Stat.Concentration.absInner_bddAbove · Causalean/Stat/Concentration/Rademacher/Contraction.lean:803
  • empiricalRademacherComplexity_sub_le theorem — 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.
    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
    Proof (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)
    Causalean.Stat.Concentration.empiricalRademacherComplexity_sub_le · Causalean/Stat/Concentration/Rademacher/Contraction.lean:814
  • empiricalRademacherComplexity_contraction_abs_of_bddAbove theorem — 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.
    Nonempty ι
    φ :
    ℝ → ℝ
    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
    Proof (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)]
    Causalean.Stat.Concentration.empiricalRademacherComplexity_contraction_abs_of_bddAbove · Causalean/Stat/Concentration/Rademacher/Contraction.lean:842
Local­Rademacher 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.

def localRademacherComplexity reviewed
Causalean.Stat.Concentration

The localized Rademacher complexity of a function family F, evaluated at radius r and norm norm. Defined via the zero-out re-indexing: each parameter (α, i) : starHullParam ι contributes α • F i if norm (α • F i) ≤ r, and the constant 0 otherwise.

Definition (Lean source)
noncomputable def localRademacherComplexity (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) (n : ℕ) (r : ℝ) : ℝ := rademacherComplexity n (starHullZeroOut F norm r) μ X
Causalean.Stat.Concentration.localRademacherComplexity · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:88
theorem localRademacher_le_critical_radius reviewed
Causalean.Stat.Concentration

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
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
μ :
X :
Ω → 𝒳
n :
ψ :
ℝ → ℝ
:
hub :
RademacherUpperBound F norm μ X n ψ
r :
hr :
hcrit_pos :
hcrit_fp :
ψ (criticalRadius ψ) ≤ criticalRadius ψ ^ 2
localRademacherComplexity F norm μ X n r ≤ r * criticalRadius ψ
Proof (Lean source)
theorem localRademacher_le_critical_radius {F : ι → 𝒳 → ℝ} {norm : (𝒳 → ℝ) → ℝ} {μ : Measure Ω} {X : Ω → 𝒳} {n : ℕ} {ψ : ℝ → ℝ} (hψ : SubRoot ψ) (hub : RademacherUpperBound F norm μ X n ψ) {r : ℝ} (hr : criticalRadius ψ ≤ r) (hcrit_pos : 0 < criticalRadius ψ) (hcrit_fp : ψ (criticalRadius ψ) ≤ criticalRadius ψ ^ 2) : localRademacherComplexity F norm μ X n r ≤ r * criticalRadius ψ := by have h_r_nn : 0 ≤ r := le_trans (criticalRadius_nonneg ψ) hr have h₁ : localRademacherComplexity F norm μ X n r ≤ ψ r := localRademacherComplexity_le_upperBound hub h_r_nn have h₂ : ψ r ≤ r * criticalRadius ψ := subRoot_homogeneity hψ hcrit_pos hr hcrit_fp exact le_trans h₁ h₂
8 supporting declarations (lemmas, instances)
  • localRademacherComplexity_nonneg lemma — The localized Rademacher complexity is non-negative.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    μ :
    X :
    Ω → 𝒳
    n :
    r :
    0 ≤ localRademacherComplexity F norm μ X n r
    Proof (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 _
    Causalean.Stat.Concentration.localRademacherComplexity_nonneg · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:97
  • empiricalRademacherComplexity_mono_of_inner lemma — Per-σ, per-i inner-expression bound implies empirical Rademacher comparison.
    ι' :
    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
    Proof (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 _
    Causalean.Stat.Concentration.empiricalRademacherComplexity_mono_of_inner · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:133
  • abs_inner_starHullZeroOut_mono lemma — 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.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    r₁ r₂ :
    hr :
    r₁ ≤ r₂
    n :
    S :
    Fin n → 𝒳
    σ :
    Signs n
    p :
    |(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
    Causalean.Stat.Concentration.abs_inner_starHullZeroOut_mono · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:161
  • abs_starHullZeroOut_mono lemma — 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.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    r₁ r₂ :
    h :
    r₁ ≤ r₂
    p :
    x :
    𝒳
    |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₁]
    Causalean.Stat.Concentration.abs_starHullZeroOut_mono · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:201
  • abs_starHullZeroOut_le_starHullEval lemma — Pointwise dominance by the inclusion. The zero-out family is dominated coordinatewise (in absolute value) by the un-localised inclusion starHullEval F.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    r :
    p :
    x :
    𝒳
    |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]
    Causalean.Stat.Concentration.abs_starHullZeroOut_le_starHullEval · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:216
  • localRademacherComplexity_mono_r lemma — The localized Rademacher complexity is monotone in the radius.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    μ :
    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₂
    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)
    Causalean.Stat.Concentration.localRademacherComplexity_mono_r · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:228
  • localRademacherComplexity_le_upperBound lemma — 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.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    μ :
    X :
    Ω → 𝒳
    n :
    ψ :
    ℝ → ℝ
    hub :
    RademacherUpperBound F norm μ X n ψ
    r :
    hr :
    0 ≤ r
    localRademacherComplexity F norm μ X n r ≤ ψ r
    Proof (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
    Causalean.Stat.Concentration.localRademacherComplexity_le_upperBound · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:267
  • rademacherComplexity_zeroOut_le_starHullZeroOut lemma — Bridge lemma: ι-indexed zero-out class ≤ starHullParam ι-indexed zero-out class.
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    μ :
    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
    Proof (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 _
    Causalean.Stat.Concentration.rademacherComplexity_zeroOut_le_starHullZeroOut · Causalean/Stat/Concentration/Rademacher/LocalRademacher.lean:313
Rademacher 1 core · 2 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.

lemma rademacherComplexity_congr_ae reviewed
Causalean.Stat.Concentration

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
Ω 𝒳 ι :
Type*
Countable ι
n :
f f' :
ι → 𝒳 → ℝ
μ :
sample :
Ω → 𝒳
h :
∀ i, (fun ω => f i (sample ω)) =ᵐ[μ] fun ω => f' i (sample ω)
rademacherComplexity n f μ sample = rademacherComplexity n f' μ sample
Proof (Lean source)
lemma rademacherComplexity_congr_ae {Ω 𝒳 ι : Type*} [MeasurableSpace Ω] [Countable ι] (n : ℕ) (f f' : ι → 𝒳 → ℝ) (μ : Measure Ω) [SigmaFinite μ] (sample : Ω → 𝒳) (h : ∀ i, (fun ω => f i (sample ω)) =ᵐ[μ] fun ω => f' i (sample ω)) : rademacherComplexity n f μ sample = rademacherComplexity n f' μ sample := by dsimp [rademacherComplexity] apply integral_congr_ae have hall : ∀ᵐ ω ∂μ, ∀ i : ι, f i (sample ω) = f' i (sample ω) := ae_all_iff.2 h 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 hall] 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)
Causalean.Stat.Concentration.rademacherComplexity_congr_ae · Causalean/Stat/Concentration/Rademacher/Rademacher.lean:70
2 supporting declarations (lemmas, instances)
  • empiricalRademacherComplexity_congr_sample lemma — 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.
    𝒳 ι :
    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
    Proof (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 dsimp [empiricalRademacherComplexity] 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]
    Causalean.Stat.Concentration.empiricalRademacherComplexity_congr_sample · Causalean/Stat/Concentration/Rademacher/Rademacher.lean:51
  • rademacherComplexity_congr_ae_all lemma — 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.
    Ω 𝒳 ι :
    n :
    f f' :
    ι → 𝒳 → ℝ
    μ :
    sample :
    Ω → 𝒳
    h :
    ∀ᵐ ω ∂μ, ∀ i : ι, f i (sample ω) = f' i (sample ω)
    rademacherComplexity n f μ sample = rademacherComplexity n f' μ sample
    Proof (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 dsimp [rademacherComplexity] 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)
    Causalean.Stat.Concentration.rademacherComplexity_congr_ae_all · Causalean/Stat/Concentration/Rademacher/Rademacher.lean:98