Stat.Concentration.Covering.VCLocalized­Regime

Localized Rademacher envelopes for function classes of finite VC dimension: each function in the class is determined on any sample by a Boolean labelling whose patterns have VC dimension at most d (BinaryFactoredVCClass)

Defs 5 core · 4 supporting This file defines the binary factored VC-class certificate and a two-field samplewise localization certificate. ★ samplewiseLocalizedVCDudleyHypotheses_of_empiricalRadius

Samplewise finite-VC localization data

This file defines the binary factored VC-class certificate and a two-field samplewise localization certificate. The finite-pattern bounds use its empirical-radius field; its total-boundedness field is retained in the public structure but is not used by that branch. The file also defines the finite-VC slope and its linear envelope.

structure BinaryFactoredVCClass reviewed
Causalean.Stat.Concentration

A binary factorization of a real-valued function class through a Boolean labeling π, such that on every finite sample each function's values factor through the Boolean labels, and whose realized Boolean patterns have VC dimension at most d on every finite sample.

Definition (Lean source)
ι :
Type u
shared
𝒳 :
Type v
shared
F :
ι → 𝒳 → ℝ
d :
ℕ
The Boolean class through which `F` factors on samples.
π :
ι → 𝒳 → Bool
Samplewise factorization through the Boolean labels.
factor :
∀ {n : ℕ} (S : Fin n → 𝒳), ∃ φ : Fin n → Bool → ℝ, ∀ i j, F i (S j) = φ j (π i (S j))
Uniform VC dimension bound for the realized growth family.
vcDim_le :
∀ {n : ℕ} (S : Fin n → 𝒳), (growthFamily π S).vcDim ≤ d
Causalean.Stat.Concentration.BinaryFactoredVCClass · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:35
structure SamplewiseLocalizedVCDudleyHypotheses reviewed
Causalean.Stat.Concentration

The samplewise localization certificate records an empirical L² radius bound for every localized star-hull member on every deterministic sample and total boundedness of each empirical class.

Definition (Lean source)
ι :
Type u
shared
𝒳 :
Type v
shared
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
empirical_radius :
∀ {n : ℕ} (S : Fin n → 𝒳) {r : ℝ}
if
0 ≤ r
then
∀ p : starHullParam ι, empiricalNorm S (starHullZeroOut F norm r p) ≤ r
totallyBounded :
∀ {n : ℕ} (S : Fin n → 𝒳) {r : ℝ}
if
0 < r
Causalean.Stat.Concentration.SamplewiseLocalizedVCDudleyHypotheses · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:49
theorem samplewiseLocalizedVCDudleyHypotheses_of_empiricalRadius reviewed
Causalean.Stat.Concentration

For a function class on an observation space, a localization norm, and a common envelope, if every function is pointwise bounded by the envelope and every localized zeroed star-hull function has empirical radius at most its localization radius on every sample, then the class has the samplewise localization certificate.

Formal statement
ι :
Type u
shared
𝒳 :
Type v
ι → 𝒳 → ℝ
(𝒳 → ℝ) → ℝ
shared
B :
ℝ
hbound :
∀ i x, |F i x| ≤ B
empirical_radius :
∀ {n : ℕ} (S : Fin n → 𝒳) {r : ℝ}
if
0 ≤ r
then
∀ p : starHullParam ι, empiricalNorm S (starHullZeroOut F norm r p) ≤ r
Proof (Lean source)
theorem samplewiseLocalizedVCDudleyHypotheses_of_empiricalRadius {F : ι → 𝒳 → ℝ} {norm : (𝒳 → ℝ) → ℝ} {B : ℝ} (hbound : ∀ i x, |F i x| ≤ B) (empirical_radius : ∀ {n : ℕ} (S : Fin n → 𝒳) {r : ℝ}, 0 ≤ r → ∀ p : starHullParam ι, empiricalNorm S (starHullZeroOut F norm r p) ≤ r) : SamplewiseLocalizedVCDudleyHypotheses F norm where empirical_radius := empirical_radius totallyBounded := fun {_} S {_} _ => starHullZeroOut_totallyBounded_of_bounded hbound S
def vcLocalizedSlope reviewed
Causalean.Stat.Concentration

Given a tuning constant, a VC-dimension bound, and a sample size, the finite-VC localized slope is 6(Kdlog⁡(n+1)+1)/n6\sqrt{(K d\log(n+1)+1)/n}.

Definition (Lean source)
K :
ℝ
d n :
ℕ
vcLocalizedSlope K d n :
ℝ
6 * sqrt ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ))
Causalean.Stat.Concentration.vcLocalizedSlope · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:261
def vcLocalizedPsi reviewed
Causalean.Stat.Concentration

Given a tuning constant, a VC-dimension bound, and a sample size, the finite-VC localized envelope maps every radius rr to the finite-VC localized slope times rr.

Definition (Lean source)
K :
ℝ
d n :
ℕ
vcLocalizedPsi K d n :
ℝ → ℝ
fun r => vcLocalizedSlope K d n * r
4 supporting declarations (lemmas, instances)
  • abs_starHullZeroOut_le_of_bound lemma — If every function in a class is pointwise bounded in absolute value by a common constant, then every zeroed localized star-hull function has the same bound at every point.
    ι :
    Type u
    shared
    𝒳 :
    Type v
    ι → 𝒳 → ℝ
    (𝒳 → ℝ) → ℝ
    shared
    B r :
    ℝ
    hbound :
    ∀ i x, |F i x| ≤ B
    p :
    x :
    𝒳
    |starHullZeroOut F norm r p x| ≤ B
    Proof (Lean source)
    lemma abs_starHullZeroOut_le_of_bound {F : ι → 𝒳 → ℝ} {norm : (𝒳 → ℝ) → ℝ} {B r : ℝ} (hbound : ∀ i x, |F i x| ≤ B) (p : starHullParam ι) (x : 𝒳) : |starHullZeroOut F norm r p x| ≤ B := by rcases p with ⟨a, i⟩ by_cases hactive : norm (starHullEval F (a, i)) ≤ r · calc |starHullZeroOut F norm r (a, i) x| = |(a : ℝ) * F i x| := by simp [starHullZeroOut, hactive, starHullEval] _ = (a : ℝ) * |F i x| := by rw [abs_mul, abs_of_nonneg a.property.1] _ ≤ 1 * |F i x| := mul_le_mul_of_nonneg_right a.property.2 (abs_nonneg _) _ ≤ B := by simpa using hbound i x · have hB : 0 ≤ B := (abs_nonneg (F i x)).trans (hbound i x) simpa [starHullZeroOut, hactive] using hB
    Causalean.Stat.Concentration.abs_starHullZeroOut_le_of_bound · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:80
  • empiricalNorm_le_of_forall_abs_le lemma — A function whose absolute value is bounded at every point of a finite sample has empirical root-mean-square norm no larger than that bound.
    𝒳 :
    Type v
    shared
    n :
    ℕ
    S :
    Fin n → 𝒳
    f :
    𝒳 → ℝ
    η :
    ℝ
    hη :
    0 ≤ η
    hf :
    ∀ j : Fin n, |f (S j)| ≤ η
    empiricalNorm S f ≤ η
    Proof (Lean source)
    lemma empiricalNorm_le_of_forall_abs_le {n : ℕ} (S : Fin n → 𝒳) {f : 𝒳 → ℝ} {η : ℝ} (hη : 0 ≤ η) (hf : ∀ j : Fin n, |f (S j)| ≤ η) : empiricalNorm S f ≤ η := by classical by_cases hn : n = 0 · simp [empiricalNorm, hn, hη] · have hnpos : 0 < n := Nat.pos_of_ne_zero hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos have hsum : (∑ j : Fin n, (f (S j)) ^ 2) ≤ ∑ _j : Fin n, η ^ 2 := by refine Finset.sum_le_sum ?_ intro j _ calc (f (S j)) ^ 2 = |f (S j)| ^ 2 := by rw [sq_abs] _ ≤ η ^ 2 := sq_le_sq.mpr (by simpa [abs_of_nonneg hη] using hf j) have harg : (1 / (n : ℝ)) * ∑ j : Fin n, (f (S j)) ^ 2 ≤ η ^ 2 := by calc (1 / (n : ℝ)) * ∑ j : Fin n, (f (S j)) ^ 2 ≤ (1 / (n : ℝ)) * ∑ _j : Fin n, η ^ 2 := mul_le_mul_of_nonneg_left hsum (by positivity) _ = (1 / (n : ℝ)) * ((n : ℝ) * η ^ 2) := by simp _ = η ^ 2 := by field_simp [Finset.card_fin, hnR.ne'] calc empiricalNorm S f = sqrt ((1 / (n : ℝ)) * ∑ j : Fin n, (f (S j)) ^ 2) := rfl _ ≤ sqrt (η ^ 2) := Real.sqrt_le_sqrt harg _ = η := by rw [Real.sqrt_sq_eq_abs, abs_of_nonneg hη]
    Causalean.Stat.Concentration.empiricalNorm_le_of_forall_abs_le · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:100
  • empiricalFunctionSpace_dist_le_of_forall_abs_sub_le lemma — If two functions differ by at most a nonnegative amount at every observation in a finite sample, then their empirical distance is at most that amount.
    ι :
    Type u
    shared
    𝒳 :
    Type v
    starHullParam ι → 𝒳 → ℝ
    shared
    n :
    ℕ
    Fin n → 𝒳
    η :
    ℝ
    hη :
    0 ≤ η
    hcoord :
    ∀ j : Fin n, |G q.index (S j) - G q'.index (S j)| ≤ η
    dist q q' ≤ η
    Proof (Lean source)
    lemma empiricalFunctionSpace_dist_le_of_forall_abs_sub_le {G : starHullParam ι → 𝒳 → ℝ} {n : ℕ} {S : Fin n → 𝒳} (q q' : EmpiricalFunctionSpace G S) {η : ℝ} (hη : 0 ≤ η) (hcoord : ∀ j : Fin n, |G q.index (S j) - G q'.index (S j)| ≤ η) : dist q q' ≤ η := by have hnorm : empiricalNorm S ((q : 𝒳 → ℝ) - (q' : 𝒳 → ℝ)) ≤ η := empiricalNorm_le_of_forall_abs_le S hη (by intro j simpa [Pi.sub_apply] using hcoord j) simpa [instDistEmpiricalFunctionSpace, empiricalDist] using hnorm
    Causalean.Stat.Concentration.empiricalFunctionSpace_dist_le_of_forall_abs_sub_le · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:135
  • starHullZeroOut_totallyBounded_of_bounded lemma — A uniformly bounded function class has a totally bounded empirical image on every finite sample after taking its zeroed star hull.
    ι :
    Type u
    shared
    𝒳 :
    Type v
    ι → 𝒳 → ℝ
    (𝒳 → ℝ) → ℝ
    shared
    B :
    ℝ
    hbound :
    ∀ i x, |F i x| ≤ B
    n :
    ℕ
    S :
    Fin n → 𝒳
    r :
    ℝ
    Proof (Lean source)
    lemma starHullZeroOut_totallyBounded_of_bounded {F : ι → 𝒳 → ℝ} {norm : (𝒳 → ℝ) → ℝ} {B : ℝ} (hbound : ∀ i x, |F i x| ≤ B) {n : ℕ} (S : Fin n → 𝒳) {r : ℝ} : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace (starHullZeroOut F norm r) S)) := by classical let sampleVector : EmpiricalFunctionSpace (starHullZeroOut F norm r) S → Fin n → ℝ := fun q j => starHullZeroOut F norm r q.index (S j) have hcube : TotallyBounded (Icc (fun _ : Fin n => -B) (fun _ : Fin n => B) : Set (Fin n → ℝ)) := isCompact_Icc.totallyBounded refine Metric.totallyBounded_of_finite_discretization (s := (Set.univ : Set (EmpiricalFunctionSpace (starHullZeroOut F norm r) S))) ?_ intro ε hε let δ : ℝ := ε / 4 have hδ : 0 < δ := by positivity rcases Metric.finite_approx_of_totallyBounded hcube δ hδ with ⟨t, ht_subset, ht_finite, ht_cover⟩ have hmem_cube : ∀ q : (Set.univ : Set (EmpiricalFunctionSpace (starHullZeroOut F norm r) S)), sampleVector q.1 ∈ (Icc (fun _ : Fin n => -B) (fun _ : Fin n => B) : Set (Fin n → ℝ)) := by intro q constructor · intro j exact neg_le_of_abs_le (abs_starHullZeroOut_le_of_bound hbound q.1.index (S j)) · intro j exact le_of_abs_le (abs_starHullZeroOut_le_of_bound hbound q.1.index (S j)) have hnear : ∀ q : (Set.univ : Set (EmpiricalFunctionSpace (starHullZeroOut F norm r) S)), ∃ y : (t : Set (Fin n → ℝ)), dist (sampleVector q.1) y.1 < δ := by intro q have hq := ht_cover (hmem_cube q) simp only [Set.mem_iUnion, Metric.mem_ball] at hq rcases hq with ⟨y, hy_t, hy_dist⟩ exact ⟨⟨y, hy_t⟩, hy_dist⟩ let domain : Set (EmpiricalFunctionSpace (starHullZeroOut F norm r) S) := Set.univ let center0 : domain → (t : Set (Fin n → ℝ)) := fun q => choose (hnear q) let center : domain → ULift.{u} (t : Set (Fin n → ℝ)) := fun q => ULift.up (center0 q) haveI : Fintype (t : Set (Fin n → ℝ)) := ht_finite.fintype refine ⟨ULift.{u} (t : Set (Fin n → ℝ)), inferInstance, center, ?_⟩ intro q q' hcenter have hcenter0 : center0 q = center0 q' := by simpa [center] using congrArg ULift.down hcenter have hq_near : dist (sampleVector q.1) (center0 q).1 < δ := Classical.choose_spec (hnear q) have hq'_near : dist (sampleVector q'.1) (center0 q').1 < δ := Classical.choose_spec (hnear q') have hcoord : ∀ j : Fin n, |starHullZeroOut F norm r q.1.index (S j) - starHullZeroOut F norm r q'.1.index (S j)| ≤ ε / 2 := by intro j have hjq : dist (sampleVector q.1 j) ((center0 q).1 j) < δ := (dist_le_pi_dist (sampleVector q.1) (center0 q).1 j).trans_lt hq_near have hjq' : dist ((center0 q).1 j) (sampleVector q'.1 j) < δ := by rw [← hcenter0] at hq'_near simpa [dist_comm] using (dist_le_pi_dist (sampleVector q'.1) (center0 q).1 j).trans_lt hq'_near have hsum : dist (sampleVector q.1 j) (sampleVector q'.1 j) < ε / 2 := by calc dist (sampleVector q.1 j) (sampleVector q'.1 j) ≤ dist (sampleVector q.1 j) ((center0 q).1 j) + dist ((center0 q).1 j) (sampleVector q'.1 j) := dist_triangle _ _ _ _ < δ + δ := add_lt_add hjq hjq' _ = ε / 2 := by ring simpa [Real.dist_eq] using le_of_lt hsum have hdist_le : dist q.1 q'.1 ≤ ε / 2 := empiricalFunctionSpace_dist_le_of_forall_abs_sub_le q.1 q'.1 (by positivity) hcoord exact lt_of_le_of_lt hdist_le (by linarith)
    Causalean.Stat.Concentration.starHullZeroOut_totallyBounded_of_bounded · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Defs.lean:149
Affine­Envelope 2 core · 3 supporting With q = (d·log(n+1) + 1)/n, the envelope of a class of VC dimension at most d bounded by b, localized in L²(P), is the affine function ψ(r) = 2·√q·r + 16·b·q. ★ criticalRadius_vcPopulationLocalizedPsi_sq_le_rate

Affine envelopes for population-localized finite-VC classes

With q = (d·log(n+1) + 1)/n, the envelope of a class of VC dimension at most d bounded by b, localized in L²(P), is the affine function

ψ(r) = 2·√q·r + 16·b·q.

An affine function with nonnegative slope and intercept is a star-shaped envelope (nonnegative, nondecreasing, ψ(r)/r nonincreasing), and its critical radius r*, the infimum of r > 0 with ψ(r) ≤ r², satisfies r*² ≤ 8·(s² + a).

Remark (not proved in Lean): under population localization no envelope of the form s·r can hold. For the class of indicators of intervals under an atomless law, every radius r > 0 admits intervals of L²(P) norm below r that contain exactly one sample point, so the localized Rademacher complexity is at least of order 1/n however small r is.

Main definitions

  • vcPopulationLocalizedPsi — the affine envelope ψ.

Main results

  • affine_isStarShapedEnvelope, criticalRadius_affine_sq_le — affine envelopes.
  • criticalRadius_vcPopulationLocalizedPsi_sq_le_rate — r*² ≤ (32 + 128·b)·q.
def vcPopulationLocalizedPsi reviewed
Causalean.Stat.Concentration

The population-localized finite-VC envelope for uniform bound b, VC dimension d and sample size n is the affine function ψ(r) = 2·√q·r + 16·b·q of the radius r, where q = (d·log(n+1) + 1)/n.

Definition (Lean source)
b :
ℝ
d n :
ℕ
vcPopulationLocalizedPsi b d n :
ℝ → ℝ
fun r
=> 2 * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) * r
+ 16 * b * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
Causalean.Stat.Concentration.vcPopulationLocalizedPsi · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/AffineEnvelope.lean:43
theorem criticalRadius_vcPopulationLocalizedPsi_sq_le_rate reviewed
Causalean.Stat.Concentration

For a uniform bound b ≥ 0 and every VC dimension d and sample size n, the critical radius r* of the envelope ψ(r) = 2·√q·r + 16·b·q, the infimum of r > 0 with ψ(r) ≤ r², satisfies r*² ≤ (32 + 128·b)·q, where q = (d·log(n+1) + 1)/n.

Formal statement
b :
ℝ
hb :
0 ≤ b
d n :
ℕ
≤ (32 + 128 * b) * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
Proof (Lean source)
theorem criticalRadius_vcPopulationLocalizedPsi_sq_le_rate {b : ℝ} (hb : 0 ≤ b) (d n : ℕ) : criticalRadius (vcPopulationLocalizedPsi b d n) ^ 2 ≤ (32 + 128 * b) * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) := by let q : ℝ := ((d : ℝ) * log ((n : ℝ) + 1) + 1) / n have hq : 0 ≤ q := by simpa [q] using vcLocalizedRate_nonneg (K := 1) (d := d) (n := n) (by norm_num) have hle := criticalRadius_affine_sq_le (s := 2 * sqrt q) (a := 16 * b * q) (by positivity) (by positivity) change criticalRadius (fun r => 2 * sqrt q * r + 16 * b * q) ^ 2 ≤ (32 + 128 * b) * q calc _ ≤ 8 * ((2 * sqrt q) ^ 2 + 16 * b * q) := hle _ = (32 + 128 * b) * q := by rw [mul_pow, Real.sq_sqrt hq]; ring
Causalean.Stat.Concentration.criticalRadius_vcPopulationLocalizedPsi_sq_le_rate · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/AffineEnvelope.lean:101 · uses criticalRadius , vcPopulationLocalizedPsi
3 supporting declarations (lemmas, instances)
Rademacher­Bridge 5 core · 9 supporting This file converts binary trace-cardinality control into finite growth-family bounds and then into empirical Rademacher estimates for star-hull patterns. ★ starHullZeroOut_empirical_rademacher_le_patternClass

Boolean trace entropy and finite-class Rademacher bridges

This file converts binary trace-cardinality control into finite growth-family bounds and then into empirical Rademacher estimates for star-hull patterns. It owns the representative and coefficient constructions used by the later finite-pattern Massart bounds.

def BinaryTraceEntropyControl reviewed
Causalean.Stat.Concentration

Given a Boolean classifier family and a natural-number bound, binary trace-entropy control holds exactly when either every finite sample has trace-family VC dimension at most dd, or every sample of size mm has at most (m+1)d(m+1)^d realized label patterns.

Definition (Lean source)
ι :
Type u
shared
𝒳 :
Type v
shared
π :
ι → 𝒳 → Bool
d :
ℕ
BinaryTraceEntropyControl π d :
Prop
(∀ {m : ℕ} (S : Fin m → 𝒳), (growthFamily π S).vcDim ≤ d) ∨ (∀ (m : ℕ) (S : Fin m → 𝒳), (growthFamily π S).card ≤ (m + 1) ^ d)
Causalean.Stat.Concentration.BinaryTraceEntropyControl · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:29
def growthFamilyRep reviewed
Causalean.Stat.Concentration

Given a Boolean classifier family, a finite sample, and a realized label pattern on that sample, a representative classifier index is chosen whose labels realize that pattern.

Definition (Lean source)
ι 𝒳 :
Type*
n :
ℕ
π :
ι → 𝒳 → Bool
S :
Fin n → 𝒳
A :
{A // A ∈ growthFamily π S}
growthFamilyRep π S A :
ι
choose ((mem_growthFamily_iff (π := π) (S := S) (A := A.1)).mp A.2)
def starHullPatternCoeff reviewed
Causalean.Stat.Concentration

Given a real-valued function family, a localization norm, a Boolean factorization family, a finite sample, a localization radius, and a realized label pattern, the star-hull pattern coefficient is the supremum of the active zeroed-star-hull scale coefficients among functions realizing that pattern on the sample.

Definition (Lean source)
ι 𝒳 :
Type*
n :
ℕ
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
π :
ι → 𝒳 → Bool
S :
Fin n → 𝒳
r :
ℝ
A :
{A // A ∈ growthFamily π S}
starHullPatternCoeff F norm π S r A :
ℝ
⨆ i : {i : ι // restrictionPattern (π i) S = A.1}, starHullZeroOutScaleCoeff F norm r i.1
def starHullPatternClass reviewed
Causalean.Stat.Concentration

Given a real-valued function family, a localization norm, a Boolean factorization family, a finite sample, and a localization radius, the star-hull pattern class assigns to each realized label pattern the representative function for that pattern, multiplied by its star-hull pattern coefficient.

Definition (Lean source)
ι 𝒳 :
Type*
n :
ℕ
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
π :
ι → 𝒳 → Bool
S :
Fin n → 𝒳
r :
ℝ
starHullPatternClass F norm π S r :
{A // A ∈ growthFamily π S} → 𝒳 → ℝ
fun A x => starHullPatternCoeff F norm π S r A * F (growthFamilyRep π S A) x
lemma starHullZeroOut_empirical_rademacher_le_patternClass reviewed
Causalean.Stat.Concentration

For a nonempty function index set and observation space, a sample size, a real-valued function class, localization norm, and Boolean label class, if function values on every finite sample factor through those Boolean labels, then for a sample and localization radius, the empirical Rademacher complexity of the zeroed localized star hull is no greater than that of its finite sample-pattern class.

Formal statement
ι 𝒳 :
Type*
Nonempty ι
n :
ℕ
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
π :
ι → 𝒳 → Bool
hfactor :
∀ {m : ℕ} (S : Fin m → 𝒳), ∃ φ : Fin m → Bool → ℝ, ∀ i j, F i (S j) = φ j (π i (S j))
S :
Fin n → 𝒳
r :
ℝ
empiricalRademacherComplexity n (starHullZeroOut F norm r) S
≤ empiricalRademacherComplexity n (starHullPatternClass F norm π S r) S
Proof (Lean source)
lemma starHullZeroOut_empirical_rademacher_le_patternClass {ι 𝒳 : Type*} [Nonempty ι] {n : ℕ} (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (π : ι → 𝒳 → Bool) (hfactor : ∀ {m : ℕ} (S : Fin m → 𝒳), ∃ φ : Fin m → Bool → ℝ, ∀ i j, F i (S j) = φ j (π i (S j))) (S : Fin n → 𝒳) (r : ℝ) : empiricalRademacherComplexity n (starHullZeroOut F norm r) S ≤ empiricalRademacherComplexity n (starHullPatternClass F norm π S r) S := by classical rcases hfactor S with ⟨φ, hφ⟩ haveI : Nonempty {A // A ∈ growthFamily π S} := by let i0 : ι := Classical.arbitrary ι have hmem : restrictionPattern (π i0) S ∈ growthFamily π S := by rw [mem_growthFamily_iff] exact ⟨i0, rfl⟩ exact ⟨⟨restrictionPattern (π i0) S, hmem⟩⟩ unfold empiricalRademacherComplexity refine mul_le_mul_of_nonneg_left ?_ (by positivity) refine Finset.sum_le_sum ?_ intro σ _ refine ciSup_le ?_ intro p rcases p with ⟨a, i⟩ let A0 : Finset (Fin n) := restrictionPattern (π i) S have hA0 : A0 ∈ growthFamily π S := by rw [mem_growthFamily_iff] exact ⟨i, rfl⟩ let A : {A // A ∈ growthFamily π S} := ⟨A0, hA0⟩ have hiA : restrictionPattern (π i) S = A.1 := rfl let active : ℝ := if norm (starHullEval F (a, i)) ≤ r then (a : ℝ) else 0 let innerI : ℝ := (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F i (S k) let innerRep : ℝ := (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F (growthFamilyRep π S A) (S k) have hstar : |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r (a, i) (S k)| = active * |innerI| := by simpa [active, innerI] using starHullZeroOut_inner_term_eq F norm r S σ a i have hinner : innerI = innerRep := by simp [innerI, innerRep, sample_eq_growthFamilyRep_of_pattern (F := F) (π := π) (S := S) (φ := φ) hφ A hiA] have hactive_nonneg : 0 ≤ active := by dsimp [active] split_ifs · exact a.property.1 · norm_num have hscale_le : active ≤ starHullZeroOutScaleCoeff F norm r i := by simpa [active] using activeCoeff_le_starHullZeroOutScaleCoeff F norm r a i have hcoeff_le : starHullZeroOutScaleCoeff F norm r i ≤ starHullPatternCoeff F norm π S r A := starHullZeroOutScaleCoeff_le_patternCoeff F norm π S r A i hiA have hterm_le : active * |innerI| ≤ starHullPatternCoeff F norm π S r A * |innerRep| := by calc active * |innerI| ≤ starHullZeroOutScaleCoeff F norm r i * |innerI| := mul_le_mul_of_nonneg_right hscale_le (abs_nonneg _) _ ≤ starHullPatternCoeff F norm π S r A * |innerI| := mul_le_mul_of_nonneg_right hcoeff_le (abs_nonneg _) _ = starHullPatternCoeff F norm π S r A * |innerRep| := by rw [hinner] have hpattern : starHullPatternCoeff F norm π S r A * |innerRep| = |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k)| := by have hcoeff_nonneg := starHullPatternCoeff_nonneg F norm π S r A have hlin : (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k) = starHullPatternCoeff F norm π S r A * innerRep := by dsimp [starHullPatternClass, innerRep] calc (n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * (starHullPatternCoeff F norm π S r A * F (growthFamilyRep π S A) (S k)) = (n : ℝ)⁻¹ * (starHullPatternCoeff F norm π S r A * ∑ k : Fin n, (σ k : ℝ) * F (growthFamilyRep π S A) (S k)) := by congr 1 rw [Finset.mul_sum] refine Finset.sum_congr rfl ?_ intro k _ ring _ = starHullPatternCoeff F norm π S r A * ((n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * F (growthFamilyRep π S A) (S k)) := by ring symm calc |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k)| = |starHullPatternCoeff F norm π S r A * innerRep| := by rw [hlin] _ = starHullPatternCoeff F norm π S r A * |innerRep| := by rw [abs_mul, abs_of_nonneg hcoeff_nonneg] calc |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullZeroOut F norm r (a, i) (S k)| = active * |innerI| := hstar _ ≤ starHullPatternCoeff F norm π S r A * |innerRep| := hterm_le _ = |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k)| := hpattern _ ≤ ⨆ A : {A // A ∈ growthFamily π S}, |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k)| := by exact le_ciSup (Finite.bddAbove_range fun A : {A // A ∈ growthFamily π S} => |(n : ℝ)⁻¹ * ∑ k : Fin n, (σ k : ℝ) * starHullPatternClass F norm π S r A (S k)|) A
9 supporting declarations (lemmas, instances)
  • growthFamily_card_le_succ_pow_of_trace lemma — A Boolean class whose trace family has bounded VC dimension, or a direct trace-size bound, realizes no more patterns on a finite sample than a polynomial of degree d in one plus the sample size.
    ι :
    Type u
    shared
    𝒳 :
    Type v
    shared
    π :
    ι → 𝒳 → Bool
    d n :
    ℕ
    S :
    Fin n → 𝒳
    (growthFamily π S).card ≤ (n + 1) ^ d
    Proof (Lean source)
    lemma growthFamily_card_le_succ_pow_of_trace (π : ι → 𝒳 → Bool) (d n : ℕ) (Htrace : BinaryTraceEntropyControl π d) (S : Fin n → 𝒳) : (growthFamily π S).card ≤ (n + 1) ^ d := by rcases Htrace with hvc | hcard · exact le_trans (card_growthFamily_le_sum_choose (growthFamily π S) (hvc S)) (sum_choose_le_succ_pow n d) · exact hcard n S
    Causalean.Stat.Concentration.growthFamily_card_le_succ_pow_of_trace · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:42
  • log_two_growth_card_le lemma — When a Boolean growth family on a sample has positive cardinality and at most the degree-d polynomial number of patterns in one plus the sample size, twice the logarithm of twice its cardinality is no greater than twice that degree times the logarithm of one plus the sample size, plus two.
    ι :
    Type u
    shared
    𝒳 :
    Type v
    shared
    π :
    ι → 𝒳 → Bool
    d n :
    ℕ
    S :
    Fin n → 𝒳
    hcard_pos :
    0 < (growthFamily π S).card
    hcard :
    (growthFamily π S).card ≤ (n + 1) ^ d
    2 * log (2 * ((growthFamily π S).card : ℝ))
    ≤ 2 * (d : ℝ) * log ((n : ℝ) + 1) + 2
    Proof (Lean source)
    lemma log_two_growth_card_le (π : ι → 𝒳 → Bool) (d n : ℕ) (S : Fin n → 𝒳) (hcard_pos : 0 < (growthFamily π S).card) (hcard : (growthFamily π S).card ≤ (n + 1) ^ d) : 2 * log (2 * ((growthFamily π S).card : ℝ)) ≤ 2 * (d : ℝ) * log ((n : ℝ) + 1) + 2 := by let N : ℕ := (growthFamily π S).card let M : ℕ := (n + 1) ^ d have hleR : (2 : ℝ) * N ≤ 2 * M := by exact_mod_cast (Nat.mul_le_mul_left 2 hcard) have hlog_le : log (2 * (N : ℝ)) ≤ log (2 * (M : ℝ)) := by exact Real.log_le_log (by positivity) hleR have hlogM : log (2 * (M : ℝ)) = log 2 + (d : ℝ) * log ((n : ℝ) + 1) := by dsimp [M] norm_num only [Nat.cast_pow, Nat.cast_add, Nat.cast_one] rw [Real.log_mul] · rw [Real.log_pow] · norm_num · positivity have hlog2 : log 2 ≤ (1 : ℝ) := by have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2) linarith dsimp [N] at hlog_le nlinarith
    Causalean.Stat.Concentration.log_two_growth_card_le · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:56
  • empiricalRademacher_withAbs_finiteClass_le lemma — The absolute empirical Rademacher complexity of a finite class is bounded by a Massart logarithmic factor times a common radius.
    ι' Z :
    Type*
    m :
    ℕ
    hm :
    0 < m
    H :
    ι' → Z → ℝ
    S' :
    Fin m → Z
    f :
    Finset ι'
    hf :
    f.Nonempty
    ρ :
    ℝ
    hradius :
    ∀ i ∈ f, sqrt (∑ k : Fin m, ((m : ℝ)⁻¹ * |H i (S' k)|) ^ 2) ≤ ρ
    empiricalRademacherComplexity m (F_on H f) S'
    ≤ ρ * sqrt (2 * log (2 * (f.card : ℝ)))
    Proof (Lean source)
    lemma empiricalRademacher_withAbs_finiteClass_le {ι' Z : Type*} {m : ℕ} (hm : 0 < m) (H : ι' → Z → ℝ) (S' : Fin m → Z) (f : Finset ι') (hf : f.Nonempty) (ρ : ℝ) (hradius : ∀ i ∈ f, sqrt (∑ k : Fin m, ((m : ℝ)⁻¹ * |H i (S' k)|) ^ 2) ≤ ρ) : empiricalRademacherComplexity m (F_on H f) S' ≤ ρ * sqrt (2 * log (2 * (f.card : ℝ))) := by classical let Hd : ι' × Bool → Z → ℝ := fun jb z => if jb.2 then H jb.1 z else -H jb.1 z let fd : Finset (ι' × Bool) := f.product (Finset.univ : Finset Bool) have hfd_nonempty : fd.Nonempty := by rcases hf with ⟨i, hi⟩ refine ⟨(i, true), ?_⟩ simp [fd, hi] have hpoint : empiricalRademacherComplexity m (F_on H f) S' ≤ empiricalRademacherComplexity_without_abs m (F_on Hd fd) S' := by haveI : Nonempty {j // j ∈ f} := by rcases hf with ⟨i, hi⟩ exact ⟨⟨i, hi⟩⟩ unfold empiricalRademacherComplexity empiricalRademacherComplexity_without_abs refine mul_le_mul_of_nonneg_left ?_ (by positivity) refine Finset.sum_le_sum ?_ intro σ _ refine ciSup_le ?_ intro j let x : ℝ := (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on H f j (S' k) have htrue : x = (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd ⟨(j.1, true), by simp [fd, j.2]⟩ (S' k) := by simp [x, Hd, F_on] have hfalse : -x = (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd ⟨(j.1, false), by simp [fd, j.2]⟩ (S' k) := by simp [x, Hd, F_on, Finset.mul_sum] have hle_true : x ≤ ⨆ jb : {jb // jb ∈ fd}, (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd jb (S' k) := by rw [htrue] exact le_ciSup (Finite.bddAbove_range fun jb : {jb // jb ∈ fd} => (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd jb (S' k)) ⟨(j.1, true), by simp [fd, j.2]⟩ have hle_false : -x ≤ ⨆ jb : {jb // jb ∈ fd}, (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd jb (S' k) := by rw [hfalse] exact le_ciSup (Finite.bddAbove_range fun jb : {jb // jb ∈ fd} => (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd jb (S' k)) ⟨(j.1, false), by simp [fd, j.2]⟩ have hlower : -(⨆ jb : {jb // jb ∈ fd}, (m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on Hd fd jb (S' k)) ≤ x := by linarith simpa [x] using abs_le.mpr ⟨hlower, hle_true⟩ have hpointwise : ∀ i ∈ fd, ∀ j : Fin m, |Hd i (S' j)| ≤ (m : ℝ) * ρ := by intro i hi j rcases i with ⟨i, b⟩ have hi_f : i ∈ f := by simpa [fd] using (Finset.mem_product.mp hi).1 have hterm : ((m : ℝ)⁻¹ * |H i (S' j)|) ^ 2 ≤ ∑ k : Fin m, ((m : ℝ)⁻¹ * |H i (S' k)|) ^ 2 := by exact Finset.single_le_sum (s := (Finset.univ : Finset (Fin m))) (f := fun k : Fin m => ((m : ℝ)⁻¹ * |H i (S' k)|) ^ 2) (by intro k _; exact sq_nonneg _) (by simp) have hscaled : (m : ℝ)⁻¹ * |H i (S' j)| ≤ ρ := by have hsqrt := (Real.sqrt_le_sqrt hterm).trans (hradius i hi_f) have hnonneg : 0 ≤ (m : ℝ)⁻¹ * |H i (S' j)| := by exact mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg m)) (abs_nonneg _) simpa [Real.sqrt_sq_eq_abs, abs_of_nonneg hnonneg] using hsqrt have hmR : 0 < (m : ℝ) := by exact_mod_cast hm have hmul := mul_le_mul_of_nonneg_left hscaled (le_of_lt hmR) have hcancel : (m : ℝ) * ((m : ℝ)⁻¹ * |H i (S' j)|) = |H i (S' j)| := by field_simp [ne_of_gt hmR] have hH : |H i (S' j)| ≤ (m : ℝ) * ρ := by simpa [hcancel, mul_assoc] using hmul by_cases hb : b = true · simp [Hd, hb, hH] · have hbfalse : b = false := by cases b <;> simp at hb ⊢ simpa [Hd, hbfalse, abs_neg] using hH have hmass : empiricalRademacherComplexity_without_abs m (F_on Hd fd) S' ≤ (sup' fd hfd_nonempty fun j => sqrt (∑ i : Fin m, ((m : ℝ)⁻¹ * |Hd j (S' i)|) ^ 2)) * sqrt (2 * log fd.card) := by rw [empiricalRademacherComplexity_without_abs_eq_empiricalRademacherComplexity_pmf_without_abs] exact massart_lemma_pmf (F := Hd) (S := S') fd hfd_nonempty have hsup : (sup' fd hfd_nonempty fun j => sqrt (∑ i : Fin m, ((m : ℝ)⁻¹ * |Hd j (S' i)|) ^ 2)) ≤ ρ := by refine Finset.sup'_le _ _ ?_ intro jb hjb rcases jb with ⟨i, b⟩ have hi_f : i ∈ f := by simpa [fd] using (Finset.mem_product.mp hjb).1 by_cases hb : b = true · simpa [Hd, hb] using hradius i hi_f · have hbfalse : b = false := by cases b <;> simp at hb ⊢ simpa [Hd, hbfalse, abs_neg] using hradius i hi_f have hcard : (fd.card : ℝ) = 2 * (f.card : ℝ) := by simp [fd, Nat.cast_mul, mul_comm] calc empiricalRademacherComplexity m (F_on H f) S' ≤ empiricalRademacherComplexity_without_abs m (F_on Hd fd) S' := hpoint _ ≤ (sup' fd hfd_nonempty fun j => sqrt (∑ i : Fin m, ((m : ℝ)⁻¹ * |Hd j (S' i)|) ^ 2)) * sqrt (2 * log fd.card) := hmass _ ≤ ρ * sqrt (2 * log fd.card) := mul_le_mul_of_nonneg_right hsup (Real.sqrt_nonneg _) _ = ρ * sqrt (2 * log (2 * (f.card : ℝ))) := by rw [hcard]
    Causalean.Stat.Concentration.empiricalRademacher_withAbs_finiteClass_le · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:87
  • empiricalRademacherComplexity_F_on_univ_eq lemma — Restricting a finite function family to its full index set leaves its empirical Rademacher complexity unchanged.
    ι' Z :
    Type*
    m :
    ℕ
    H :
    ι' → Z → ℝ
    S' :
    Fin m → Z
    empiricalRademacherComplexity m (F_on H (Finset.univ : Finset ι')) S'
    = empiricalRademacherComplexity m H S'
    Proof (Lean source)
    lemma empiricalRademacherComplexity_F_on_univ_eq {ι' Z : Type*} [Fintype ι'] {m : ℕ} (H : ι' → Z → ℝ) (S' : Fin m → Z) : empiricalRademacherComplexity m (F_on H (Finset.univ : Finset ι')) S' = empiricalRademacherComplexity m H S' := by classical cases isEmpty_or_nonempty ι' with | inl _ => simp [empiricalRademacherComplexity] | inr _ => unfold empiricalRademacherComplexity apply congrArg refine Finset.sum_congr rfl ?_ intro σ _ haveI : Nonempty {j // j ∈ (Finset.univ : Finset ι')} := by rcases (inferInstance : Nonempty ι') with ⟨i⟩ exact ⟨⟨i, by simp⟩⟩ apply le_antisymm · refine ciSup_le ?_ intro i exact le_ciSup (Finite.bddAbove_range fun j : ι' => |(m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * H j (S' k)|) i.1 · refine ciSup_le ?_ intro i have hidx : i ∈ (Finset.univ : Finset ι') := by simp exact le_ciSup (Finite.bddAbove_range fun j : {j // j ∈ (Finset.univ : Finset ι')} => |(m : ℝ)⁻¹ * ∑ k : Fin m, (σ k : ℝ) * F_on H (Finset.univ : Finset ι') j (S' k)|) ⟨i, hidx⟩
    Causalean.Stat.Concentration.empiricalRademacherComplexity_F_on_univ_eq · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:224
  • empiricalNorm_const_mul lemma — Scaling a function by a constant scales its empirical root-mean-square norm by the absolute value of that constant.
    𝒳 :
    Type*
    n :
    ℕ
    S :
    Fin n → 𝒳
    c :
    ℝ
    f :
    𝒳 → ℝ
    empiricalNorm S (fun x => c * f x) = |c| * empiricalNorm S f
    Proof (Lean source)
    lemma empiricalNorm_const_mul {𝒳 : Type*} {n : ℕ} (S : Fin n → 𝒳) (c : ℝ) (f : 𝒳 → ℝ) : empiricalNorm S (fun x => c * f x) = |c| * empiricalNorm S f := by classical unfold empiricalNorm have hsum : (∑ i : Fin n, (c * f (S i)) ^ 2) = c ^ 2 * ∑ i : Fin n, (f (S i)) ^ 2 := by rw [Finset.mul_sum] refine Finset.sum_congr rfl ?_ intro i _ ring_nf have hnonneg : 0 ≤ (1 / (n : ℝ)) * ∑ i : Fin n, (f (S i)) ^ 2 := by exact mul_nonneg (by positivity) (Finset.sum_nonneg fun i _ => sq_nonneg _) calc sqrt ((1 / (n : ℝ)) * ∑ i : Fin n, (c * f (S i)) ^ 2) = sqrt (c ^ 2 * ((1 / (n : ℝ)) * ∑ i : Fin n, (f (S i)) ^ 2)) := by rw [hsum] ring_nf _ = sqrt (c ^ 2) * sqrt ((1 / (n : ℝ)) * ∑ i : Fin n, (f (S i)) ^ 2) := by rw [Real.sqrt_mul (sq_nonneg c)] _ = |c| * sqrt ((1 / (n : ℝ)) * ∑ i : Fin n, (f (S i)) ^ 2) := by rw [Real.sqrt_sq_eq_abs]
    Causalean.Stat.Concentration.empiricalNorm_const_mul · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:257
  • growthFamilyRep_spec lemma — The chosen growth-family representative realizes the pattern it represents.
    ι 𝒳 :
    Type*
    n :
    ℕ
    π :
    ι → 𝒳 → Bool
    S :
    Fin n → 𝒳
    A :
    {A // A ∈ growthFamily π S}
    restrictionPattern (π (growthFamilyRep π S A)) S = A.1
    Proof (Lean source)
    lemma growthFamilyRep_spec {ι 𝒳 : Type*} {n : ℕ} (π : ι → 𝒳 → Bool) (S : Fin n → 𝒳) (A : {A // A ∈ growthFamily π S}) : restrictionPattern (π (growthFamilyRep π S A)) S = A.1 := Classical.choose_spec ((mem_growthFamily_iff (π := π) (S := S) (A := A.1)).mp A.2)
  • starHullZeroOutScaleCoeff_nonneg lemma — The largest active scalar in a zeroed star hull is nonnegative because the zero scalar is always available.
    ι 𝒳 :
    Type*
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    r :
    ℝ
    i :
    ι
    0 ≤ starHullZeroOutScaleCoeff F norm r i
    Proof (Lean source)
    lemma starHullZeroOutScaleCoeff_nonneg {ι 𝒳 : Type*} (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (r : ℝ) (i : ι) : 0 ≤ starHullZeroOutScaleCoeff F norm r i := by classical let c : Icc (0 : ℝ) 1 → ℝ := fun a => if norm (starHullEval F (a, i)) ≤ r then (a : ℝ) else 0 have hc_bdd : BddAbove (range c) := by refine ⟨1, ?_⟩ rintro _ ⟨a, rfl⟩ dsimp [c] split_ifs · exact a.property.2 · norm_num let a0 : Icc (0 : ℝ) 1 := ⟨0, by simp [Set.mem_Icc]⟩ have hval : c a0 = 0 := by simp [c, a0] rw [starHullZeroOutScaleCoeff] change 0 ≤ ⨆ a : Icc (0 : ℝ) 1, c a simpa [hval] using le_ciSup hc_bdd a0
    Causalean.Stat.Concentration.starHullZeroOutScaleCoeff_nonneg · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:315
  • starHullPatternCoeff_nonneg lemma — The coefficient assigned to any observed Boolean pattern by the localized star-hull pattern class is nonnegative.
    ι 𝒳 :
    Type*
    n :
    ℕ
    F :
    ι → 𝒳 → ℝ
    norm :
    (𝒳 → ℝ) → ℝ
    π :
    ι → 𝒳 → Bool
    S :
    Fin n → 𝒳
    r :
    ℝ
    A :
    {A // A ∈ growthFamily π S}
    0 ≤ starHullPatternCoeff F norm π S r A
    Proof (Lean source)
    lemma starHullPatternCoeff_nonneg {ι 𝒳 : Type*} {n : ℕ} (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (π : ι → 𝒳 → Bool) (S : Fin n → 𝒳) (r : ℝ) (A : {A // A ∈ growthFamily π S}) : 0 ≤ starHullPatternCoeff F norm π S r A := by classical let rep : {i : ι // restrictionPattern (π i) S = A.1} := ⟨growthFamilyRep π S A, growthFamilyRep_spec π S A⟩ have hcoeff_le : BddAbove (Set.range fun i : {i : ι // restrictionPattern (π i) S = A.1} => starHullZeroOutScaleCoeff F norm r i.1) := by refine ⟨1, ?_⟩ rintro _ ⟨i, rfl⟩ exact starHullZeroOutScaleCoeff_le_one F norm r i.1 have hrep_le : starHullZeroOutScaleCoeff F norm r rep.1 ≤ starHullPatternCoeff F norm π S r A := by rw [starHullPatternCoeff] exact le_ciSup hcoeff_le rep exact (starHullZeroOutScaleCoeff_nonneg F norm r rep.1).trans hrep_le
    Causalean.Stat.Concentration.starHullPatternCoeff_nonneg · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:355
  • sample_eq_growthFamilyRep_of_pattern lemma — When a function class factorizes samplewise through Boolean labels, any function with a given observed Boolean pattern agrees on the sample with that pattern's chosen representative.
    ι 𝒳 :
    Type*
    n :
    ℕ
    F :
    ι → 𝒳 → ℝ
    π :
    ι → 𝒳 → Bool
    S :
    Fin n → 𝒳
    φ :
    Fin n → Bool → ℝ
    hfactorS :
    ∀ i j, F i (S j) = φ j (π i (S j))
    A :
    {A // A ∈ growthFamily π S}
    i :
    ι
    hiA :
    restrictionPattern (π i) S = A.1
    k :
    Fin n
    F i (S k) = F (growthFamilyRep π S A) (S k)
    Proof (Lean source)
    lemma sample_eq_growthFamilyRep_of_pattern {ι 𝒳 : Type*} {n : ℕ} {F : ι → 𝒳 → ℝ} {π : ι → 𝒳 → Bool} {S : Fin n → 𝒳} {φ : Fin n → Bool → ℝ} (hfactorS : ∀ i j, F i (S j) = φ j (π i (S j))) (A : {A // A ∈ growthFamily π S}) {i : ι} (hiA : restrictionPattern (π i) S = A.1) (k : Fin n) : F i (S k) = F (growthFamilyRep π S A) (S k) := by rw [hfactorS i k, hfactorS (growthFamilyRep π S A) k] apply congrArg (φ k) apply Bool.eq_iff_iff.mpr rw [← restrictionPattern_mem_iff (p := π i) (S := S) (j := k), hiA, ← growthFamilyRep_spec π S A, restrictionPattern_mem_iff (p := π (growthFamilyRep π S A)) (S := S) (j := k)]
    Causalean.Stat.Concentration.sample_eq_growthFamilyRep_of_pattern · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/RademacherBridge.lean:395
Envelope 1 core · 10 supporting This file proves the deterministic arithmetic of the finite-VC linear envelope: nonnegativity and positivity of its slope, star-shapedness, the exact critical radius for a positive linear envelope, and the resulting d * ★ criticalRadius_vcLocalizedPsi_sq_le_rate

Linear finite-VC envelopes and critical radii

This file proves the deterministic arithmetic of the finite-VC linear envelope: nonnegativity and positivity of its slope, star-shapedness, the exact critical radius for a positive linear envelope, and the resulting d * log n / n squared-radius bound.

lemma criticalRadius_vcLocalizedPsi_sq_le_rate reviewed
Causalean.Stat.Concentration

Rate bound for the finite-VC critical radius. For a nonnegative localization constant K and a positive sample size n, the squared critical radius of the finite-VC localized envelope vcLocalizedPsi K d n is at most 36·(K·d·log(n+1)+1)/n — the advertised (d·log n)/n-order bound.

Formal statement
K :
ℝ
d n :
ℕ
hK :
0 ≤ K
hn :
0 < n
≤ 36 * ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ))
Proof (Lean source)
lemma criticalRadius_vcLocalizedPsi_sq_le_rate {K : ℝ} {d n : ℕ} (hK : 0 ≤ K) (hn : 0 < n) : (criticalRadius (vcLocalizedPsi K d n)) ^ 2 ≤ 36 * ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ)) := by calc (criticalRadius (vcLocalizedPsi K d n)) ^ 2 ≤ (vcLocalizedSlope K d n) ^ 2 := criticalRadius_vcLocalizedPsi_sq_le hK hn _ = 36 * ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ)) := vcLocalizedSlope_sq hK
Causalean.Stat.Concentration.criticalRadius_vcLocalizedPsi_sq_le_rate · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/Envelope.lean:128 · uses criticalRadius , vcLocalizedPsi
10 supporting declarations (lemmas, instances)
Population­Bounds 3 core · 2 supporting Let F be a countable class of measurable functions bounded by b that factors through Boolean labels of VC dimension at most d (BinaryFactoredVCClass), let R_n(r) be the Rademacher complexity of its star hull localized to ★ vcPopulation_localizedRademacher_above_floor★ vcPopulationLocalizedEnvelope★ vcPopulation_criticalRadius_sq_le_rate

Population-localized Rademacher envelope for finite-VC classes

Let F be a countable class of measurable functions bounded by b that factors through Boolean labels of VC dimension at most d (BinaryFactoredVCClass), let R_n(r) be the Rademacher complexity of its star hull localized to L²(P)-norm at most r, and q = (d·log(n+1) + 1)/n. Nothing is assumed about empirical norms.

* vcPopulationLocalizedRademacherUpperBound — R_n(r) ≤ ψ(r) = 2·√q·r + 16·b·q for every r ≥ 0, as a RademacherUpperBound. This is the self-bounding inequality vcPopulation_localizedRademacher_le. * vcPopulationLocalizedEnvelope — ψ is a star-shaped envelope, dominates R_n, and its critical radius r* satisfies r*² ≤ (32 + 128·b)·q. * vcPopulation_criticalRadius_sq_le_rate — the critical radius δ_n of r ↦ 512·b·R_n(r), above which the uniform norm comparison holds, satisfies δ_n² ≤ 4194304·b²·q. * vcPopulation_localizedRademacher_above_floor — a smaller intercept at large radii: R_n(r) ≤ 2·√q·r + b/n for r ≥ 2048·b·√q and d ≥ 1.

The refinement integrates over the norm-comparison event at slack 2048·b·√q, whose complement has probability at most 1/n (vcPopulation_comparison_floor): on the event, population localization at r transfers to empirical radius √2·r and Massart's lemma gives 2·√q·r; off the event the complexity is at most b.

References: Bartlett, Bousquet and Mendelson (2005), "Local Rademacher complexities", Corollary 3.7; Wainwright (2019), High-Dimensional Statistics, Chapter 14.

lemma vcPopulation_localizedRademacher_above_floor reviewed
Causalean.Stat.Concentration

Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b > 0 and factor through Boolean labels of VC dimension at most d ≥ 1, and let q = (d·log(n+1) + 1)/n for sample size n ≥ 1. For every radius r ≥ 2048·b·√q, the Rademacher complexity R_n(r) of the star hull of F localized to L²(P)-norm at most r satisfies R_n(r) ≤ 2·√q·r + b/n.

Formal statement
𝒳 :
Type u_1
shared
ι :
Type u_2
shared
F :
ι → 𝒳 → ℝ
hmeas :
∀ i, Measurable (F i)
b r :
ℝ
hb :
0 < b
hbound :
∀ i x, |F i x| ≤ b
d n :
ℕ
hd :
0 < d
hn :
0 < n
hr :
2048 * b * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) ≤ r
localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r
≤ 2 * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) * r + b / n
Proof (Lean source)
lemma vcPopulation_localizedRademacher_above_floor (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b r : ℝ} (hb : 0 < b) (hbound : ∀ i x, |F i x| ≤ b) (d n : ℕ) (hd : 0 < d) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) (hr : 2048 * b * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) ≤ r) : localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r ≤ 2 * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) * r + b / n := by classical let q : ℝ := ((d : ℝ) * log ((n : ℝ) + 1) + 1) / n let δ : ℝ := 2048 * b * sqrt q let μ := Measure.pi (fun _ : Fin n => P) let E := populationNormComparisonEvent P F n δ let G := populationLocalizedRepresentative P F r let c := 2 * sqrt q * r have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hlog : 0 ≤ log ((n : ℝ) + 1) := Real.log_nonneg (by linarith) have hq : 0 ≤ q := by dsimp [q]; positivity have hδ : 0 ≤ δ := by dsimp [δ]; positivity have hr0 : 0 ≤ r := hδ.trans hr obtain ⟨hE, hprob⟩ := vcPopulation_comparison_floor P F hmeas hb hbound d n hd hn Hvc have hEc : MeasurableSet Eᶜ := hE.compl have hrad (S : Fin n → 𝒳) (hS : S ∈ E) : empiricalL2Radius G S ≤ sqrt 2 * r := by apply ciSup_le intro i let a : Icc (0 : ℝ) 1 := ⟨starHullZeroOutScaleCoeff F (fun f => measureL2Dist P f (fun _ => 0)) r i, starHullZeroOutScaleCoeff_nonneg F _ r i, starHullZeroOutScaleCoeff_le_one F _ r i⟩ have ha : measureL2Dist P (starHullEval F (a, i)) (fun _ => 0) ≤ r := populationLocalizedRepresentative_radius P F hr0 i have heq : starHullZeroOut F (fun f => measureL2Dist P f (fun _ => 0)) r (a, i) = G i := by funext x simp only [starHullZeroOut, if_pos ha] rfl simpa only [heq] using population_localization_transfer P F hδ hr hS (a, i) have hon (S : Fin n → 𝒳) (hS : S ∈ E) : empiricalRademacherComplexity n (starHullZeroOut F (fun f => measureL2Dist P f (fun _ => 0)) r) S ≤ c := by calc _ ≤ sqrt (2 * q) * empiricalL2Radius G S := population_massart_empirical_radius P F hb.le hbound d n hn Hvc S _ ≤ sqrt (2 * q) * (sqrt 2 * r) := mul_le_mul_of_nonneg_left (hrad S hS) (Real.sqrt_nonneg _) _ = c := by rw [Real.sqrt_mul (by norm_num : (0 : ℝ) ≤ 2)] dsimp [c] calc _ = (sqrt 2 ^ 2) * sqrt q * r := by ring _ = _ := by rw [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] have hi := (population_localizedRademacher_integrable P F hmeas (r := r) hb.le hbound n).2 have hind : Integrable (Eᶜ.indicator (fun _ => b)) μ := (integrable_const b).indicator hEc have hmajor (S : Fin n → 𝒳) : empiricalRademacherComplexity n (starHullZeroOut F (fun f => measureL2Dist P f (fun _ => 0)) r) S ≤ c + Eᶜ.indicator (fun _ => b) S := by by_cases hS : S ∈ E · have hSc : S ∉ Eᶜ := by simpa using hS simpa only [Set.indicator_of_notMem hSc, add_zero] using hon S hS · rw [Set.indicator_of_mem (show S ∈ Eᶜ from hS)] have hle := (empiricalRademacherComplexity_mem_Icc (starHullZeroOut F (fun f => measureL2Dist P f (fun _ => 0)) r) hb.le (fun p x => abs_starHullZeroOut_le_of_bound hbound p x) n S).2 have hc : 0 ≤ c := by dsimp [c]; positivity linarith have hle := integral_mono hi ((integrable_const c).add hind) hmajor change localRademacherComplexity F _ P id n r ≤ c + b / n calc _ ≤ ∫ S, c + Eᶜ.indicator (fun _ => b) S ∂μ := by simpa only [localRademacherComplexity, rademacherComplexity, Function.id_comp, μ, Pi.add_apply] using hle _ = c + μ.real Eᶜ * b := by rw [integral_add (integrable_const c) hind, integral_indicator_const b hEc] simp [μ, smul_eq_mul] _ ≤ c + b / n := by have h := mul_le_mul_of_nonneg_right hprob hb.le change μ.real Eᶜ * b ≤ 1 / (n : ℝ) * b at h have heq : 1 / (n : ℝ) * b = b / n := by ring rw [heq] at h exact add_le_add le_rfl h
theorem vcPopulationLocalizedEnvelope reviewed
Causalean.Stat.Concentration

Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b ≥ 0 and factor through Boolean labels of VC dimension at most d, and let ψ(r) = 2·√q·r + 16·b·q with q = (d·log(n+1) + 1)/n for sample size n ≥ 1. Then ψ is a valid localized envelope with the d·log(n)/n critical-radius rate: (1) ψ is star-shaped, (2) the Rademacher complexity of the star hull of F localized to L²(P)-norm at most r is at most ψ(r) for every r ≥ 0, and (3) the critical radius r* of ψ, the infimum of r > 0 with ψ(r) ≤ r², satisfies r*² ≤ (32 + 128·b)·q.

Formal statement
𝒳 :
Type u_1
shared
ι :
Type u_2
shared
F :
ι → 𝒳 → ℝ
hmeas :
∀ i, Measurable (F i)
b :
ℝ
hb :
0 ≤ b
hbound :
∀ i x, |F i x| ≤ b
d n :
ℕ
hn :
0 < n
conclusion 2
RademacherUpperBound F (fun f => measureL2Dist P f (fun _ => 0)) P id n (vcPopulationLocalizedPsi b d n)
conclusion 3
≤ (32 + 128 * b) * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
Proof (Lean source)
theorem vcPopulationLocalizedEnvelope (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b : ℝ} (hb : 0 ≤ b) (hbound : ∀ i x, |F i x| ≤ b) (d n : ℕ) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) : IsStarShapedEnvelope (vcPopulationLocalizedPsi b d n) ∧ RademacherUpperBound F (fun f => measureL2Dist P f (fun _ => 0)) P id n (vcPopulationLocalizedPsi b d n) ∧ criticalRadius (vcPopulationLocalizedPsi b d n) ^ 2 ≤ (32 + 128 * b) * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) := by exact ⟨vcPopulationLocalizedPsi_isStarShapedEnvelope hb d n, vcPopulationLocalizedRademacherUpperBound P F hmeas hb hbound d n hn Hvc, criticalRadius_vcPopulationLocalizedPsi_sq_le_rate hb d n⟩
theorem vcPopulation_criticalRadius_sq_le_rate reviewed
Causalean.Stat.Concentration

Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b > 0 and factor through Boolean labels of VC dimension at most d, and let R_n(r) be the Rademacher complexity of its star hull localized to L²(P)-norm at most r, for sample size n ≥ 1. Then the critical radius δ_n of r ↦ 512·b·R_n(r), the infimum of δ > 0 with 512·b·R_n(δ) ≤ δ², satisfies δ_n² ≤ 4194304·b²·(d·log(n+1) + 1)/n.

Formal statement
𝒳 :
Type u_1
shared
ι :
Type u_2
shared
F :
ι → 𝒳 → ℝ
hmeas :
∀ i, Measurable (F i)
b :
ℝ
hb :
0 < b
hbound :
∀ i x, |F i x| ≤ b
d n :
ℕ
hn :
0 < n
criticalRadius (fun r => 512 * b * localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r) ^ 2
≤ 4194304 * b ^ 2 * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
Proof (Lean source)
theorem vcPopulation_criticalRadius_sq_le_rate (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b : ℝ} (hb : 0 < b) (hbound : ∀ i x, |F i x| ≤ b) (d n : ℕ) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) : criticalRadius (fun r => 512 * b * localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r) ^ 2 ≤ 4194304 * b ^ 2 * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) := by let q : ℝ := ((d : ℝ) * log ((n : ℝ) + 1) + 1) / n let δ : ℝ := 2048 * b * Real.sqrt q have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hlog : 0 ≤ log ((n : ℝ) + 1) := Real.log_nonneg (by linarith) have hq : 0 < q := by dsimp [q]; positivity have hδ : 0 < δ := by dsimp [δ]; positivity have hδsq : δ ^ 2 = 4194304 * b ^ 2 * q := by dsimp [δ] rw [mul_pow, mul_pow, Real.sq_sqrt hq.le] ring have hself := vcPopulation_localizedRademacher_le P F hmeas hb.le hbound hδ.le d n hn Hvc have hle : criticalRadius (fun r => 512 * b * localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r) ≤ δ := by apply criticalRadius_le hδ calc _ ≤ 512 * b * (2 * Real.sqrt q * δ + 16 * b * q) := mul_le_mul_of_nonneg_left hself (by positivity) _ = 2105344 * b ^ 2 * q := by dsimp [δ] calc _ = b ^ 2 * (2097152 * Real.sqrt q ^ 2 + 8192 * q) := by ring _ = _ := by rw [Real.sq_sqrt hq.le]; ring _ ≤ δ ^ 2 := by rw [hδsq]; nlinarith [mul_nonneg (sq_nonneg b) hq.le] have hc := criticalRadius_nonneg (fun r => 512 * b * localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r) change _ ≤ 4194304 * b ^ 2 * q rw [← hδsq] nlinarith
2 supporting declarations (lemmas, instances)
  • vcPopulation_comparison_floor lemma — Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b > 0 and factor through Boolean labels of VC dimension at most d ≥ 1. For sample size n ≥ 1 and slack δ = 2048·b·√q, with q = (d·log(n+1) + 1)/n, the event that every f in the star hull of F satisfies |‖f‖_n² − ‖f‖²_{L²(P)}| ≤ ‖f‖²_{L²(P)}/2 + δ²/2 is measurable, and its complement has probability at most 1/n over n independent draws from P.
    𝒳 :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    F :
    ι → 𝒳 → ℝ
    hmeas :
    ∀ i, Measurable (F i)
    b :
    ℝ
    hb :
    0 < b
    hbound :
    ∀ i x, |F i x| ≤ b
    d n :
    ℕ
    hd :
    0 < d
    hn :
    0 < n
    δ :
    2048 * b * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
    (Measure.pi (fun _ : Fin n => P)).real (populationNormComparisonEvent P F n δ)ᶜ
    ≤ 1 / (n : ℝ)
    Proof (Lean source)
    lemma vcPopulation_comparison_floor (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b : ℝ} (hb : 0 < b) (hbound : ∀ i x, |F i x| ≤ b) (d n : ℕ) (hd : 0 < d) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) : let δ := 2048 * b * Real.sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) MeasurableSet (populationNormComparisonEvent P F n δ) ∧ (Measure.pi (fun _ : Fin n => P)).real (populationNormComparisonEvent P F n δ)ᶜ ≤ 1 / (n : ℝ) := by let q : ℝ := ((d : ℝ) * log ((n : ℝ) + 1) + 1) / n let δ : ℝ := 2048 * b * Real.sqrt q have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hdR : (1 : ℝ) ≤ d := by exact_mod_cast hd have hlog : 0 ≤ log ((n : ℝ) + 1) := Real.log_nonneg (by linarith) have hq : 0 < q := by dsimp [q]; positivity have hδ : 0 < δ := by dsimp [δ]; positivity have hδsq : δ ^ 2 = 4194304 * b ^ 2 * q := by dsimp [δ] rw [mul_pow, mul_pow, Real.sq_sqrt hq.le] ring have hself := vcPopulation_localizedRademacher_le P F hmeas hb.le hbound hδ.le d n hn Hvc have hcritical : 512 * b * localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n δ ≤ δ ^ 2 := by calc _ ≤ 512 * b * (2 * Real.sqrt q * δ + 16 * b * q) := mul_le_mul_of_nonneg_left hself (by positivity) _ = 2105344 * b ^ 2 * q := by dsimp [δ] calc _ = b ^ 2 * (2097152 * Real.sqrt q ^ 2 + 8192 * q) := by ring _ = _ := by rw [Real.sq_sqrt hq.le]; ring _ ≤ δ ^ 2 := by rw [hδsq]; nlinarith [mul_nonneg (sq_nonneg b) hq.le] have hprob := populationNormComparisonEvent_compl_le_of_critical_inequality P F hmeas hb hbound hδ n hn hcritical have hexponent : -(n : ℝ) * δ ^ 2 / (65536 * b ^ 2) = -64 * ((d : ℝ) * log ((n : ℝ) + 1) + 1) := by rw [hδsq] dsimp [q] field_simp ring have hlarge : -64 * ((d : ℝ) * log ((n : ℝ) + 1) + 1) ≤ -log ((n : ℝ) + 1) - 4 := by nlinarith [mul_le_mul_of_nonneg_right hdR hlog] have hfour : (4 : ℝ) ≤ exp 4 := by linarith [Real.add_one_le_exp 4] refine ⟨populationNormComparisonEvent_measurable P F hmeas n δ, ?_⟩ calc _ ≤ 4 * exp (-(n : ℝ) * δ ^ 2 / (65536 * b ^ 2)) := hprob _ ≤ 4 * exp (-log ((n : ℝ) + 1) - 4) := by rw [hexponent] exact mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hlarge) (by norm_num) _ ≤ exp 4 * exp (-log ((n : ℝ) + 1) - 4) := mul_le_mul_of_nonneg_right hfour (Real.exp_pos _).le _ = 1 / ((n : ℝ) + 1) := by rw [← Real.exp_add] have heq : (4 : ℝ) + (-log ((n : ℝ) + 1) - 4) = -log ((n : ℝ) + 1) := by ring rw [heq, Real.exp_neg, Real.exp_log (by linarith : 0 < (n : ℝ) + 1)] simp only [one_div] _ ≤ 1 / (n : ℝ) := one_div_le_one_div_of_le hnR (by linarith)
    Causalean.Stat.Concentration.vcPopulation_comparison_floor · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/PopulationBounds.lean:47
  • vcPopulationLocalizedRademacherUpperBound theorem — Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b ≥ 0 and factor through Boolean labels of VC dimension at most d. For sample size n ≥ 1, the Rademacher complexity R_n(r) of the star hull of F localized to L²(P)-norm at most r satisfies R_n(r) ≤ 2·√q·r + 16·b·q for every r ≥ 0, where q = (d·log(n+1) + 1)/n.
    𝒳 :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    F :
    ι → 𝒳 → ℝ
    hmeas :
    ∀ i, Measurable (F i)
    b :
    ℝ
    hb :
    0 ≤ b
    hbound :
    ∀ i x, |F i x| ≤ b
    d n :
    ℕ
    hn :
    0 < n
    RademacherUpperBound F (fun f => measureL2Dist P f (fun _ => 0)) P id n (vcPopulationLocalizedPsi b d n)
    Proof (Lean source)
    theorem vcPopulationLocalizedRademacherUpperBound (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b : ℝ} (hb : 0 ≤ b) (hbound : ∀ i x, |F i x| ≤ b) (d n : ℕ) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) : RademacherUpperBound F (fun f => measureL2Dist P f (fun _ => 0)) P id n (vcPopulationLocalizedPsi b d n) := by intro r hr exact vcPopulation_localizedRademacher_le P F hmeas hb hbound hr d n hn Hvc
    Causalean.Stat.Concentration.vcPopulationLocalizedRademacherUpperBound · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/PopulationBounds.lean:208
Population­Massart 1 core · 2 supporting Let F be bounded by b and factor through Boolean labels of VC dimension at most d, let G_r be its star hull localized to L²(P)-norm at most r, and q = (d·log(n+1) + 1)/n. ★ vcPopulation_localizedRademacher_le

Massart bound and self-bounding inequality under population localization

Let F be bounded by b and factor through Boolean labels of VC dimension at most d, let G_r be its star hull localized to L²(P)-norm at most r, and q = (d·log(n+1) + 1)/n.

* On every sample, Massart's finite-class lemma applied to the at most (n+1)^d label patterns gives R̂_n(G_r) ≤ √(2q)·ρ_n, where ρ_n = sup over g ∈ G_r of ‖g‖_n is the empirical radius of the localized class. No bound on ρ_n is assumed. * E ρ_n² ≤ r² + 8·b·R_n(r), by the expectation bound for the squared process. * Combining the two, R_n(r)² ≤ 2q·(r² + 8·b·R_n(r)); solving this quadratic inequality gives R_n(r) ≤ 2·√q·r + 16·b·q at every radius r ≥ 0.

Main results

* population_massart_empirical_radius, population_empirical_radius_second_moment * vcPopulation_localizedRademacher_le — R_n(r) ≤ 2·√q·r + 16·b·q, the affine envelope vcPopulationLocalizedPsi.

lemma vcPopulation_localizedRademacher_le reviewed
Causalean.Stat.Concentration

Under a probability law P, let a nonempty countable class F of measurable functions be bounded in absolute value by b ≥ 0 and factor through Boolean labels of VC dimension at most d. For every radius r ≥ 0 and sample size n ≥ 1, the Rademacher complexity R_n(r) of the star hull of F localized to L²(P)-norm at most r satisfies R_n(r) ≤ 2·√q·r + 16·b·q, where q = (d·log(n+1) + 1)/n.

Formal statement
𝒳 :
Type u_1
shared
ι :
Type u_2
shared
F :
ι → 𝒳 → ℝ
hmeas :
∀ i, Measurable (F i)
b r :
ℝ
hb :
0 ≤ b
hbound :
∀ i x, |F i x| ≤ b
hr :
0 ≤ r
d n :
ℕ
hn :
0 < n
localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r
≤ 2 * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) * r
+ 16 * b * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n)
Proof (Lean source)
lemma vcPopulation_localizedRademacher_le (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b r : ℝ} (hb : 0 ≤ b) (hbound : ∀ i x, |F i x| ≤ b) (hr : 0 ≤ r) (d n : ℕ) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) : localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r ≤ 2 * sqrt (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) * r + 16 * b * (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) := by let μ := Measure.pi (fun _ : Fin n => P) let G := populationLocalizedRepresentative P F r let T : (Fin n → 𝒳) → ℝ := fun S => empiricalL2Radius G S let R := localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r let q := (((d : ℝ) * log ((n : ℝ) + 1) + 1) / n) have hq : 0 ≤ q := by dsimp [q] apply div_nonneg _ (by positivity) have hlog : 0 ≤ log ((n : ℝ) + 1) := Real.log_nonneg (by have := Nat.cast_nonneg (α := ℝ) n; linarith) positivity have hR : 0 ≤ R := localRademacherComplexity_nonneg F _ P id n r have hGmeas := populationLocalizedRepresentative_measurable P F hmeas r have hGbound := populationLocalizedRepresentative_bound P F hbound (r := r) have hTmeas : Measurable T := empiricalL2Radius_measurable G hGmeas n have hTmem : ∀ S, T S ∈ Icc 0 b := fun S => empiricalL2Radius_mem_Icc G hb hGbound S have hTint : Integrable T μ := Integrable.of_mem_Icc 0 b hTmeas.aemeasurable (ae_of_all _ hTmem) have hTlp : MemLp T 2 μ := MemLp.of_bound hTmeas.aestronglyMeasurable b (ae_of_all _ fun S => by simpa only [Real.norm_eq_abs, abs_of_nonneg (hTmem S).1] using (hTmem S).2) have hCS : (∫ S, T S ∂μ) ^ 2 ≤ ∫ S, T S ^ 2 ∂μ := by have hv := ProbabilityTheory.variance_nonneg T μ rw [ProbabilityTheory.variance_eq_sub hTlp] at hv simpa only [Pi.pow_apply] using (sub_nonneg.mp hv) have hmass : R ≤ sqrt (2 * q) * ∫ S, T S ∂μ := by have hi := (population_localizedRademacher_integrable P F hmeas (r := r) hb hbound n).2 have h := integral_mono hi (hTint.const_mul (sqrt (2 * q))) (fun S => population_massart_empirical_radius P F hb hbound d n hn Hvc S) rw [integral_const_mul] at h simpa only [R, q, T, G, μ, localRademacherComplexity, rademacherComplexity, Function.id_comp] using h have hmassSq := pow_le_pow_left₀ hR hmass 2 rw [mul_pow, Real.sq_sqrt (mul_nonneg (by norm_num) hq)] at hmassSq have hsecond : (∫ S, T S ^ 2 ∂μ) ≤ r ^ 2 + 8 * b * R := population_empirical_radius_second_moment P F hmeas hb hbound hr n hn have hquad : R ^ 2 ≤ 2 * q * (r ^ 2 + 8 * b * R) := hmassSq.trans (mul_le_mul_of_nonneg_left (hCS.trans hsecond) (by positivity)) let A := 2 * sqrt q * r let B := 16 * b * q have hA : 0 ≤ A := by dsimp [A]; positivity have hB : 0 ≤ B := by dsimp [B]; positivity have hAsq : A ^ 2 = 4 * q * r ^ 2 := by dsimp [A] rw [mul_pow, mul_pow, Real.sq_sqrt hq] ring have hquad' : R ^ 2 ≤ A ^ 2 / 2 + B * R := by rw [hAsq] dsimp [B] nlinarith only [hquad] change R ≤ A + B by_contra h have hlt : A + B < R := lt_of_not_ge h have hprod := mul_pos (by linarith : 0 < R - B - A) (by linarith : 0 < R + A) nlinarith [mul_nonneg hB hA]
2 supporting declarations (lemmas, instances)
Population­Singleton 1 core · 3 supporting A class that factors through Boolean labels of VC dimension zero consists of a single function, so its population-localized star hull reduces to one rescaled function. ★ vcPopulation_localizedRademacher_dim_zero

Population-localized classes of VC dimension zero

A class that factors through Boolean labels of VC dimension zero consists of a single function, so its population-localized star hull reduces to one rescaled function. For a single function g the Rademacher complexity is at most ‖g‖_{L²(P)} / √n: the second moment of a Rademacher sum is the sum of squares, and Jensen's inequality passes from the empirical to the population norm.

Main results

* vcPopulation_dim_zero_eq — all members of a class of VC dimension zero coincide. * constantClass_empiricalRademacher_le_empiricalNorm_div_sqrt, population_singletonRademacher_le — the empirical and population bounds for one function. * vcPopulation_localizedRademacher_dim_zero — the population-localized Rademacher complexity of a class of VC dimension zero is at most r / √n.

lemma vcPopulation_localizedRademacher_dim_zero reviewed
Causalean.Stat.Concentration

Under a probability law P, let a nonempty class of measurable functions be bounded in absolute value by b ≥ 0 and factor through Boolean labels of VC dimension zero. Then for every radius r ≥ 0 and positive sample size n, the Rademacher complexity of the star hull localized to L²(P)-norm at most r is at most r / √n.

Formal statement
𝒳 :
Type u_1
shared
ι :
Type u_2
Nonempty ι
shared
F :
ι → 𝒳 → ℝ
hmeas :
∀ i, Measurable (F i)
b r :
ℝ
hb :
0 ≤ b
hbound :
∀ i x, |F i x| ≤ b
hr :
0 ≤ r
n :
ℕ
hn :
0 < n
localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r
≤ r / sqrt (n : ℝ)
Proof (Lean source)
lemma vcPopulation_localizedRademacher_dim_zero [Nonempty ι] (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) (hmeas : ∀ i, Measurable (F i)) {b r : ℝ} (hb : 0 ≤ b) (hbound : ∀ i x, |F i x| ≤ b) (hr : 0 ≤ r) (n : ℕ) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F 0) : localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r ≤ r / sqrt (n : ℝ) := by classical let i₀ : ι := Classical.arbitrary ι let g := populationLocalizedRepresentative P F r i₀ have hF : F = fun _ => F i₀ := by funext i exact vcPopulation_dim_zero_eq F Hvc i i₀ have hG : populationLocalizedRepresentative P F r = fun _ => g := by rw [hF] rfl have heq : localRademacherComplexity F (fun f => measureL2Dist P f (fun _ => 0)) P id n r = rademacherComplexity n (fun _ : Unit => g) P id := by unfold localRademacherComplexity rademacherComplexity simp only [Function.id_comp] apply integral_congr_ae apply ae_of_all intro S rw [population_empiricalRademacher_eq_representative P F hb hbound S, hG] simp [empiricalRademacherComplexity] rw [heq] exact (population_singletonRademacher_le P g (populationLocalizedRepresentative_measurable P F hmeas r i₀) hb (populationLocalizedRepresentative_bound P F hbound i₀) n hn).trans (div_le_div_of_nonneg_right (populationLocalizedRepresentative_radius P F hr i₀) (Real.sqrt_nonneg _))
3 supporting declarations (lemmas, instances)
  • vcPopulation_dim_zero_eq lemma — If a function class factors through Boolean labels of VC dimension zero, then any two of its members are the same function.
    𝒳 :
    Type u_1
    shared
    ι :
    Type u_2
    shared
    F :
    ι → 𝒳 → ℝ
    i j :
    ι
    F i = F j
    Proof (Lean source)
    lemma vcPopulation_dim_zero_eq (F : ι → 𝒳 → ℝ) (Hvc : BinaryFactoredVCClass F 0) (i j : ι) : F i = F j := by classical funext x let S : Fin 1 → 𝒳 := fun _ => x have hcard : (growthFamily Hvc.π S).card ≤ 1 := by simpa using growthFamily_card_le_succ_pow_of_trace Hvc.π 0 1 (inl Hvc.vcDim_le) S have hpattern : restrictionPattern (Hvc.π i) S = restrictionPattern (Hvc.π j) S := Finset.card_le_one.mp hcard _ (mem_growthFamily_iff.mpr ⟨i, rfl⟩) _ (mem_growthFamily_iff.mpr ⟨j, rfl⟩) have hlabel : Hvc.π i x = Hvc.π j x := by apply Bool.eq_iff_iff.mpr change Hvc.π i (S 0) = true ↔ Hvc.π j (S 0) = true rw [← restrictionPattern_mem_iff, hpattern, restrictionPattern_mem_iff] obtain ⟨φ, hφ⟩ := Hvc.factor S calc F i x = φ 0 (Hvc.π i x) := hφ i 0 _ = φ 0 (Hvc.π j x) := by rw [hlabel] _ = F j x := (hφ j 0).symm
    Causalean.Stat.Concentration.vcPopulation_dim_zero_eq · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/PopulationSingleton.lean:38
  • constantClass_empiricalRademacher_le_empiricalNorm_div_sqrt lemma — For a positive sample size and a sample, the empirical Rademacher complexity of the class whose every member is one fixed function g satisfies R̂_n({g}) ≤ ‖g‖_n / √n, where ‖g‖_n is the empirical L² norm of g on the sample.
    𝒳 :
    Type u_1
    shared
    ι :
    Type u_2
    Nonempty ι
    shared
    g :
    𝒳 → ℝ
    n :
    ℕ
    hn :
    0 < n
    S :
    Fin n → 𝒳
    empiricalRademacherComplexity n (fun _ : ι => g) S ≤ empiricalNorm S g / sqrt (n : ℝ)
    Proof (Lean source)
    lemma constantClass_empiricalRademacher_le_empiricalNorm_div_sqrt [Nonempty ι] (g : 𝒳 → ℝ) {n : ℕ} (hn : 0 < n) (S : Fin n → 𝒳) : empiricalRademacherComplexity n (fun _ : ι => g) S ≤ empiricalNorm S g / sqrt (n : ℝ) := by classical let : Nonempty (Signs n) := ⟨fun _ => ⟨1, by simp⟩⟩ have hc : 0 < (card (Signs n) : ℝ) := by exact_mod_cast Fintype.card_pos (α := Signs n) let v : Fin n → ℝ := fun k => (n : ℝ)⁻¹ * g (S k) let Z : Signs n → ℝ := fun σ => ∑ k : Fin n, (σ k : ℝ) * v k have hpair : ∀ k l : Fin n, (∑ σ : Signs n, (σ k : ℝ) * (σ l : ℝ)) = if k = l then (card (Signs n) : ℝ) else 0 := by intro k l by_cases hkl : k = l · subst l have hdiag : ∀ σ : Signs n, (σ k : ℝ) * (σ k : ℝ) = 1 := by intro σ nlinarith [abs_sigma (σ k), sq_abs (σ k : ℝ)] simp [hdiag] · simp [hkl, rademacher_orthogonality n k l hkl] have hsecond : (∑ σ : Signs n, Z σ ^ 2) = (card (Signs n) : ℝ) * ∑ k : Fin n, v k ^ 2 := by calc _ = ∑ σ : Signs n, ∑ k : Fin n, ∑ l : Fin n, ((σ k : ℝ) * (σ l : ℝ)) * (v k * v l) := by apply Finset.sum_congr rfl intro σ _ simp only [Z, pow_two, Finset.sum_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro k _ apply Finset.sum_congr rfl intro l _ ring _ = ∑ k : Fin n, ∑ l : Fin n, (∑ σ : Signs n, (σ k : ℝ) * (σ l : ℝ)) * (v k * v l) := by rw [Finset.sum_comm] apply Finset.sum_congr rfl intro k _ rw [Finset.sum_comm] simp only [Finset.sum_mul] _ = _ := by simp [hpair, Finset.mul_sum, pow_two] have hCS := Real.sum_mul_le_sqrt_mul_sqrt (Finset.univ : Finset (Signs n)) (fun σ => |Z σ|) (fun _ => (1 : ℝ)) have habs : (∑ σ : Signs n, |Z σ|) ≤ (card (Signs n) : ℝ) * sqrt (∑ k : Fin n, v k ^ 2) := by simpa only [mul_one, sq_abs, Finset.sum_const, one_pow, Finset.card_univ, nsmul_eq_mul, hsecond, Real.sqrt_mul hc.le, mul_one, mul_right_comm (sqrt (card (Signs n))), ← mul_assoc, Real.mul_self_sqrt hc.le] using hCS calc _ = (card (Signs n) : ℝ)⁻¹ * ∑ σ : Signs n, |Z σ| := by simp only [empiricalRademacherComplexity, ciSup_const] congr 1 apply Finset.sum_congr rfl intro σ _ congr 1 simp only [Z, v, Finset.mul_sum] apply Finset.sum_congr rfl intro k _ ring _ ≤ sqrt (∑ k : Fin n, v k ^ 2) := by calc _ ≤ (card (Signs n) : ℝ)⁻¹ * ((card (Signs n) : ℝ) * sqrt (∑ k : Fin n, v k ^ 2)) := mul_le_mul_of_nonneg_left habs (inv_nonneg.mpr hc.le) _ = _ := by rw [← mul_assoc, inv_mul_cancel₀ hc.ne', one_mul] _ = empiricalNorm S g / sqrt (n : ℝ) := by rw [← sqrt_sum_inv_abs_sq_eq_empiricalNorm_div_sqrt hn S g] simp only [v, mul_pow, sq_abs]
    Causalean.Stat.Concentration.constantClass_empiricalRademacher_le_empiricalNorm_div_sqrt · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/PopulationSingleton.lean:63
  • population_singletonRademacher_le lemma — Under a probability law P, for a measurable function g bounded in absolute value by b ≥ 0 and a positive sample size n, the Rademacher complexity of the one-function class {g} over n independent draws from P is at most ‖g‖_{L²(P)} / √n.
    𝒳 :
    Type u_1
    shared
    g :
    𝒳 → ℝ
    hmeas :
    b :
    ℝ
    hb :
    0 ≤ b
    hbound :
    ∀ x, |g x| ≤ b
    n :
    ℕ
    hn :
    0 < n
    rademacherComplexity n (fun _ : Unit => g) P id
    ≤ measureL2Dist P g (fun _ => 0) / sqrt (n : ℝ)
    Proof (Lean source)
    lemma population_singletonRademacher_le (P : Measure 𝒳) [IsProbabilityMeasure P] (g : 𝒳 → ℝ) (hmeas : Measurable g) {b : ℝ} (hb : 0 ≤ b) (hbound : ∀ x, |g x| ≤ b) (n : ℕ) (hn : 0 < n) : rademacherComplexity n (fun _ : Unit => g) P id ≤ measureL2Dist P g (fun _ => 0) / sqrt (n : ℝ) := by let μ := Measure.pi (fun _ : Fin n => P) have hTmeas : Measurable (fun S : Fin n → 𝒳 => empiricalNorm S g) := by unfold empiricalNorm fun_prop have hTint : Integrable (fun S : Fin n → 𝒳 => empiricalNorm S g) μ := Integrable.of_mem_Icc 0 b hTmeas.aemeasurable (ae_of_all _ fun S => ⟨Real.sqrt_nonneg _, empiricalNorm_le_of_envelope (fun _ : Unit => g) hb (fun _ => hbound) S ()⟩) have hsqInt : Integrable (fun x => g x ^ 2) P := Integrable.of_mem_Icc 0 (b ^ 2) (hmeas.pow_const 2).aemeasurable (ae_of_all _ fun x => ⟨sq_nonneg _, by simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg (g x)) (hbound x) 2⟩) have hmean : (∫ S, empiricalNorm S g ∂μ) ≤ measureL2Dist P g (fun _ => 0) := by simpa only [measureL2Dist, sub_zero] using Causalean.Stat.expected_empiricalNorm_le P hn g hmeas hsqInt have hRint : Integrable (fun S => empiricalRademacherComplexity n (fun _ : Unit => g) S) μ := Integrable.of_mem_Icc 0 b (empiricalRademacherComplexity_measurable_countable (fun _ : Unit => g) (fun _ => hmeas) n).aemeasurable (ae_of_all _ fun S => empiricalRademacherComplexity_mem_Icc (fun _ : Unit => g) hb (fun _ => hbound) n S) calc _ ≤ ∫ S, empiricalNorm S g / sqrt (n : ℝ) ∂μ := by simpa only [rademacherComplexity, Function.id_comp, μ] using integral_mono hRint (hTint.div_const _) (constantClass_empiricalRademacher_le_empiricalNorm_div_sqrt g hn) _ = (∫ S, empiricalNorm S g ∂μ) / sqrt (n : ℝ) := integral_div _ _ _ ≤ _ := div_le_div_of_nonneg_right hmean (Real.sqrt_nonneg _)
    Causalean.Stat.Concentration.population_singletonRademacher_le · Causalean/Stat/Concentration/Covering/VCLocalizedRegime/PopulationSingleton.lean:138
Rademacher­Bounds 3 core · 11 supporting This file combines Boolean trace-cardinality control with a finite-class Massart bound to prove samplewise linear bounds for the star-hull-zeroed class. ★ vcLocalizedEnvelope

Localized finite-VC Rademacher bounds

This file combines Boolean trace-cardinality control with a finite-class Massart bound to prove samplewise linear bounds for the star-hull-zeroed class. It lifts those bounds to population Rademacher envelopes and constructs the LocalizedRegime packages consumed by localized uniform-deviation theorems.

theorem vcLocalizedEnvelope reviewed
Causalean.Stat.Concentration

For a function class, localization norm, probability space, and observation map, a tuning constant, VC-dimension bound, and sample size, a tuning constant at least one, positive sample size, a binary factorization with the stated VC bound, and the samplewise localization certificate, the finite-VC envelope is star-shaped, bounds the localized population Rademacher complexity, and yields both the stated critical-radius and squared-rate bounds.

Formal statement
Ω :
Type u_1
shared
ι :
Type u
shared
𝒳 :
Type v
shared
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
μ :
X :
Ω → 𝒳
K :
ℝ
d n :
ℕ
hK :
(1 : ℝ) ≤ K
hn :
0 < n
conclusion 2
RademacherUpperBound F norm μ X n (vcLocalizedPsi K d n)
conclusion 3
conclusion 4
≤ 36 * ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ))
Proof (Lean source)
theorem vcLocalizedEnvelope (F : ι → 𝒳 → ℝ) (norm : (𝒳 → ℝ) → ℝ) (μ : Measure Ω) (X : Ω → 𝒳) [IsProbabilityMeasure μ] (K : ℝ) (d n : ℕ) (hK : (1 : ℝ) ≤ K) (hn : 0 < n) (Hvc : BinaryFactoredVCClass F d) (Hloc : SamplewiseLocalizedVCDudleyHypotheses F norm) : IsStarShapedEnvelope (vcLocalizedPsi K d n) ∧ RademacherUpperBound F norm μ X n (vcLocalizedPsi K d n) ∧ criticalRadius (vcLocalizedPsi K d n) ≤ vcLocalizedSlope K d n ∧ (criticalRadius (vcLocalizedPsi K d n)) ^ 2 ≤ 36 * ((K * (d : ℝ) * log ((n : ℝ) + 1) + 1) / (n : ℝ)) := by refine ⟨vcLocalizedPsi_isStarShapedEnvelope K d n, ?_, ?_, ?_⟩ · exact vcLocalizedRademacherUpperBound F norm μ X K d n hK Hvc Hloc · exact criticalRadius_vcLocalizedPsi_le (le_trans zero_le_one hK) hn · exact criticalRadius_vcLocalizedPsi_sq_le_rate (le_trans zero_le_one hK) hn
def vcLocalizedRegime reviewed
Causalean.Stat.Concentration

Given a real-valued function class, a function norm, a probability measure, an observation map, a uniform bound that is nonnegative and bounds every function value at every observed point, variance controlled by the squared localization norm, a tuning constant, a VC-dimension bound, a tuning constant at least one, a binary factorization with VC dimension at most the stated bound, and the samplewise localization certificate, the localized-regime package consists of this bound and the finite-VC localized envelope with its star-shaped-envelope and Rademacher upper-bound guarantees.

Definition (Lean source)
Ω :
Type u_1
shared
ι :
Type u
shared
𝒳 :
Type v
shared
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
μ :
X :
Ω → 𝒳
b :
ℝ
hb :
0 ≤ b
hbound :
∀ i ω, |F i (X ω)| ≤ b
hvariance :
∀ i, variance (fun ω => F i (X ω)) μ ≤ norm (F i) ^ 2
K :
ℝ
d :
ℕ
hK :
(1 : ℝ) ≤ K
vcLocalizedRegime F norm μ X b hb hbound hvariance K d hK Hvc Hloc :
LocalizedRegime Ω ι 𝒳 F norm μ X
clause 1
b := b
clause 2
b_nonneg := hb
clause 3
bound := hbound
clause 4
variance_proxy := hvariance
clause 5
ψ := fun n => vcLocalizedPsi K d n
clause 6
ψ_isStarShapedEnvelope := fun n => vcLocalizedPsi_isStarShapedEnvelope K d n
clause 7
ψ_ub := fun n => vcLocalizedRademacherUpperBound F norm μ X K d n hK Hvc Hloc
def vcLocalizedRegime_of_card reviewed
Causalean.Stat.Concentration

Given a real-valued function class, a function norm, a Boolean factorization family, a probability measure, an observation map, a uniform bound that is nonnegative and bounds every function value at every observed point, variance controlled by the squared localization norm, a factorization of each finite-sample function value through its Boolean label, a tuning constant, a trace-growth exponent, a tuning constant at least one, a polynomial bound on every finite-sample trace-family cardinality, and the samplewise localization certificate, the localized-regime package consists of this bound and the localized envelope obtained from the direct trace-cardinality bound.

Definition (Lean source)
Ω :
Type u_1
shared
ι :
Type u
shared
𝒳 :
Type v
shared
F :
ι → 𝒳 → ℝ
norm :
(𝒳 → ℝ) → ℝ
π :
ι → 𝒳 → Bool
μ :
X :
Ω → 𝒳
b :
ℝ
hb :
0 ≤ b
hbound :
∀ i ω, |F i (X ω)| ≤ b
hvariance :
∀ i, variance (fun ω => F i (X ω)) μ ≤ norm (F i) ^ 2
hfactor :
∀ {m : ℕ} (S : Fin m → 𝒳), ∃ φ : Fin m → Bool → ℝ, ∀ i j, F i (S j) = φ j (π i (S j))
K :
ℝ
dPi :
ℕ
hK :
(1 : ℝ) ≤ K
hcard :
∀ (m : ℕ) (S : Fin m → 𝒳), (growthFamily π S).card ≤ (m + 1) ^ dPi
vcLocalizedRegime_of_card F norm π μ X b hb hbound hvariance hfactor K dPi hK hcard Hloc :
LocalizedRegime Ω ι 𝒳 F norm μ X
clause 1
b := b
clause 2
b_nonneg := hb
clause 3
bound := hbound
clause 4
variance_proxy := hvariance
clause 5
ψ := fun n => vcLocalizedPsi K dPi n
clause 6
ψ_isStarShapedEnvelope := fun n => vcLocalizedPsi_isStarShapedEnvelope K dPi n
clause 7
ψ_ub := fun n
=> vcLocalizedRademacherUpperBound_of_card F norm π μ X hfactor K dPi n hK hcard Hloc
11 supporting declarations (lemmas, instances)