Stat.Concentration.VC
Uniform entropy and maximal inequalities for VC-type classes of real functions.
Basic 7 core · 3 supporting This module gives a finite-trace definition of pseudo-dimension, an explicit L²(Q) covering predicate, and the uniform polynomial entropy theorem for a bounded measurable VC-subgraph class. ★ real_vcSubgraph_l2_covering
Real-valued VC-subgraph covering: core definitions
This module gives a finite-trace definition of pseudo-dimension, an explicit
L²(Q) covering predicate, and the uniform polynomial entropy theorem for a
bounded measurable VC-subgraph class. The definitions deliberately quantify
over an arbitrary probability measure; the finite-sample bridge is developed
in Empirical.
Given a real-valued function class on an observation space, a class index, and an observation-threshold pair, the strict subgraph classifier returns true exactly when the threshold is strictly below the selected function's value at the observation.
Definition (Lean source)
Given a real-valued function class on an observation space and a nonnegative integer , the pseudo-dimension-at-most- property holds exactly when, for every finite collection of observation-threshold pairs, the VC dimension of the strict-subgraph labelings induced by the class on that collection is at most .
Definition (Lean source)
Given a measure on an observation space and two real-valued functions on that space, their measure-based semidistance is .
Definition (Lean source)
Given a measure on an observation space, a real-valued function class, a radius , and a finite set of class indices, the open cover property holds exactly when every class member lies at strictly less than distance from a member indexed by that finite set.
Definition (Lean source)
Given a measure on an observation space, a real-valued function class, a radius , and a nonnegative integer , the covering-number-at-most- property holds exactly when there is a finite set of at most class indices that forms an open cover at radius .
Definition (Lean source)
Given a nonnegative integer and a real number , the explicit VC-subgraph cover bound is the least integer no smaller than .
Definition (Lean source)
Polynomial L²(Q) covering number from a pseudo-dimension bound. For a family of measurable real-valued functions of pseudo-dimension at most d, uniformly bounded by a positive envelope U, and a relative radius ε with 0 < ε ≤ 1, the L²(Q) covering number at radius ε·U is at most vcSubgraphCoverBound d ε, uniformly over every probability measure Q on the domain.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
hasPseudoDimAtMost_iff_growthFamilytheorem — For a real-valued function class and a dimension bound, having pseudo-dimension at most that bound is equivalent to bounding every finite threshold-trace VC dimension.hypotheses𝒳 :sharedType uι :sharedType vF :ι → 𝒳 → ℝd :ℕconclusionProof (Lean source)
theorem hasPseudoDimAtMost_iff_growthFamily (F : ι → 𝒳 → ℝ) (d : ℕ) : HasPseudoDimAtMost F d ↔ ∀ (n : ℕ) (T : Fin n → 𝒳 × ℝ), (growthFamily (subgraphClassifier F) T).vcDim ≤ d := by rfl -
coarse_vc_weightedHamming_packing_card_letheorem — Given a VC-dimension bound, nonnegative coordinate weights, a scale and positive separation below that scale, a bound on the total weight, and a finite Boolean class with that VC bound and pairwise weighted-Hamming separation, the class has the stated coarse explicit polynomial packing bound.hypothesesn :ℕd :ℕw :Fin n → ℝhw :∀ j, 0 ≤ w jr ε :ℝhε :0 < εhεr :ε ≤ rhwsum :∑ j, w j ≤ r ^ 2hsep :∀ a ∈ P, ∀ b ∈ P, a ≠ b → ε ^ 2 ≤ weightedHammingSq w a bconclusionP.card ≤ ceil ((16 * r ^ 2 / ε ^ 2) ^ (2 * (d + 1)))Proof (Lean source)
theorem coarse_vc_weightedHamming_packing_card_le {n : ℕ} (d : ℕ) (w : Fin n → ℝ) (hw : ∀ j, 0 ≤ w j) (r ε : ℝ) (hε : 0 < ε) (hεr : ε ≤ r) (hwsum : ∑ j, w j ≤ r ^ 2) (P : Finset (Fin n → Bool)) (hvc : (P.image (fun a => Finset.univ.filter (fun j => a j = true))).vcDim ≤ d) (hsep : ∀ a ∈ P, ∀ b ∈ P, a ≠ b → ε ^ 2 ≤ weightedHammingSq w a b) : P.card ≤ ceil ((16 * r ^ 2 / ε ^ 2) ^ (2 * (d + 1))) := by classical let B : ℝ := 16 * r ^ 2 / ε ^ 2 have hr : 0 < r := hε.trans_le hεr have hx : 1 ≤ r ^ 2 / ε ^ 2 := by have hdiv : 1 ≤ r / ε := (one_le_div hε).2 hεr rw [← div_pow] nlinarith [sq_nonneg (r / ε)] have hB : 16 ≤ B := by dsimp [B] calc 16 ≤ 16 * (r ^ 2 / ε ^ 2) := by nlinarith _ = 16 * r ^ 2 / ε ^ 2 := by ring have hBpos : 0 < B := lt_of_lt_of_le (by norm_num) hB have hpow_one : 1 ≤ B ^ (2 * (d + 1)) := by exact one_le_pow₀ (by linarith) by_cases hsmall : P.card ≤ 1 · apply (Nat.cast_le (α := ℝ)).mp have hsmall' : (P.card : ℝ) ≤ 1 := by exact_mod_cast hsmall exact hsmall'.trans (hpow_one.trans (Nat.le_ceil _)) have hPcard : 2 ≤ P.card := by omega obtain ⟨m, J, hm, hvcJ, hinj⟩ := exists_separating_subsample d w hw r ε hr hε hwsum P hPcard hvc hsep have hcard_image : (P.image (subsamplePattern J)).card = P.card := Finset.card_image_of_injOn hinj have hcard_sum : P.card ≤ ∑ k ∈ Iic d, m.choose k := by rw [← hcard_image] exact card_growthFamily_le_sum_choose (P.image (subsamplePattern J)) hvcJ by_cases hd0 : d = 0 · have : P.card ≤ 1 := by rw [hd0, show Iic 0 = {0} by ext k; simp] at hcard_sum simpa using hcard_sum omega have hd : 0 < d := Nat.pos_of_ne_zero hd0 have hreal_goal : (P.card : ℝ) ≤ B ^ (2 * (d + 1)) := by by_cases hdm : d ≤ m · have hcard_scaled : (P.card : ℝ) ≤ (4 * (m : ℝ) / (d : ℝ)) ^ d := by have hc : (P.card : ℝ) ≤ ((∑ k ∈ Iic d, m.choose k : ℕ) : ℝ) := by exact_mod_cast hcard_sum exact hc.trans (sum_choose_le_four_mul_div_pow hd hdm) let L : ℝ := log (P.card) have hPpos : 0 < (P.card : ℝ) := by positivity have hmpos : 0 < m := lt_of_lt_of_le hd hdm have hbase_pos : 0 < 4 * (m : ℝ) / (d : ℝ) := by positivity have hlog_card : L ≤ (d : ℝ) * log (4 * (m : ℝ) / (d : ℝ)) := by calc L ≤ log ((4 * (m : ℝ) / (d : ℝ)) ^ d) := Real.log_le_log hPpos hcard_scaled _ = (d : ℝ) * log (4 * (m : ℝ) / (d : ℝ)) := Real.log_pow _ _ have htangent : log (4 * (m : ℝ) / (d : ℝ)) ≤ (4 * (m : ℝ) / (d : ℝ)) / B + log B - 1 := by have hratio : 0 < (4 * (m : ℝ) / (d : ℝ)) / B := by positivity have h := Real.log_le_sub_one_of_pos hratio rw [Real.log_div (ne_of_gt hbase_pos) (ne_of_gt hBpos)] at h linarith have hm' : (m : ℝ) ≤ 1 + (2 * r ^ 2 / ε ^ 2) * L := by simpa [L] using hm have hratio_bound : (4 * (m : ℝ) / (d : ℝ)) / B ≤ 1 / (4 * (d : ℝ)) + L / (2 * (d : ℝ)) := by dsimp [B] have hdreal : 0 < (d : ℝ) := by positivity have hscale : 0 < 4 / ((d : ℝ) * (16 * r ^ 2 / ε ^ 2)) := by positivity have := mul_le_mul_of_nonneg_left hm' hscale.le calc (4 * (m : ℝ) / (d : ℝ)) / (16 * r ^ 2 / ε ^ 2) = (4 / ((d : ℝ) * (16 * r ^ 2 / ε ^ 2))) * (m : ℝ) := by field_simp _ ≤ (4 / ((d : ℝ) * (16 * r ^ 2 / ε ^ 2))) * (1 + (2 * r ^ 2 / ε ^ 2) * L) := this _ = 1 / (4 * (d : ℝ)) * (ε ^ 2 / r ^ 2) + L / (2 * (d : ℝ)) := by field_simp; ring _ ≤ 1 / (4 * (d : ℝ)) + L / (2 * (d : ℝ)) := by have heps : ε ^ 2 / r ^ 2 ≤ 1 := by rw [div_le_one (sq_pos_of_pos hr)] nlinarith [sq_nonneg (r - ε)] have hcoef : 0 ≤ 1 / (4 * (d : ℝ)) := by positivity nlinarith [mul_le_mul_of_nonneg_left heps hcoef] have hL : L ≤ 2 * (d : ℝ) * log B := by have hdreal : 0 < (d : ℝ) := by positivity have hstep := hlog_card.trans (mul_le_mul_of_nonneg_left htangent (by positivity : 0 ≤ (d : ℝ))) have hstep' : L ≤ (d : ℝ) * (1 / (4 * (d : ℝ)) + L / (2 * (d : ℝ)) + log B - 1) := hstep.trans (mul_le_mul_of_nonneg_left (by linarith [hratio_bound]) (by positivity)) have hd_one : (1 : ℝ) ≤ d := by exact_mod_cast Nat.succ_le_iff.mpr hd have hstep'' : L ≤ 1 / 4 + L / 2 + (d : ℝ) * log B - (d : ℝ) := by convert hstep' using 1 <;> field_simp nlinarith have hlog_pow : log (B ^ (2 * (d + 1))) = (2 * (d + 1) : ℕ) * log B := Real.log_pow _ _ have hlog_le : L ≤ log (B ^ (2 * (d + 1))) := by rw [hlog_pow] have hlogB : 0 ≤ log B := Real.log_nonneg (by linarith) exact hL.trans (by norm_num [Nat.cast_mul, Nat.cast_add] nlinarith) change log (P.card : ℝ) ≤ log (B ^ (2 * (d + 1))) at hlog_le rw [← Real.exp_log hPpos, ← Real.exp_log (pow_pos hBpos _)] exact Real.exp_le_exp.mpr hlog_le · have hmd : m < d := Nat.lt_of_not_ge hdm have hcard_univ : (P.image (subsamplePattern J)).card ≤ (Finset.univ : Finset (Finset (Fin m))).card := Finset.card_le_univ _ have hcard_two : P.card ≤ 2 ^ m := by rw [hcard_image] at hcard_univ simpa using hcard_univ have htwoB : (2 : ℝ) ≤ B := by linarith calc (P.card : ℝ) ≤ (2 : ℝ) ^ m := by exact_mod_cast hcard_two _ ≤ B ^ m := pow_le_pow_left₀ (by norm_num) htwoB m _ ≤ B ^ (2 * (d + 1)) := by exact pow_le_pow_right₀ (by linarith) (by omega) apply (Nat.cast_le (α := ℝ)).mp exact hreal_goal.trans (Nat.le_ceil _) -
pseudoDim_gives_finite_subgraph_vctheorem — A pseudo-dimension bound for a real-valued class implies that the subgraph labels on any chosen finite thresholded sample have VC dimension at most the same bound.hypothesesconclusionProof (Lean source)
theorem pseudoDim_gives_finite_subgraph_vc {F : ι → 𝒳 → ℝ} {d n : ℕ} (hpdim : HasPseudoDimAtMost F d) (T : Fin n → 𝒳 × ℝ) : (growthFamily (subgraphClassifier F) T).vcDim ≤ d := by exact hpdim n T
Algebra 4 core · 16 supporting This module packages uniform polynomial covering as a reusable certificate and states its finite sum and finite product closures. ★ hasPolynomialL2Cover
Algebraic closure interfaces for polynomial L² entropy
This module packages uniform polynomial covering as a reusable certificate and
states its finite sum and finite product closures. Parametric and indicator
constructions are developed in Parametric.
A class of functions has uniform polynomial L² entropy with envelope U when U is positive, every function in the class is measurable and pointwise bounded in absolute value by U, and the class admits one polynomial covering-number bound, in the relative radius, holding simultaneously for every probability measure and every relative radius in (0,1] .
Definition (Lean source)
Bounded finite-pseudo-dimension classes admit a polynomial L² cover. If a real-valued function class has pseudo-dimension at most d, every member is measurable, and the class is uniformly bounded by a positive envelope U, then the class carries a uniform polynomial L² covering certificate at envelope U.
Formal statement
Proof (Lean source)
A polynomial covering certificate records that the class has the ordinary covering property, the named entropy base is at least one, and that base and the named exponent give the covering bound for every probability law and relative radius.
Definition (Lean source)
Given an observation space, an auxiliary parameter set , an index set depending on the parameter, a parameter-indexed family of real-valued function classes, and a parameter-indexed envelope, the uniform polynomial covering property over holds exactly when there are one real entropy base and one nonnegative-integer exponent such that every parameter's class has the corresponding polynomial covering certificate with its designated envelope.
Definition (Lean source)
16 supporting declarations (lemmas, instances)
-
negtheorem — Negating every member of a polynomial-cover class preserves its envelope and uniform polynomial covering certificate, provided that the original class has such a certificate.hypothesesconclusionHasPolynomialL2Cover (fun i x => -F i x) UProof (Lean source)
theorem HasPolynomialL2Cover.neg {ι : Type v} {F : ι → 𝒳 → ℝ} {U : ℝ} (hF : HasPolynomialL2Cover F U) : HasPolynomialL2Cover (fun i x => -F i x) U := by refine ⟨hF.envelope_pos, fun i => (hF.measurable i).neg, ?_, ?_⟩ · intro i x simpa using hF.envelope i x · obtain ⟨A, p, hA, hent⟩ := hF.entropy refine ⟨A, p, hA, ?_⟩ intro Q hQ ε hε hε1 obtain ⟨C, hCcard, hCcover⟩ := hent Q hQ ε hε hε1 refine ⟨C, hCcard, ?_⟩ intro i obtain ⟨j, hjC, hij⟩ := hCcover i refine ⟨j, hjC, ?_⟩ have heq : measureL2Dist Q (fun x => -F i x) (fun x => -F j x) = measureL2Dist Q (F i) (F j) := by rw [measureL2Dist_eq_lpNorm Q _ _ (hF.measurable i).fun_neg (hF.measurable j).fun_neg, measureL2Dist_eq_lpNorm Q _ _ (hF.measurable i) (hF.measurable j)] have hfun : (fun x => -F i x - -F j x) = -(fun x => F i x - F j x) := by funext x simp only [Pi.neg_apply] ring rw [hfun, lpNorm_neg] rwa [heq] -
addtheorem — If each of two independently indexed classes has a polynomial covering certificate, their pointwise sums have a polynomial covering certificate with the sum of the envelopes.hypotheses𝒳 :sharedType uι :Type vκ :Type wF :ι → 𝒳 → ℝG :κ → 𝒳 → ℝU V :ℝhF :hG :conclusionHasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x + G p.2 x) (U + V)Proof (Lean source)
theorem HasPolynomialL2Cover.add {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {G : κ → 𝒳 → ℝ} {U V : ℝ} (hF : HasPolynomialL2Cover F U) (hG : HasPolynomialL2Cover G V) : HasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x + G p.2 x) (U + V) := by have hU : 0 < U := hF.envelope_pos have hV : 0 < V := hG.envelope_pos refine ⟨by positivity, fun p => (hF.measurable p.1).add (hG.measurable p.2), ?_, ?_⟩ · intro p x exact (abs_add_le _ _).trans (add_le_add (hF.envelope p.1 x) (hG.envelope p.2 x)) · obtain ⟨A, p, hA, hentF⟩ := hF.entropy obtain ⟨B, q, hB, hentG⟩ := hG.entropy refine ⟨8 * A * B, p + q + 2, by nlinarith [mul_nonneg (sub_nonneg.mpr hA) (sub_nonneg.mpr hB)], ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨CF, hCFcard, hCFcover⟩ := hentF Q hQ (ε / 2) hhalf hhalf1 obtain ⟨CG, hCGcard, hCGcover⟩ := hentG Q hQ (ε / 2) hhalf hhalf1 rw [show A / (ε / 2) = 2 * A / ε by field_simp] at hCFcard rw [show B / (ε / 2) = 2 * B / ε by field_simp] at hCGcard classical refine ⟨CF ×ˢ CG, ?_, ?_⟩ · rw [Finset.card_product] exact (Nat.mul_le_mul hCFcard hCGcard).trans (ceil_mul_le_ceil_poly hA hB hε hε1) · intro a obtain ⟨i, hiC, hi⟩ := hCFcover a.1 obtain ⟨j, hjC, hj⟩ := hCGcover a.2 refine ⟨(i, j), Finset.mem_product.mpr ⟨hiC, hjC⟩, ?_⟩ haveI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (fun x => F a.1 x + G a.2 x) (fun x => F i x + G j x) ≤ measureL2Dist Q (F a.1) (F i) + measureL2Dist Q (G a.2) (G j) := measureL2Dist_add_le _ _ _ _ (hF.measurable a.1) (hF.measurable i) (hG.measurable a.2) (hG.measurable j) (hF.envelope a.1) (hF.envelope i) _ < ε * (U + V) := by nlinarith -
multheorem — If each of two independently indexed classes has a polynomial covering certificate, their pointwise products have a polynomial covering certificate with the product of the envelopes.hypotheses𝒳 :sharedType uι :Type vκ :Type wF :ι → 𝒳 → ℝG :κ → 𝒳 → ℝU V :ℝhF :hG :conclusionHasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x * G p.2 x) (U * V)Proof (Lean source)
theorem HasPolynomialL2Cover.mul {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {G : κ → 𝒳 → ℝ} {U V : ℝ} (hF : HasPolynomialL2Cover F U) (hG : HasPolynomialL2Cover G V) : HasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x * G p.2 x) (U * V) := by have hU : 0 < U := hF.envelope_pos have hV : 0 < V := hG.envelope_pos refine ⟨mul_pos hU hV, fun p => (hF.measurable p.1).mul (hG.measurable p.2), ?_, ?_⟩ · intro p x rw [abs_mul] exact mul_le_mul (hF.envelope p.1 x) (hG.envelope p.2 x) (abs_nonneg _) hU.le · obtain ⟨A, p, hA, hentF⟩ := hF.entropy obtain ⟨B, q, hB, hentG⟩ := hG.entropy refine ⟨8 * A * B, p + q + 2, by nlinarith [mul_nonneg (sub_nonneg.mpr hA) (sub_nonneg.mpr hB)], ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨CF, hCFcard, hCFcover⟩ := hentF Q hQ (ε / 2) hhalf hhalf1 obtain ⟨CG, hCGcard, hCGcover⟩ := hentG Q hQ (ε / 2) hhalf hhalf1 rw [show A / (ε / 2) = 2 * A / ε by field_simp] at hCFcard rw [show B / (ε / 2) = 2 * B / ε by field_simp] at hCGcard classical refine ⟨CF ×ˢ CG, ?_, ?_⟩ · rw [Finset.card_product] exact (Nat.mul_le_mul hCFcard hCGcard).trans (ceil_mul_le_ceil_poly hA hB hε hε1) · intro z obtain ⟨i, hiC, hi⟩ := hCFcover z.1 obtain ⟨j, hjC, hj⟩ := hCGcover z.2 refine ⟨(i, j), Finset.mem_product.mpr ⟨hiC, hjC⟩, ?_⟩ haveI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (fun x => F z.1 x * G z.2 x) (fun x => F i x * G j x) ≤ V * measureL2Dist Q (F z.1) (F i) + U * measureL2Dist Q (G z.2) (G j) := measureL2Dist_mul_le _ _ _ _ (hF.measurable z.1) (hF.measurable i) (hG.measurable z.2) (hG.measurable j) hU.le hV.le (hF.envelope z.1) (hF.envelope i) (hG.envelope z.2) (hG.envelope j) _ < ε * (U * V) := by nlinarith -
finSumtheorem — If every class in a nonempty finite family has a polynomial covering certificate, the class of pointwise sums has a polynomial covering certificate with the sum of the envelopes.hypothesesconclusionHasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∑ k, F k (θ k) x) (∑ k, U k)Proof (Lean source)
theorem HasPolynomialL2Cover.finSum {K : Type w} [Fintype K] [Nonempty K] {ι : K → Type v} {F : (k : K) → ι k → 𝒳 → ℝ} {U : K → ℝ} (hF : ∀ k, HasPolynomialL2Cover (F k) (U k)) : HasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∑ k, F k (θ k) x) (∑ k, U k) := by classical let P : ∀ (K : Type w) [Fintype K], Prop := fun K _ => Nonempty K → ∀ (ι : K → Type v) (F : (k : K) → ι k → 𝒳 → ℝ) (U : K → ℝ), (∀ k, HasPolynomialL2Cover (F k) (U k)) → HasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∑ k, F k (θ k) x) (∑ k, U k) refine Fintype.induction_empty_option (P := P) ?_ ?_ ?_ K (inferInstance : Nonempty K) ι F U hF · intro α β _ e ih hβ ι F U hF letI : Fintype α := Fintype.ofEquiv β e.symm let hα : Nonempty α := ⟨e.symm (choice hβ)⟩ have hc := ih hα (fun a => ι (e a)) (fun a => F (e a)) (fun a => U (e a)) (fun a => hF (e a)) let eθ : ((b : β) → ι b) ≃ ((a : α) → ι (e a)) := (Equiv.piCongrLeft ι e).symm have hclass : (fun θ : (b : β) → ι b => fun x => ∑ b, F b (θ b) x) = (fun θ : (b : β) → ι b => fun x => ∑ a, F (e a) (θ (e a)) x) := by funext θ x exact (e.sum_comp (fun b => F b (θ b) x)).symm have hUeq : (∑ b, U b) = ∑ a, U (e a) := (e.sum_comp U).symm rw [hclass, hUeq] simpa [eθ] using hc.reindex eθ · intro h exact isEmptyElim (choice h) · intro α _ ih _ ι F U hF by_cases hα : Nonempty α · have htail := ih hα (fun a => ι (some a)) (fun a => F (some a)) (fun a => U (some a)) (fun a => hF (some a)) have hadd := (hF none).add htail let split : ((k : Option α) → ι k) ≃ (ι none × ((a : α) → ι (some a))) := { toFun := fun θ => (θ none, fun a => θ (some a)) invFun := fun p k => Option.rec p.1 p.2 k left_inv := fun θ => by funext k; cases k <;> rfl right_inv := fun p => by cases p; rfl } simp only [Fintype.sum_option] exact hadd.reindex split · letI : IsEmpty α := not_nonempty_iff.mp hα let single : ((k : Option α) → ι k) ≃ ι none := { toFun := fun θ => θ none invFun := fun i k => Option.rec i (fun a => isEmptyElim a) k left_inv := fun θ => by funext k; cases k with | none => rfl | some a => exact isEmptyElim a right_inv := fun i => rfl } simp only [Fintype.sum_option, Finset.univ_eq_empty, Finset.sum_empty, add_zero] exact (hF none).reindex single -
finProdtheorem — If every class in a nonempty finite family has a polynomial covering certificate, the class of pointwise products has a polynomial covering certificate with the product of the envelopes.hypothesesconclusionHasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∏ k, F k (θ k) x) (∏ k, U k)Proof (Lean source)
theorem HasPolynomialL2Cover.finProd {K : Type w} [Fintype K] [Nonempty K] {ι : K → Type v} {F : (k : K) → ι k → 𝒳 → ℝ} {U : K → ℝ} (hF : ∀ k, HasPolynomialL2Cover (F k) (U k)) : HasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∏ k, F k (θ k) x) (∏ k, U k) := by classical let P : ∀ (K : Type w) [Fintype K], Prop := fun K _ => Nonempty K → ∀ (ι : K → Type v) (F : (k : K) → ι k → 𝒳 → ℝ) (U : K → ℝ), (∀ k, HasPolynomialL2Cover (F k) (U k)) → HasPolynomialL2Cover (fun θ : (k : K) → ι k => fun x => ∏ k, F k (θ k) x) (∏ k, U k) refine Fintype.induction_empty_option (P := P) ?_ ?_ ?_ K (inferInstance : Nonempty K) ι F U hF · intro α β _ e ih hβ ι F U hF letI : Fintype α := Fintype.ofEquiv β e.symm let hα : Nonempty α := ⟨e.symm (choice hβ)⟩ have hc := ih hα (fun a => ι (e a)) (fun a => F (e a)) (fun a => U (e a)) (fun a => hF (e a)) let eθ : ((b : β) → ι b) ≃ ((a : α) → ι (e a)) := (Equiv.piCongrLeft ι e).symm have hclass : (fun θ : (b : β) → ι b => fun x => ∏ b, F b (θ b) x) = (fun θ : (b : β) → ι b => fun x => ∏ a, F (e a) (θ (e a)) x) := by funext θ x exact (e.prod_comp (fun b => F b (θ b) x)).symm have hUeq : (∏ b, U b) = ∏ a, U (e a) := (e.prod_comp U).symm rw [hclass, hUeq] simpa [eθ] using hc.reindex eθ · intro h exact isEmptyElim (choice h) · intro α _ ih _ ι F U hF by_cases hα : Nonempty α · have htail := ih hα (fun a => ι (some a)) (fun a => F (some a)) (fun a => U (some a)) (fun a => hF (some a)) have hmul := (hF none).mul htail let split : ((k : Option α) → ι k) ≃ (ι none × ((a : α) → ι (some a))) := { toFun := fun θ => (θ none, fun a => θ (some a)) invFun := fun p k => Option.rec p.1 p.2 k left_inv := fun θ => by funext k; cases k <;> rfl right_inv := fun p => by cases p; rfl } simp only [Fintype.prod_option] exact hmul.reindex split · letI : IsEmpty α := not_nonempty_iff.mp hα let single : ((k : Option α) → ι k) ≃ ι none := { toFun := fun θ => θ none invFun := fun i k => Option.rec i (fun a => isEmptyElim a) k left_inv := fun θ => by funext k; cases k with | none => rfl | some a => exact isEmptyElim a right_inv := fun i => rfl } simp only [Fintype.prod_option, Finset.univ_eq_empty, Finset.prod_empty, mul_one] exact (hF none).reindex single -
forgettheorem — A named polynomial-cover certificate implies the corresponding ordinary polynomial-cover certificate.hypothesesconclusionProof (Lean source)
theorem HasPolynomialL2CoverWith.forget {ι : Type v} {F : ι → 𝒳 → ℝ} {U A : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F U A p) : HasPolynomialL2Cover F U := hF.toHasPolynomialL2Cover -
monoEnvelopetheorem — Given named polynomial-cover witnesses and an enlarged envelope, the larger envelope preserves those witnesses.hypotheses𝒳 :sharedType uι :Type vι → 𝒳 → ℝU V A :ℝp :ℕhF :HasPolynomialL2CoverWith F U A phUV :U ≤ VconclusionHasPolynomialL2CoverWith F V A pProof (Lean source)
-- @node: HasPolynomialL2CoverWith.monoEnvelope theorem HasPolynomialL2CoverWith.monoEnvelope {ι : Type v} {F : ι → 𝒳 → ℝ} {U V A : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F U A p) (hUV : U ≤ V) : HasPolynomialL2CoverWith F V A p := by have hV : 0 < V := hF.forget.envelope_pos.trans_le hUV refine ⟨⟨hV, hF.forget.measurable, fun i x => (hF.forget.envelope i x).trans hUV, A, p, hF.one_le_base, ?_⟩, hF.one_le_base, ?_⟩ <;> intro Q hQ ε hε hε1 · obtain ⟨C, hCcard, hCcover⟩ := hF.entropy Q hQ ε hε hε1 refine ⟨C, hCcard, fun i => ?_⟩ obtain ⟨j, hjC, hij⟩ := hCcover i exact ⟨j, hjC, hij.trans_le (mul_le_mul_of_nonneg_left hUV hε.le)⟩ · obtain ⟨C, hCcard, hCcover⟩ := hF.entropy Q hQ ε hε hε1 refine ⟨C, hCcard, fun i => ?_⟩ obtain ⟨j, hjC, hij⟩ := hCcover i exact ⟨j, hjC, hij.trans_le (mul_le_mul_of_nonneg_left hUV hε.le)⟩ -
hasPolynomialL2CoverWiththeorem — If a class has bounded pseudo-dimension, its functions are measurable, and a positive envelope bounds the class pointwise, then the class has explicit named polynomial-cover witnesses.hypotheses𝒳 :sharedType uι :Type vNonempty ιι → 𝒳 → ℝd :ℕU :ℝhpdim :hmeas :∀ i, Measurable (F i)hU :0 < Uhenvelope :∀ i x, |F i x| ≤ UconclusionHasPolynomialL2CoverWith F U 16 (8 * (d + 1))Proof (Lean source)
theorem HasPseudoDimAtMost.hasPolynomialL2CoverWith {ι : Type v} [Nonempty ι] {F : ι → 𝒳 → ℝ} {d : ℕ} {U : ℝ} (hpdim : HasPseudoDimAtMost F d) (hmeas : ∀ i, Measurable (F i)) (hU : 0 < U) (henvelope : ∀ i x, |F i x| ≤ U) : HasPolynomialL2CoverWith F U 16 (8 * (d + 1)) := by refine ⟨hpdim.hasPolynomialL2Cover hmeas hU henvelope, by norm_num, ?_⟩ intro Q hQ ε hε hε1 letI : IsProbabilityMeasure Q := hQ simpa only [vcSubgraphCoverBound] using (real_vcSubgraph_l2_covering F d hmeas hpdim hU hε hε1 henvelope Q) -
negtheorem — Named polynomial-cover witnesses for a class also witness the same bound for its pointwise negation.hypothesesconclusionHasPolynomialL2CoverWith (fun i x => -F i x) U A pProof (Lean source)
theorem HasPolynomialL2CoverWith.neg {ι : Type v} {F : ι → 𝒳 → ℝ} {U A : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F U A p) : HasPolynomialL2CoverWith (fun i x => -F i x) U A p := by refine ⟨hF.forget.neg, hF.one_le_base, ?_⟩ intro Q hQ ε hε hε1 obtain ⟨C, hCcard, hCcover⟩ := hF.entropy Q hQ ε hε hε1 refine ⟨C, hCcard, ?_⟩ intro i obtain ⟨j, hjC, hij⟩ := hCcover i refine ⟨j, hjC, ?_⟩ have heq : measureL2Dist Q (fun x => -F i x) (fun x => -F j x) = measureL2Dist Q (F i) (F j) := by rw [measureL2Dist_eq_lpNorm Q _ _ (hF.forget.measurable i).fun_neg (hF.forget.measurable j).fun_neg, measureL2Dist_eq_lpNorm Q _ _ (hF.forget.measurable i) (hF.forget.measurable j)] have hfun : (fun x => -F i x - -F j x) = -(fun x => F i x - F j x) := by funext x simp only [Pi.neg_apply] ring rw [hfun, lpNorm_neg] rwa [heq] -
addtheorem — Named polynomial-cover witnesses for two classes combine into explicit witnesses for their pointwise sums.hypotheses𝒳 :sharedType uι :Type vκ :Type wF :ι → 𝒳 → ℝG :κ → 𝒳 → ℝU V A B :ℝp q :ℕhF :HasPolynomialL2CoverWith F U A phG :HasPolynomialL2CoverWith G V B qconclusionHasPolynomialL2CoverWith (fun z : ι × κ => fun x => F z.1 x + G z.2 x) (U + V) (8 * A * B) (p + q + 2)Proof (Lean source)
theorem HasPolynomialL2CoverWith.add {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {G : κ → 𝒳 → ℝ} {U V A B : ℝ} {p q : ℕ} (hF : HasPolynomialL2CoverWith F U A p) (hG : HasPolynomialL2CoverWith G V B q) : HasPolynomialL2CoverWith (fun z : ι × κ => fun x => F z.1 x + G z.2 x) (U + V) (8 * A * B) (p + q + 2) := by have hA := hF.one_le_base have hB := hG.one_le_base have hU := hF.forget.envelope_pos have hV := hG.forget.envelope_pos refine ⟨hF.forget.add hG.forget, by nlinarith [mul_nonneg (sub_nonneg.mpr hA) (sub_nonneg.mpr hB)], ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨CF, hCFcard, hCFcover⟩ := hF.entropy Q hQ (ε / 2) hhalf hhalf1 obtain ⟨CG, hCGcard, hCGcover⟩ := hG.entropy Q hQ (ε / 2) hhalf hhalf1 rw [show A / (ε / 2) = 2 * A / ε by field_simp] at hCFcard rw [show B / (ε / 2) = 2 * B / ε by field_simp] at hCGcard classical refine ⟨CF ×ˢ CG, ?_, ?_⟩ · rw [Finset.card_product] exact (Nat.mul_le_mul hCFcard hCGcard).trans (ceil_mul_le_ceil_poly hA hB hε hε1) · intro z obtain ⟨i, hiC, hi⟩ := hCFcover z.1 obtain ⟨j, hjC, hj⟩ := hCGcover z.2 refine ⟨(i, j), Finset.mem_product.mpr ⟨hiC, hjC⟩, ?_⟩ haveI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (fun x => F z.1 x + G z.2 x) (fun x => F i x + G j x) ≤ measureL2Dist Q (F z.1) (F i) + measureL2Dist Q (G z.2) (G j) := measureL2Dist_add_le _ _ _ _ (hF.forget.measurable z.1) (hF.forget.measurable i) (hG.forget.measurable z.2) (hG.forget.measurable j) (hF.forget.envelope z.1) (hF.forget.envelope i) _ < ε * (U + V) := by nlinarith -
multheorem — Named polynomial-cover witnesses for two classes combine into explicit witnesses for their pointwise products.hypotheses𝒳 :sharedType uι :Type vκ :Type wF :ι → 𝒳 → ℝG :κ → 𝒳 → ℝU V A B :ℝp q :ℕhF :HasPolynomialL2CoverWith F U A phG :HasPolynomialL2CoverWith G V B qconclusionHasPolynomialL2CoverWith (fun z : ι × κ => fun x => F z.1 x * G z.2 x) (U * V) (8 * A * B) (p + q + 2)Proof (Lean source)
theorem HasPolynomialL2CoverWith.mul {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {G : κ → 𝒳 → ℝ} {U V A B : ℝ} {p q : ℕ} (hF : HasPolynomialL2CoverWith F U A p) (hG : HasPolynomialL2CoverWith G V B q) : HasPolynomialL2CoverWith (fun z : ι × κ => fun x => F z.1 x * G z.2 x) (U * V) (8 * A * B) (p + q + 2) := by have hA := hF.one_le_base have hB := hG.one_le_base have hU := hF.forget.envelope_pos have hV := hG.forget.envelope_pos refine ⟨hF.forget.mul hG.forget, by nlinarith [mul_nonneg (sub_nonneg.mpr hA) (sub_nonneg.mpr hB)], ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨CF, hCFcard, hCFcover⟩ := hF.entropy Q hQ (ε / 2) hhalf hhalf1 obtain ⟨CG, hCGcard, hCGcover⟩ := hG.entropy Q hQ (ε / 2) hhalf hhalf1 rw [show A / (ε / 2) = 2 * A / ε by field_simp] at hCFcard rw [show B / (ε / 2) = 2 * B / ε by field_simp] at hCGcard classical refine ⟨CF ×ˢ CG, ?_, ?_⟩ · rw [Finset.card_product] exact (Nat.mul_le_mul hCFcard hCGcard).trans (ceil_mul_le_ceil_poly hA hB hε hε1) · intro z obtain ⟨i, hiC, hi⟩ := hCFcover z.1 obtain ⟨j, hjC, hj⟩ := hCGcover z.2 refine ⟨(i, j), Finset.mem_product.mpr ⟨hiC, hjC⟩, ?_⟩ haveI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (fun x => F z.1 x * G z.2 x) (fun x => F i x * G j x) ≤ V * measureL2Dist Q (F z.1) (F i) + U * measureL2Dist Q (G z.2) (G j) := measureL2Dist_mul_le _ _ _ _ (hF.forget.measurable z.1) (hF.forget.measurable i) (hG.forget.measurable z.2) (hG.forget.measurable j) hF.forget.envelope_pos.le hG.forget.envelope_pos.le (hF.forget.envelope z.1) (hF.forget.envelope i) (hG.forget.envelope z.2) (hG.forget.envelope j) _ < ε * (U * V) := by nlinarith -
tightenEnvelopeBytheorem — If a class has named witnesses at an inflated envelope, the inflation factor is at least one, and the smaller envelope is positive and directly bounds the class, the envelope can be tightened by charging the inflation factor to the entropy base.hypotheses𝒳 :sharedType uι :Type vι → 𝒳 → ℝV A c :ℝp :ℕhF :HasPolynomialL2CoverWith F (c * V) A phc :1 ≤ chV :0 < Vhbound :∀ i x, |F i x| ≤ VconclusionHasPolynomialL2CoverWith F V (c * A) pProof (Lean source)
theorem HasPolynomialL2CoverWith.tightenEnvelopeBy {ι : Type v} {F : ι → 𝒳 → ℝ} {V A c : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F (c * V) A p) (hc : 1 ≤ c) (hV : 0 < V) (hbound : ∀ i x, |F i x| ≤ V) : HasPolynomialL2CoverWith F V (c * A) p := by have hc0 : 0 < c := lt_of_lt_of_le zero_lt_one hc have hbaseOne : 1 ≤ c * A := by simpa only [one_mul] using (mul_le_mul hc hF.one_le_base (by norm_num : (0 : ℝ) ≤ 1) hc0.le) refine ⟨⟨hV, hF.forget.measurable, hbound, c * A, p, hbaseOne, ?_⟩, hbaseOne, ?_⟩ · intro Q hQ ε hε hε1 have hec : 0 < ε / c := div_pos hε hc0 have hec1 : ε / c ≤ 1 := by apply (div_le_one hc0).2 exact hε1.trans hc have hradius : (ε / c) * (c * V) = ε * V := by field_simp have hbase : A / (ε / c) = (c * A) / ε := by field_simp simpa only [hradius, hbase] using hF.entropy Q hQ (ε / c) hec hec1 · intro Q hQ ε hε hε1 have hec : 0 < ε / c := div_pos hε hc0 have hec1 : ε / c ≤ 1 := by apply (div_le_one hc0).2 exact hε1.trans hc have hradius : (ε / c) * (c * V) = ε * V := by field_simp have hbase : A / (ε / c) = (c * A) / ε := by field_simp simpa only [hradius, hbase] using hF.entropy Q hQ (ε / c) hec hec1 -
negtheorem — Uniform named polynomial-cover witnesses remain valid after pointwise negation.hypotheses𝒳 :sharedType uS :Type*S → Type v(s : S) → ι s → 𝒳 → ℝS → ℝhF :conclusionHasUniformPolynomialL2CoverOver S (fun s i x => -F s i x) UProof (Lean source)
theorem HasUniformPolynomialL2CoverOver.neg {S : Type*} {ι : S → Type v} {F : (s : S) → ι s → 𝒳 → ℝ} {U : S → ℝ} (hF : HasUniformPolynomialL2CoverOver S F U) : HasUniformPolynomialL2CoverOver S (fun s i x => -F s i x) U := by obtain ⟨A, p, hF⟩ := hF exact ⟨A, p, fun s => (hF s).neg⟩ -
addtheorem — Uniform named polynomial-cover witnesses for two families combine into uniform witnesses for their pointwise sums.hypotheses𝒳 :sharedType uS :Type*S → Type vS → Type w(s : S) → ι s → 𝒳 → ℝ(s : S) → κ s → 𝒳 → ℝS → ℝhF :hG :conclusionHasUniformPolynomialL2CoverOver S (fun s (z : ι s × κ s) x => F s z.1 x + G s z.2 x) (fun s => U s + V s)Proof (Lean source)
theorem HasUniformPolynomialL2CoverOver.add {S : Type*} {ι : S → Type v} {κ : S → Type w} {F : (s : S) → ι s → 𝒳 → ℝ} {G : (s : S) → κ s → 𝒳 → ℝ} {U V : S → ℝ} (hF : HasUniformPolynomialL2CoverOver S F U) (hG : HasUniformPolynomialL2CoverOver S G V) : HasUniformPolynomialL2CoverOver S (fun s (z : ι s × κ s) x => F s z.1 x + G s z.2 x) (fun s => U s + V s) := by obtain ⟨A, p, hF⟩ := hF obtain ⟨B, q, hG⟩ := hG exact ⟨8 * A * B, p + q + 2, fun s => (hF s).add (hG s)⟩ -
multheorem — Uniform named polynomial-cover witnesses for two families combine into uniform witnesses for their pointwise products.hypotheses𝒳 :sharedType uS :Type*S → Type vS → Type w(s : S) → ι s → 𝒳 → ℝ(s : S) → κ s → 𝒳 → ℝS → ℝhF :hG :conclusionHasUniformPolynomialL2CoverOver S (fun s (z : ι s × κ s) x => F s z.1 x * G s z.2 x) (fun s => U s * V s)Proof (Lean source)
theorem HasUniformPolynomialL2CoverOver.mul {S : Type*} {ι : S → Type v} {κ : S → Type w} {F : (s : S) → ι s → 𝒳 → ℝ} {G : (s : S) → κ s → 𝒳 → ℝ} {U V : S → ℝ} (hF : HasUniformPolynomialL2CoverOver S F U) (hG : HasUniformPolynomialL2CoverOver S G V) : HasUniformPolynomialL2CoverOver S (fun s (z : ι s × κ s) x => F s z.1 x * G s z.2 x) (fun s => U s * V s) := by obtain ⟨A, p, hF⟩ := hF obtain ⟨B, q, hG⟩ := hG exact ⟨8 * A * B, p + q + 2, fun s => (hF s).mul (hG s)⟩ -
finSumtheorem — If every summand family has uniform named polynomial-cover witnesses, their nonempty finite pointwise sum has uniform witnesses with the summed envelopes.hypotheses𝒳 :sharedType uS :Type*K :hF :∀ k, HasUniformPolynomialL2CoverOver S (fun s => F s k) (fun s => U s k)conclusionHasUniformPolynomialL2CoverOver S (fun s (θ : (k : K) → ι s k) x => ∑ k, F s k (θ k) x) (fun s => ∑ k, U s k)Proof (Lean source)
theorem HasUniformPolynomialL2CoverOver.finSum {S : Type*} {K : Type w} [Fintype K] [Nonempty K] {ι : (s : S) → K → Type v} {F : (s : S) → (k : K) → ι s k → 𝒳 → ℝ} {U : S → K → ℝ} (hF : ∀ k, HasUniformPolynomialL2CoverOver S (fun s => F s k) (fun s => U s k)) : HasUniformPolynomialL2CoverOver S (fun s (θ : (k : K) → ι s k) x => ∑ k, F s k (θ k) x) (fun s => ∑ k, U s k) := by classical let P : ∀ (K : Type w) [Fintype K], Prop := fun K _ => Nonempty K → ∀ (ι : (s : S) → K → Type v) (F : (s : S) → (k : K) → ι s k → 𝒳 → ℝ) (U : S → K → ℝ), (∀ k, HasUniformPolynomialL2CoverOver S (fun s => F s k) (fun s => U s k)) → HasUniformPolynomialL2CoverOver S (fun s (θ : (k : K) → ι s k) x => ∑ k, F s k (θ k) x) (fun s => ∑ k, U s k) refine Fintype.induction_empty_option (P := P) ?_ ?_ ?_ K (inferInstance : Nonempty K) ι F U hF · intro α β _ e ih hβ ι F U hF letI : Fintype α := Fintype.ofEquiv β e.symm let hα : Nonempty α := ⟨e.symm (choice hβ)⟩ have hc := ih hα (fun s a => ι s (e a)) (fun s a => F s (e a)) (fun s a => U s (e a)) (fun a => hF (e a)) obtain ⟨A, p, hc⟩ := hc refine ⟨A, p, fun s => ?_⟩ let eθ : ((b : β) → ι s b) ≃ ((a : α) → ι s (e a)) := (Equiv.piCongrLeft (ι s) e).symm have hclass : (fun θ : (b : β) → ι s b => fun x => ∑ b, F s b (θ b) x) = (fun θ : (b : β) → ι s b => fun x => ∑ a, F s (e a) (θ (e a)) x) := by funext θ x exact (e.sum_comp (fun b => F s b (θ b) x)).symm have hUeq : (∑ b, U s b) = ∑ a, U s (e a) := (e.sum_comp (U s)).symm change HasPolynomialL2CoverWith (fun θ : (b : β) → ι s b => fun x => ∑ b, F s b (θ b) x) (∑ b, U s b) A p rw [hclass, hUeq] simpa [eθ] using (hc s).reindex eθ · intro h exact isEmptyElim (choice h) · intro α _ ih _ ι F U hF by_cases hα : Nonempty α · have htail := ih hα (fun s a => ι s (some a)) (fun s a => F s (some a)) (fun s a => U s (some a)) (fun a => hF (some a)) have hadd := (hF none).add htail obtain ⟨A, p, hadd⟩ := hadd refine ⟨A, p, fun s => ?_⟩ let split : ((k : Option α) → ι s k) ≃ (ι s none × ((a : α) → ι s (some a))) := { toFun := fun θ => (θ none, fun a => θ (some a)) invFun := fun z k => Option.rec z.1 z.2 k left_inv := fun θ => by funext k; cases k <;> rfl right_inv := fun z => by cases z; rfl } simp only [Fintype.sum_option] exact (hadd s).reindex split · letI : IsEmpty α := not_nonempty_iff.mp hα obtain ⟨A, p, hone⟩ := hF none refine ⟨A, p, fun s => ?_⟩ let single : ((k : Option α) → ι s k) ≃ ι s none := { toFun := fun θ => θ none invFun := fun i k => Option.rec i (fun a => isEmptyElim a) k left_inv := fun θ => by funext k; cases k with | none => rfl | some a => exact isEmptyElim a right_inv := fun i => rfl } simp only [Fintype.sum_option, Finset.univ_eq_empty, Finset.sum_empty, add_zero] exact (hone s).reindex single
BasicVarianceAdaptiveVCExpectedMaximal 5 core · 3 supporting This module defines the empirical-measure polynomial covering hypothesis, the countable empirical supremum, and the normalized logarithmic rate used by the variance-adaptive expected maximal inequality. ★ hasPolynomialEmpiricalL2Cover
Data for variance-adaptive VC-type maximal inequalities
This module defines the empirical-measure polynomial covering hypothesis, the countable empirical supremum, and the normalized logarithmic rate used by the variance-adaptive expected maximal inequality. The covering hypothesis only asks about positive-size finite empirical laws, which is the exact input needed by empirical-metric chaining.
Given a real-valued function class on an observation space, an envelope , an entropy base , and an exponent , the polynomial empirical covering property holds exactly when, for every positive sample size and every sample of that size, and for every radius with , there is a finite index set forming an cover under the empirical measure at radius and its cardinality is at most .
Definition (Lean source)
Given an entropy base , an envelope , and a variance scale , the normalized logarithmic complexity is . This normalization makes the logarithm at least one.
Given an envelope , a variance scale , an entropy base , an exponent , and a sample size , the variance-adaptive VC-type rate is , where .
Definition (Lean source)
The fixed numerical constant for the variance-adaptive VC-type expected maximal inequality is .
Definition (Lean source)
Empirical covering from population covering. If a family F of real-valued functions with envelope U admits a uniform polynomial covering-number bound over every probability measure, then there exist a base A at least Euler's number and an exponent v at least one such that F has polynomial empirical covering numbers with envelope U, base A, and exponent v.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
pullbacktheorem — Given an empirical polynomial-cover certificate, measurability of the class, and a map from a nonempty replacement parameter set, the pulled-back class keeps the exponent with a factor-two increase in the entropy base.hypotheses𝒳 :sharedType uι :sharedType vκ :Type wNonempty κF :ι → 𝒳 → ℝU A v :ℝhF :HasPolynomialEmpiricalL2Cover F U A vhmeas :∀ i, Measurable (F i)e :κ → ιconclusionHasPolynomialEmpiricalL2Cover (fun k => F (e k)) U (2 * A) vProof (Lean source)
theorem HasPolynomialEmpiricalL2Cover.pullback {κ : Type w} [Nonempty κ] {F : ι → 𝒳 → ℝ} {U A v : ℝ} (hF : HasPolynomialEmpiricalL2Cover F U A v) (hmeas : ∀ i, Measurable (F i)) (e : κ → ι) : HasPolynomialEmpiricalL2Cover (fun k => F (e k)) U (2 * A) v := by intro m S hm ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨D, hDcover, hDcard⟩ := hF S hm (ε / 2) hhalf hhalf1 classical choose center hcenter_mem hcenter_dist using fun k => hDcover (e k) let occupied : Finset ι := D.filter fun i => ∃ k, center k = i let representative : ι → κ := fun i => if hi : ∃ k, center k = i then choose hi else choice inferInstance refine ⟨occupied.image representative, ?_, ?_⟩ · intro k have hocc : center k ∈ occupied := by simp only [occupied, mem_filter] exact ⟨hcenter_mem k, ⟨k, rfl⟩⟩ have hrep_center : center (representative (center k)) = center k := by dsimp only [representative] split · next h => exact Classical.choose_spec h · next h => exact (h ⟨k, rfl⟩).elim refine ⟨representative (center k), Finset.mem_image.mpr ⟨center k, hocc, rfl⟩, ?_⟩ have htriangle : measureL2Dist (finiteSampleMeasure S) (F (e k)) (F (e (representative (center k)))) ≤ measureL2Dist (finiteSampleMeasure S) (F (e k)) (F (center k)) + measureL2Dist (finiteSampleMeasure S) (F (center k)) (F (e (representative (center k)))) := by rw [measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas (e k)) (hmeas (e (representative (center k)))), measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas (e k)) (hmeas (center k)), measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas (center k)) (hmeas (e (representative (center k))))] exact @dist_triangle _ (empiricalPMet S) (F (e k)) (F (center k)) (F (e (representative (center k)))) have hrep_dist : measureL2Dist (finiteSampleMeasure S) (F (e (representative (center k)))) (F (center k)) < ε / 2 * U := by simpa only [hrep_center] using hcenter_dist (representative (center k)) have hsymm : measureL2Dist (finiteSampleMeasure S) (F (center k)) (F (e (representative (center k)))) = measureL2Dist (finiteSampleMeasure S) (F (e (representative (center k)))) (F (center k)) := by simp only [measureL2Dist] congr 2 funext x ring rw [hsymm] at htriangle nlinarith [htriangle, hcenter_dist k, hrep_dist] · calc ((occupied.image representative).card : ℝ) ≤ (occupied.card : ℝ) := by exact_mod_cast Finset.card_image_le _ ≤ (D.card : ℝ) := by exact_mod_cast Finset.card_filter_le _ _ _ ≤ rpow (A / (ε / 2)) v := hDcard _ = rpow ((2 * A) / ε) v := by congr 1 field_simp -
monoEnvelopetheorem — Given an empirical polynomial-cover certificate and an enlarged envelope, the larger envelope keeps the same centers, entropy base, and exponent.hypotheses𝒳 :sharedType uι :sharedType vι → 𝒳 → ℝU V A v :ℝhF :HasPolynomialEmpiricalL2Cover F U A vhUV :U ≤ VconclusionHasPolynomialEmpiricalL2Cover F V A vProof (Lean source)
theorem HasPolynomialEmpiricalL2Cover.monoEnvelope {F : ι → 𝒳 → ℝ} {U V A v : ℝ} (hF : HasPolynomialEmpiricalL2Cover F U A v) (hUV : U ≤ V) : HasPolynomialEmpiricalL2Cover F V A v := by intro m S hm ε hε hε1 obtain ⟨C, hCcover, hCcard⟩ := hF S hm ε hε hε1 refine ⟨C, ?_, hCcard⟩ intro i obtain ⟨j, hjC, hij⟩ := hCcover i exact ⟨j, hjC, hij.trans_le (mul_le_mul_of_nonneg_left hUV hε.le)⟩ -
hasPolynomialEmpiricalL2Covertheorem — Named arbitrary-law polynomial-cover witnesses give empirical witnesses after the displayed base and exponent normalization.hypothesesconclusionProof (Lean source)
theorem HasPolynomialL2CoverWith.hasPolynomialEmpiricalL2Cover {F : ι → 𝒳 → ℝ} {U A₀ : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F U A₀ p) : HasPolynomialEmpiricalL2Cover F U (max (exp 1) (2 * A₀)) ((p + 1 : ℕ) : ℝ) := by intro m S hm ε hε hε1 letI : IsProbabilityMeasure (finiteSampleMeasure S) := finiteSampleMeasure_isProbabilityMeasure S hm obtain ⟨C, hCcard, hCcover⟩ := hF.entropy (finiteSampleMeasure S) inferInstance ε hε hε1 refine ⟨C, hCcover, ?_⟩ have hx : 1 ≤ A₀ / ε := (one_le_div hε).2 (hε1.trans hF.one_le_base) have hceil : (ceil ((A₀ / ε) ^ p) : ℝ) < (A₀ / ε) ^ p + 1 := Nat.ceil_lt_add_one (by positivity) have hxpow : 1 ≤ (A₀ / ε) ^ p := one_le_pow₀ hx have hbase : A₀ / ε ≤ max (exp 1) (2 * A₀) / ε := by apply div_le_div_of_nonneg_right _ hε.le exact (by linarith [hF.one_le_base] : A₀ ≤ 2 * A₀) |>.trans (le_max_right _ _) have htwo : 2 ≤ max (exp 1) (2 * A₀) / ε := by apply (le_div_iff₀ hε).2 calc 2 * ε ≤ 2 * 1 := by gcongr _ ≤ 2 * A₀ := mul_le_mul_of_nonneg_left hF.one_le_base (by norm_num) _ ≤ max (exp 1) (2 * A₀) := le_max_right _ _ calc (C.card : ℝ) ≤ (ceil ((A₀ / ε) ^ p) : ℝ) := by exact_mod_cast hCcard _ ≤ 2 * (A₀ / ε) ^ p := by linarith _ ≤ (max (exp 1) (2 * A₀) / ε) ^ (p + 1) := by have hp := pow_le_pow_left₀ (by positivity : 0 ≤ A₀ / ε) hbase p calc 2 * (A₀ / ε) ^ p ≤ (max (exp 1) (2 * A₀) / ε) * (A₀ / ε) ^ p := mul_le_mul_of_nonneg_right htwo (by positivity) _ ≤ (max (exp 1) (2 * A₀) / ε) * (max (exp 1) (2 * A₀) / ε) ^ p := mul_le_mul_of_nonneg_left hp (by positivity) _ = (max (exp 1) (2 * A₀) / ε) ^ (p + 1) := by rw [pow_succ] ring _ = rpow (max (exp 1) (2 * A₀) / ε) ((p + 1 : ℕ) : ℝ) := by exact (Real.rpow_natCast _ _).symm
Parametric 4 core · 3 supporting This module supplies the bounded finite-dimensional linear-parameter class and the composition of a polynomial-entropy real class with a measurable finite-VC family of indicators. ★ linearParameterClass_hasPolynomialL2Cover
Parametric and VC-indicator covering interfaces
This module supplies the bounded finite-dimensional linear-parameter class and the composition of a polynomial-entropy real class with a measurable finite-VC family of indicators.
Given an index set of coefficients and a real bound, the coefficient box is the set of real coefficient vectors indexed by that set for which every coordinate has absolute value at most .
Definition (Lean source)
Given a finite index set, a real-valued feature family, a coefficient bound, a coefficient vector in the corresponding box, and an evaluation point, the linear parameter class evaluation is the sum of each coefficient times its corresponding feature value at that point.
Covering certificate for a bounded-coefficient linear class. Given a finite family of measurable real-valued features, each bounded in absolute value by M, where B is a positive coefficient bound and M is positive, the class of linear combinations of the features with each coefficient constrained to [-B,B] carries a uniform polynomial L² covering certificate at envelope |K|·B·M.
Formal statement
Proof (Lean source)
Given a Boolean classifier family and a natural number, the property of having VC dimension at most that number means that, for every finite sample, the VC dimension of the label patterns realized on that sample is at most .
Definition (Lean source)
3 supporting declarations (lemmas, instances)
-
linearParameterClass_hasPseudoDimAtMosttheorem — For a finite real-valued feature family and a coefficient bound, the associated bounded-coefficient linear class has pseudo-dimension at most the number of coordinates plus one.hypothesesconclusionProof (Lean source)
theorem linearParameterClass_hasPseudoDimAtMost {K : Type w} [Fintype K] (φ : K → 𝒳 → ℝ) (B : ℝ) : HasPseudoDimAtMost (linearParameterClass φ B) (card K + 1) := by classical intro n T unfold vcDim refine Finset.sup_le fun s hs => ?_ rw [Finset.mem_shatterer] at hs by_contra hcard have hcard_lt : card K + 1 < s.card := by omega let v : {i // i ∈ s} → Option K → ℝ := fun i q => match q with | none => -(T i.1).2 | some k => φ k (T i.1).1 have hvdep : ¬ LinearIndependent ℝ v := by intro hv have hle := hv.fintype_card_le_finrank rw [Module.finrank_pi, Fintype.card_option, Fintype.card_coe] at hle omega obtain ⟨a, ha0, i0, hi0⟩ := Fintype.not_linearIndependent_iff.mp hvdep let g : {i // i ∈ s} → ℝ := if 0 < a i0 then a else fun i => -a i have hg0 : ∑ i, g i • v i = 0 := by dsimp [g] split_ifs · exact ha0 · calc ∑ i, (-a i) • v i = ∑ i, -(a i • v i) := by apply Finset.sum_congr rfl intro i _ exact neg_smul (a i) (v i) _ = -(∑ i, a i • v i) := by rw [Finset.sum_neg_distrib] _ = 0 := by rw [ha0, neg_zero] have hgi0 : 0 < g i0 := by dsimp [g] split_ifs with h · exact h · dsimp exact neg_pos.mpr (lt_of_le_of_ne (le_of_not_gt h) hi0) let g0 : Fin n → ℝ := fun i => if hi : i ∈ s then g ⟨i, hi⟩ else 0 let t : Finset (Fin n) := s.filter fun i => 0 < g0 i have hts : t ⊆ s := filter_subset _ _ obtain ⟨u, hu_growth, hsu⟩ := hs hts obtain ⟨θ, hθ⟩ := (mem_growthFamily_iff.mp hu_growth) have hlabel (i : {i // i ∈ s}) : subgraphClassifier (linearParameterClass φ B) θ (T i.1) = true ↔ 0 < g i := by rw [← restrictionPattern_mem_iff (p := subgraphClassifier (linearParameterClass φ B) θ) (S := T) (j := i.1), hθ] have hi_mem : i.1 ∈ u ↔ i.1 ∈ t := by constructor · intro hiu have : i.1 ∈ s ∩ u := Finset.mem_inter.mpr ⟨i.2, hiu⟩ rwa [hsu] at this · intro hit have : i.1 ∈ s ∩ u := by rwa [hsu] exact (Finset.mem_inter.mp this).2 rw [hi_mem] simp only [t, mem_filter, i.2, true_and] simp [g0, i.2] let e : {i // i ∈ s} → ℝ := fun i => linearParameterClass φ B θ (T i.1).1 - (T i.1).2 have he_pos (i : {i // i ∈ s}) (hi : 0 < g i) : 0 < e i := by have hlt : (T i.1).2 < linearParameterClass φ B θ (T i.1).1 := by simpa [subgraphClassifier] using (hlabel i).2 hi dsimp [e] linarith have he_nonpos (i : {i // i ∈ s}) (hi : ¬ 0 < g i) : e i ≤ 0 := by have hnot : ¬ (T i.1).2 < linearParameterClass φ B θ (T i.1).1 := by simpa [subgraphClassifier] using (hlabel i).not.mpr hi dsimp [e] linarith have hprod_nonneg (i : {i // i ∈ s}) : 0 ≤ g i * e i := by by_cases hi : 0 < g i · exact (mul_pos hi (he_pos i hi)).le · have hgle : g i ≤ 0 := le_of_not_gt hi exact mul_nonneg_of_nonpos_of_nonpos hgle (he_nonpos i hi) have hprod_pos : 0 < g i0 * e i0 := mul_pos hgi0 (he_pos i0 hgi0) have hsum_pos : 0 < ∑ i, g i * e i := by exact Finset.sum_pos' (fun i _ => hprod_nonneg i) ⟨i0, Finset.mem_univ _, hprod_pos⟩ have hsum_zero : ∑ i, g i * e i = 0 := by have hcoord (q : Option K) : ∑ i, g i * v i q = 0 := by have := congrFun hg0 q simpa [Pi.smul_apply, smul_eq_mul] using this rw [show (∑ i, g i * e i) = ∑ q : Option K, (match q with | none => 1 | some k => θ.1 k) * ∑ i, g i * v i q by simp_rw [Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro i _ change g i * ((∑ k, θ.1 k * φ k (T i.1).1) - (T i.1).2) = _ rw [mul_sub, Finset.mul_sum] simp only [Fintype.sum_option, v] ring] simp only [hcoord, mul_zero, Finset.sum_const_zero] linarith -
indicatorClass_hasPseudoDimAtMosttheorem — Given a Boolean classifier family, a dimension bound, and a VC certificate at that bound, the corresponding real-valued zero-one indicator class has the same pseudo-dimension bound.hypothesesconclusionHasPseudoDimAtMost (fun j x => if π j x then 1 else 0) dProof (Lean source)
-- @node: HasVCAtMost.indicatorClass_hasPseudoDimAtMost theorem HasVCAtMost.indicatorClass_hasPseudoDimAtMost {κ : Type w} (π : κ → 𝒳 → Bool) (d : ℕ) (hπvc : HasVCAtMost π d) : HasPseudoDimAtMost (fun j x => if π j x then 1 else 0) d := by classical intro n T unfold vcDim refine Finset.sup_le fun s hs => ?_ rw [Finset.mem_shatterer] at hs obtain ⟨uTop, huTop, hTop⟩ := hs (Finset.Subset.rfl) obtain ⟨jTop, hjTop⟩ := mem_growthFamily_iff.mp huTop obtain ⟨uBot, huBot, hBot⟩ := hs (empty_subset s) obtain ⟨jBot, hjBot⟩ := mem_growthFamily_iff.mp huBot have hupper (i : Fin n) (hi : i ∈ s) : (T i).2 < 1 := by have hiTop : i ∈ uTop := by have : i ∈ s ∩ uTop := by rwa [hTop] exact (Finset.mem_inter.mp this).2 have htrue : subgraphClassifier (fun j x => if π j x then 1 else 0) jTop (T i) = true := by rw [← restrictionPattern_mem_iff (p := subgraphClassifier (fun j x => if π j x then 1 else 0) jTop) (S := T) (j := i), hjTop] exact hiTop have hlt : (T i).2 < if π jTop (T i).1 then 1 else 0 := by simpa [subgraphClassifier] using htrue cases hπi : π jTop (T i).1 <;> simp [hπi] at hlt ⊢ <;> linarith have hlower (i : Fin n) (hi : i ∈ s) : 0 ≤ (T i).2 := by have hiBot : i ∉ uBot := by intro hiu have : i ∈ s ∩ uBot := Finset.mem_inter.mpr ⟨hi, hiu⟩ rw [hBot] at this exact Finset.notMem_empty i this have hfalse : subgraphClassifier (fun j x => if π j x then 1 else 0) jBot (T i) ≠ true := by intro htrue apply hiBot rw [← hjBot, restrictionPattern_mem_iff] exact htrue have hnot : ¬ (T i).2 < if π jBot (T i).1 then 1 else 0 := by simpa [subgraphClassifier] using hfalse cases hπi : π jBot (T i).1 <;> simp [hπi] at hnot ⊢ <;> linarith have hmiddle (j : κ) (i : Fin n) (hi : i ∈ s) : subgraphClassifier (fun j x => if π j x then 1 else 0) j (T i) = true ↔ π j (T i).1 = true := by cases hπi : π j (T i).1 · simp [subgraphClassifier, hπi, hlower i hi] · simp [subgraphClassifier, hπi, hupper i hi] have hshπ : (growthFamily π (fun i => (T i).1)).Shatters s := by intro t ht obtain ⟨u, hu, hsu⟩ := hs ht obtain ⟨j, hj⟩ := mem_growthFamily_iff.mp hu refine ⟨restrictionPattern (π j) (fun i => (T i).1), ?_, ?_⟩ · rw [mem_growthFamily_iff] exact ⟨j, rfl⟩ · ext i by_cases hi : i ∈ s · have hpiu : i ∈ restrictionPattern (π j) (fun i => (T i).1) ↔ i ∈ u := by rw [restrictionPattern_mem_iff, ← hmiddle j i hi, ← restrictionPattern_mem_iff, hj] have hut : i ∈ u ↔ i ∈ t := by constructor · intro hiu have : i ∈ s ∩ u := Finset.mem_inter.mpr ⟨hi, hiu⟩ rwa [hsu] at this · intro hit have : i ∈ s ∩ u := by rwa [hsu] exact (Finset.mem_inter.mp this).2 simp only [Finset.mem_inter, hi, true_and] exact hpiu.trans hut · simp only [Finset.mem_inter, hi, false_and] exact (iff_false_intro fun hit => hi (ht hit)).symm exact hshπ.card_le_vcDim.trans (hπvc n fun i => (T i).1) -
mulIndicatortheorem — If a real-valued class has a polynomial covering certificate, each set selected by an indicator family is measurable, and the indicator family has bounded VC dimension, the products of the real-valued functions and indicators retain a polynomial cover.hypotheses𝒳 :sharedType uι :Type vκ :Type wF :ι → 𝒳 → ℝπ :κ → 𝒳 → BoolU :ℝd :ℕhF :hπmeas :∀ j, MeasurableSet {x | π j x = true}hπvc :HasVCAtMost π dconclusionHasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x * if π p.2 x then 1 else 0) UProof (Lean source)
theorem HasPolynomialL2Cover.mulIndicator {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {π : κ → 𝒳 → Bool} {U : ℝ} {d : ℕ} (hF : HasPolynomialL2Cover F U) (hπmeas : ∀ j, MeasurableSet {x | π j x = true}) (hπvc : HasVCAtMost π d) : HasPolynomialL2Cover (fun p : ι × κ => fun x => F p.1 x * if π p.2 x then 1 else 0) U := by rcases isEmpty_or_nonempty κ with hκ | hκ · letI : IsEmpty κ := hκ refine ⟨hF.envelope_pos, ?_, ?_, ?_⟩ · intro p exact isEmptyElim p.2 · intro p exact isEmptyElim p.2 · refine ⟨1, 0, le_rfl, ?_⟩ intro Q hQ ε hε hε1 classical refine ⟨∅, by simp, ?_⟩ intro p exact isEmptyElim p.2 · letI : Nonempty κ := hκ have hindicator : HasPolynomialL2Cover (fun j x => if π j x then 1 else 0) 1 := (HasVCAtMost.indicatorClass_hasPseudoDimAtMost π d hπvc).hasPolynomialL2Cover (fun j => Measurable.ite (hπmeas j) measurable_const measurable_const) (by norm_num) (by intro j x cases π j x <;> simp) simpa using hF.mul hindicator
Geometry 12 core · 4 supporting This module defines compactly supported radial monomials with a moving center and proves finite-trace VC-subgraph bounds. ★ radialMonomialClass_hasPseudoDimAtMost
Euclidean radial monomials and their finite traces
This module defines compactly supported radial monomials with a moving center and proves finite-trace VC-subgraph bounds. The bounds are intentionally non-optimized. Their important features are that they depend only on the Euclidean dimension and the finite degree cutoff, and that they are stated at the trace level, without any assumption on an ambient probability measure.
Odd and even degrees are treated uniformly. On a nonnegative radial ray, every positive integral power is monotone, so a threshold on a radial power is again a distance threshold. Squared Euclidean distance then supplies the finite-dimensional affine lift used by the trace argument.
Given a natural dimension, the Euclidean point space is the real Euclidean space of that dimension.
Definition (Lean source)
Given a natural dimension, the point-radius space is the set of pairs consisting of a point in the corresponding real Euclidean space and an arbitrary real radius threshold.
Definition (Lean source)
Given a natural dimension, a center point, and a point together with a radius threshold, the moving-center closed-ball classifier returns true exactly when the point lies at distance no greater than the threshold from the center.
Definition (Lean source)
Given a natural dimension, a center point, and a point together with a radius threshold, the moving-center exterior classifier returns true exactly when the point lies at distance strictly greater than the threshold from the center.
Definition (Lean source)
Given a natural dimension, the closed-ball parameter space is the set of pairs consisting of a point in that real Euclidean space and a nonnegative real radius.
Definition (Lean source)
Given a natural dimension, a closed-ball parameter, and a point in the corresponding Euclidean space, the closed-ball classifier returns true exactly when the point lies in the closed ball specified by that parameter.
Definition (Lean source)
Given a natural dimension, a bandwidth, two relative annulus endpoints, a natural-number degree, a center point, and an evaluation point, the radial annulus monomial equals when the distance to the center lies between and , and is zero otherwise.
Definition (Lean source)
Given a natural dimension and a maximal natural-number degree, the radial-monomial parameter space consists of a center in that Euclidean space paired with a degree from zero through .
Definition (Lean source)
Given a natural dimension, a maximal degree, a bandwidth and two relative annulus endpoints, a center-and-degree parameter, and a Euclidean evaluation point, the radial-monomial class maps that parameter and point to the corresponding radial annulus monomial.
Definition (Lean source)
Given a natural dimension, the fixed-degree radial pseudo-dimension bound is the explicit Boolean-combination bound .
Definition (Lean source)
Given a natural dimension and a maximal degree, the radial pseudo-dimension bound is the explicit finite-union bound obtained by combining fixed-degree bounds.
Definition (Lean source)
Pseudo-dimension bound for the moving-center radial-monomial class. For a positive bandwidth q, allowing both the Euclidean center and the monomial degree — ranging from zero through p — to vary gives the radial-monomial class a pseudo-dimension of at most radialPseudoDimBound d p.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
movingCenterClosedBall_hasVCAtMosttheorem — In a Euclidean space of dimension d, variable-radius closed-ball tests indexed by their center have VC dimension at most d + 2.Proof (Lean source)
theorem movingCenterClosedBall_hasVCAtMost (d : ℕ) : HasVCAtMost (movingCenterClosedBallClassifier d) (d + 2) := by have h := HasVCAtMost.boolNot (movingCenterExterior_vc d) convert h using 1 funext x zr by_cases hlt : zr.2 < dist zr.1 x · simp [movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hlt, not_le_of_gt hlt] · simp [movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hlt, le_of_not_gt hlt] -
movingCenterBallExterior_hasVCAtMosttheorem — In a Euclidean space of dimension d, variable-radius strict exterior tests indexed by their center have VC dimension at most d + 2.Proof (Lean source)
theorem movingCenterBallExterior_hasVCAtMost (d : ℕ) : HasVCAtMost (movingCenterBallExteriorClassifier d) (d + 2) := by exact movingCenterExterior_vc d -
euclideanClosedBall_hasVCAtMosttheorem — In a Euclidean space of dimension d, closed-ball classifiers have VC dimension at most d + 2.Proof (Lean source)
theorem euclideanClosedBall_hasVCAtMost (d : ℕ) : HasVCAtMost (euclideanClosedBallClassifier d) (d + 2) := by have hext : HasVCAtMost (fun cr : ClosedBallParam d => fun z => decide ((cr.2 : ℝ) < dist z cr.1)) (d + 2) := by have h := HasVCAtMost.reindex (linearSignClass_hasVCAtMost (ballLift d)) (ballLiftParameter d) simpa only [Fintype.card_option, Fintype.card_fin, ballExterior_eq_linearSign] using h have h := HasVCAtMost.boolNot hext convert h using 1 funext cr z by_cases hlt : (cr.2 : ℝ) < dist z cr.1 · simp [euclideanClosedBallClassifier, hlt, not_le_of_gt hlt] · simp [euclideanClosedBallClassifier, hlt, le_of_not_gt hlt] -
radialAnnulusMonomial_hasPseudoDimAtMosttheorem — For a Euclidean dimension and fixed degree and a positive bandwidth, the moving-center radial-monomial class has the stated pseudo-dimension bound depending only on the Euclidean dimension.hypothesesd k :ℕq a b :ℝhq :0 < qconclusionHasPseudoDimAtMost (fun x : EuclideanPoint d => radialAnnulusMonomial d q a b k x) (fixedRadialPseudoDimBound d)Proof (Lean source)
theorem radialAnnulusMonomial_hasPseudoDimAtMost (d k : ℕ) {q a b : ℝ} (hq : 0 < q) : HasPseudoDimAtMost (fun x : EuclideanPoint d => radialAnnulusMonomial d q a b k x) (fixedRadialPseudoDimBound d) := by let f0 : EuclideanPoint d → (EuclideanPoint d × ℝ) → Bool := fun x zt => movingCenterNonstrictExteriorClassifier d x (zt.1, a * q) let f1 : EuclideanPoint d → (EuclideanPoint d × ℝ) → Bool := fun x zt => movingCenterClosedBallClassifier d x (zt.1, b * q) let f2 : EuclideanPoint d → (EuclideanPoint d × ℝ) → Bool := fun x zt => movingCenterBallExteriorClassifier d x (zt.1, radialPowerRadius q k zt.2) let pi : (j : Fin 3) → EuclideanPoint d → (EuclideanPoint d × ℝ) → Bool := fun j => ![f0, f1, f2] j let combine : (EuclideanPoint d × ℝ) → (Fin 3 → Bool) → Bool := fun zt labels => if zt.2 < 0 then true else labels 0 && labels 1 && (if k = 0 then decide (zt.2 < 1) else labels 2) have h0 : HasVCAtMost f0 (d + 2) := by exact HasVCAtMost.compDomain (movingCenterNonstrictExterior_vc d) (fun zt : EuclideanPoint d × ℝ => (zt.1, a * q)) have h1 : HasVCAtMost f1 (d + 2) := by exact HasVCAtMost.compDomain (movingCenterClosedBall_hasVCAtMost d) (fun zt : EuclideanPoint d × ℝ => (zt.1, b * q)) have h2 : HasVCAtMost f2 (d + 2) := by exact HasVCAtMost.compDomain (movingCenterBallExterior_hasVCAtMost d) (fun zt : EuclideanPoint d × ℝ => (zt.1, radialPowerRadius q k zt.2)) have hpi : ∀ j, HasVCAtMost (pi j) (d + 2) := by intro j fin_cases j <;> simp only [pi, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two] <;> assumption have hind := booleanCombination_hasVCAtMost pi hpi combine have hdiag := HasVCAtMost.reindex hind (fun x : EuclideanPoint d => fun _ => x) change HasVCAtMost (subgraphClassifier (fun x : EuclideanPoint d => radialAnnulusMonomial d q a b k x)) (fixedRadialPseudoDimBound d) convert hdiag using 1 case e'_4 => rfl funext x zt by_cases ht : zt.2 < 0 · by_cases hann : a * q ≤ dist zt.1 x ∧ dist zt.1 x ≤ b * q · have hp : 0 ≤ (dist zt.1 x / q) ^ k := pow_nonneg (div_nonneg dist_nonneg hq.le) k have htp : zt.2 < (dist zt.1 x / q) ^ k := lt_of_lt_of_le ht hp simp [subgraphClassifier, radialAnnulusMonomial, combine, pi, f0, f1, f2, movingCenterNonstrictExteriorClassifier, movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hann, ht, hp, htp] · simp [subgraphClassifier, radialAnnulusMonomial, combine, pi, f0, f1, f2, movingCenterNonstrictExteriorClassifier, movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hann, ht] · have ht0 : 0 ≤ zt.2 := le_of_not_gt ht by_cases hann : a * q ≤ dist zt.1 x ∧ dist zt.1 x ≤ b * q · by_cases hk : k = 0 · subst k simp [subgraphClassifier, radialAnnulusMonomial, combine, pi, f0, f1, f2, movingCenterNonstrictExteriorClassifier, movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hann, ht] · have hpow := radialPower_threshold_iff k hq ht0 (dist_nonneg : 0 ≤ dist zt.1 x) hk simp [subgraphClassifier, radialAnnulusMonomial, combine, pi, f0, f1, f2, movingCenterNonstrictExteriorClassifier, movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hann, ht, hk, hpow] · have hnot : ¬ zt.2 < 0 := ht simp [subgraphClassifier, radialAnnulusMonomial, combine, pi, f0, f1, f2, movingCenterNonstrictExteriorClassifier, movingCenterClosedBallClassifier, movingCenterBallExteriorClassifier, hann, ht, hnot]
EmpiricalCover 1 core · 1 supporting This module translates the finite-cover certificate used by the variance-adaptive maximal inequality into total boundedness and a numerical covering-number bound for Causalean's empirical function space. ★ coveringNumber_le
Polynomial empirical covers in Dudley's metric space
This module translates the finite-cover certificate used by the variance-adaptive maximal inequality into total boundedness and a numerical covering-number bound for Causalean's empirical function space. These are the two deterministic inputs expected by the existing Dudley theorem.
Covering-number bound from an empirical cover. Suppose F has polynomial empirical covering numbers with envelope U, base A, and exponent v, every member of F is measurable, the envelope U is strictly positive, the sample S has positive size n, and the relative scale ε lies in the interval ; then Dudley's empirical covering number of the class at radius ε * U, taken in the totally bounded empirical pseudometric space this cover furnishes, is at most the real power (A / ε) ^ v.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
totallyBoundedtheorem — If a class has a polynomial empirical covering certificate, its functions are measurable, and its envelope is positive, then its restriction to any finite sample of positive size is totally bounded in empirical root-mean-square distance.hypotheses𝒳 :sharedType uι :sharedType vι → 𝒳 → ℝU A v :ℝhcover :HasPolynomialEmpiricalL2Cover F U A vhmeas :∀ i, Measurable (F i)hU :0 < Un :ℕS :Fin n → 𝒳hn :0 < nconclusionProof (Lean source)
theorem HasPolynomialEmpiricalL2Cover.totallyBounded {F : ι → 𝒳 → ℝ} {U A v : ℝ} (hcover : HasPolynomialEmpiricalL2Cover F U A v) (hmeas : ∀ i, Measurable (F i)) (hU : 0 < U) {n : ℕ} (S : Fin n → 𝒳) (hn : 0 < n) : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S)) := by /- Follow `real_vcSubgraph_empirical_totallyBounded`: at an arbitrary radius `r > 0`, use relative scale `min 1 (r/U)`, map the finite index cover into `EmpiricalFunctionSpace F S`, and rewrite its `L²(Pₙ)` distances with `measureL2Dist_finiteSampleMeasure_eq_empiricalDist`. -/ classical rw [Metric.totallyBounded_iff] intro r hr let ε : ℝ := min 1 (r / U) have hε : 0 < ε := lt_min (by norm_num) (div_pos hr hU) have hε1 : ε ≤ 1 := min_le_left _ _ obtain ⟨C, hCcover, _hCcard⟩ := hcover S hn ε hε hε1 let T : Finset (EmpiricalFunctionSpace F S) := C.image fun j => ⟨j⟩ refine ⟨(T : Set (EmpiricalFunctionSpace F S)), T.finite_toSet, ?_⟩ intro q hq obtain ⟨j, hjC, hj⟩ := hCcover q.index have hεU : ε * U ≤ r := by calc ε * U ≤ (r / U) * U := mul_le_mul_of_nonneg_right (min_le_right _ _) (le_of_lt hU) _ = r := by field_simp have hj' : empiricalDist S (F q.index) (F j) < r := by rw [← measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas q.index) (hmeas j)] exact lt_of_lt_of_le hj hεU refine Set.mem_iUnion_of_mem (⟨j⟩ : EmpiricalFunctionSpace F S) ?_ refine Set.mem_iUnion_of_mem ?_ ?_ · exact Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨j, hjC, rfl⟩) · exact hj'
Cover 3 core · 13 supporting This module converts the finite-trace pseudo-dimension certificate into a uniform polynomial L²(Q) covering certificate. ★ radialMonomialOn_hasPolynomialL2Cover
Uniform polynomial covers for radial monomials
This module converts the finite-trace pseudo-dimension certificate into a
uniform polynomial L²(Q) covering certificate. The measure Q remains
arbitrary throughout, so atoms on moving annulus boundaries are included.
It also supplies two general assembly tools: pullback of a covering class along an arbitrary nonempty parameter map (using internal representatives at twice the preliminary radius), and the covering certificate for any bounded finite class. These tools let later score constructions reuse the existing sum and product closure lemmas.
For an upper relative radius and a nonnegative integer , the radial-monomial envelope is .
Definition (Lean source)
Given an observation space , a Euclidean dimension , a maximum degree , a location map from observations to -dimensional Euclidean space, a bandwidth , annulus radii and , a radial-monomial parameter θ, and an observation , the radial monomial evaluated at that observation is the corresponding radial-monomial class function evaluated at the mapped location.
Definition (Lean source)
Covering certificate transported through a location map. For a measurable map from the underlying observation space into d-dimensional Euclidean space, given a positive bandwidth q, composing the moving-center radial-monomial class of degree at most p with the location map still carries a uniform polynomial L² covering certificate at envelope radialMonomialEnvelope b p.
Formal statement
Proof (Lean source)
13 supporting declarations (lemmas, instances)
-
radialAnnulusMonomial_measurabletheorem — For a Euclidean dimension and degree, a bandwidth and annulus endpoints, and a fixed center, the corresponding compactly supported radial monomial is Borel measurable in the observation.hypothesesconclusionMeasurable (radialAnnulusMonomial d q a b k x)Proof (Lean source)
@[fun_prop] theorem radialAnnulusMonomial_measurable (d k : ℕ) (q a b : ℝ) (x : EuclideanPoint d) : Measurable (radialAnnulusMonomial d q a b k x) := by unfold radialAnnulusMonomial have hd : Measurable (fun z : EuclideanPoint d => dist z x) := measurable_id.dist measurable_const refine Measurable.ite ?_ ((hd.div measurable_const).pow_const k) measurable_const simpa only [Set.setOf_and] using (measurableSet_le measurable_const hd).inter (measurableSet_le hd measurable_const) -
abs_radialAnnulusMonomial_letheorem — For a Euclidean dimension, envelope degree, and monomial degree, a positive bandwidth, a degree below the envelope degree, and a center and evaluation point, the radial monomial is bounded in absolute value by the radial-monomial envelope.hypothesesconclusion|radialAnnulusMonomial d q a b k x z| ≤ radialMonomialEnvelope b pProof (Lean source)
theorem abs_radialAnnulusMonomial_le (d p k : ℕ) {q a b : ℝ} (hq : 0 < q) (hk : k ≤ p) (x z : EuclideanPoint d) : |radialAnnulusMonomial d q a b k x z| ≤ radialMonomialEnvelope b p := by rw [radialAnnulusMonomial] split_ifs with h · rw [abs_of_nonneg (pow_nonneg (div_nonneg dist_nonneg hq.le) _)] have hrb : dist z x / q ≤ b := (div_le_iff₀ hq).2 h.2 have hrM : dist z x / q ≤ max 1 b := hrb.trans (le_max_right _ _) have hM : 1 ≤ max 1 b := le_max_left _ _ exact (pow_le_pow_left₀ (div_nonneg dist_nonneg hq.le) hrM k).trans (pow_le_pow_right₀ hM hk) · rw [abs_zero] exact pow_nonneg (le_trans (by norm_num) (le_max_left 1 b)) p -
pullbacktheorem — Given a polynomial-cover certificate and a parameter map, pulling the class back along that map preserves a polynomial cover with a factor-two radius cost.hypotheses𝒳 :Type uι :Type vκ :Type wNonempty κF :ι → 𝒳 → ℝU :ℝhF :e :κ → ιconclusionHasPolynomialL2Cover (fun k => F (e k)) UProof (Lean source)
theorem HasPolynomialL2Cover.pullback {𝒳 : Type u} [MeasurableSpace 𝒳] {ι : Type v} {κ : Type w} [Nonempty κ] {F : ι → 𝒳 → ℝ} {U : ℝ} (hF : HasPolynomialL2Cover F U) (e : κ → ι) : HasPolynomialL2Cover (fun k => F (e k)) U := by refine ⟨hF.envelope_pos, fun k => hF.measurable (e k), fun k => hF.envelope (e k), ?_⟩ obtain ⟨A, p, hA, hent⟩ := hF.entropy refine ⟨2 * A, p, by nlinarith, ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨C, hCcard, hCcover⟩ := hent Q hQ (ε / 2) hhalf hhalf1 classical choose center hcenter_mem hcenter_dist using fun k => hCcover (e k) let occupied : Finset ι := C.filter fun i => ∃ k, center k = i let representative : ι → κ := fun i => if hi : ∃ k, center k = i then choose hi else choice inferInstance refine ⟨occupied.image representative, ?_, ?_⟩ · calc (occupied.image representative).card ≤ occupied.card := Finset.card_image_le _ ≤ C.card := Finset.card_filter_le _ _ _ ≤ ceil ((A / (ε / 2)) ^ p) := hCcard _ = ceil (((2 * A) / ε) ^ p) := by congr 2 field_simp · intro k have hocc : center k ∈ occupied := by simp only [occupied, mem_filter] exact ⟨hcenter_mem k, ⟨k, rfl⟩⟩ have hrep_center : center (representative (center k)) = center k := by dsimp only [representative] split · next h => exact Classical.choose_spec h · next h => exact (h ⟨k, rfl⟩).elim refine ⟨representative (center k), Finset.mem_image.mpr ⟨center k, hocc, rfl⟩, ?_⟩ letI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (F (e k)) (F (e (representative (center k)))) ≤ measureL2Dist Q (F (e k)) (F (center k)) + measureL2Dist Q (F (center k)) (F (e (representative (center k)))) := measureL2Dist_triangle' _ _ _ (hF.measurable _) (hF.measurable _) (hF.measurable _) (hF.envelope _) (hF.envelope _) _ = measureL2Dist Q (F (e k)) (F (center k)) + measureL2Dist Q (F (e (representative (center k)))) (F (center k)) := by congr 1 simp only [measureL2Dist] congr 2 funext x ring _ < ε * U := by have hrep_dist : measureL2Dist Q (F (e (representative (center k)))) (F (center k)) < ε / 2 * U := by simpa only [hrep_center] using hcenter_dist (representative (center k)) nlinarith [hcenter_dist k, hrep_dist] -
pullbacktheorem — Given named polynomial-cover witnesses and a parameter map, pulling the class back preserves the witnesses with the explicit factor-two radius cost.hypotheses𝒳 :Type uι :Type vκ :Type wNonempty κF :ι → 𝒳 → ℝU A :ℝp :ℕhF :HasPolynomialL2CoverWith F U A pe :κ → ιconclusionHasPolynomialL2CoverWith (fun k => F (e k)) U (2 * A) pProof (Lean source)
theorem HasPolynomialL2CoverWith.pullback {𝒳 : Type u} [MeasurableSpace 𝒳] {ι : Type v} {κ : Type w} [Nonempty κ] {F : ι → 𝒳 → ℝ} {U A : ℝ} {p : ℕ} (hF : HasPolynomialL2CoverWith F U A p) (e : κ → ι) : HasPolynomialL2CoverWith (fun k => F (e k)) U (2 * A) p := by refine ⟨HasPolynomialL2Cover.pullback hF.forget e, by linarith [hF.one_le_base], ?_⟩ intro Q hQ ε hε hε1 have hhalf : 0 < ε / 2 := by positivity have hhalf1 : ε / 2 ≤ 1 := by linarith obtain ⟨C, hCcard, hCcover⟩ := hF.entropy Q hQ (ε / 2) hhalf hhalf1 classical choose center hcenter_mem hcenter_dist using fun k => hCcover (e k) let occupied : Finset ι := C.filter fun i => ∃ k, center k = i let representative : ι → κ := fun i => if hi : ∃ k, center k = i then choose hi else choice inferInstance refine ⟨occupied.image representative, ?_, ?_⟩ · calc (occupied.image representative).card ≤ occupied.card := Finset.card_image_le _ ≤ C.card := Finset.card_filter_le _ _ _ ≤ ceil ((A / (ε / 2)) ^ p) := hCcard _ = ceil (((2 * A) / ε) ^ p) := by congr 2 field_simp · intro k have hocc : center k ∈ occupied := by simp only [occupied, mem_filter] exact ⟨hcenter_mem k, ⟨k, rfl⟩⟩ have hrep_center : center (representative (center k)) = center k := by dsimp only [representative] split · next h => exact Classical.choose_spec h · next h => exact (h ⟨k, rfl⟩).elim refine ⟨representative (center k), Finset.mem_image.mpr ⟨center k, hocc, rfl⟩, ?_⟩ letI : IsProbabilityMeasure Q := hQ calc measureL2Dist Q (F (e k)) (F (e (representative (center k)))) ≤ measureL2Dist Q (F (e k)) (F (center k)) + measureL2Dist Q (F (center k)) (F (e (representative (center k)))) := measureL2Dist_triangle' _ _ _ (hF.forget.measurable _) (hF.forget.measurable _) (hF.forget.measurable _) (hF.forget.envelope _) (hF.forget.envelope _) _ = measureL2Dist Q (F (e k)) (F (center k)) + measureL2Dist Q (F (e (representative (center k)))) (F (center k)) := by congr 1 simp only [measureL2Dist] congr 2 funext x ring _ < ε * U := by have hrep_dist : measureL2Dist Q (F (e (representative (center k)))) (F (center k)) < ε / 2 * U := by simpa only [hrep_center] using hcenter_dist (representative (center k)) nlinarith [hcenter_dist k, hrep_dist] -
pullbacktheorem — Given uniform named cover witnesses, nonempty replacement parameter types, and parameterwise maps into the original types, the parameterwise pullback preserves uniform cover witnesses.hypotheses𝒳 :Type uS :Type*S → Type vS → Type w(s : S) → ι s → 𝒳 → ℝS → ℝhF :hκ :∀ s, Nonempty (κ s)e :(s : S) → κ s → ι sconclusionHasUniformPolynomialL2CoverOver S (fun s k => F s (e s k)) UProof (Lean source)
theorem HasUniformPolynomialL2CoverOver.pullback {𝒳 : Type u} [MeasurableSpace 𝒳] {S : Type*} {ι : S → Type v} {κ : S → Type w} {F : (s : S) → ι s → 𝒳 → ℝ} {U : S → ℝ} (hF : HasUniformPolynomialL2CoverOver S F U) (hκ : ∀ s, Nonempty (κ s)) (e : (s : S) → κ s → ι s) : HasUniformPolynomialL2CoverOver S (fun s k => F s (e s k)) U := by obtain ⟨A, p, hF⟩ := hF refine ⟨2 * A, p, fun s => ?_⟩ letI : Nonempty (κ s) := hκ s exact HasPolynomialL2CoverWith.pullback (hF s) (e s) -
monoEnvelopetheorem — Given a polynomial-cover certificate and an enlarged envelope, the larger envelope preserves the certificate and its polynomial constants.hypothesesconclusionProof (Lean source)
theorem HasPolynomialL2Cover.monoEnvelope {𝒳 : Type u} [MeasurableSpace 𝒳] {ι : Type v} {F : ι → 𝒳 → ℝ} {U V : ℝ} (hF : HasPolynomialL2Cover F U) (hUV : U ≤ V) : HasPolynomialL2Cover F V := by refine ⟨hF.envelope_pos.trans_le hUV, hF.measurable, fun i x => (hF.envelope i x).trans hUV, ?_⟩ obtain ⟨A, p, hA, hent⟩ := hF.entropy refine ⟨A, p, hA, ?_⟩ intro Q hQ ε hε hε1 obtain ⟨C, hCcard, hCcover⟩ := hent Q hQ ε hε hε1 refine ⟨C, hCcard, ?_⟩ intro i obtain ⟨j, hjC, hij⟩ := hCcover i exact ⟨j, hjC, hij.trans_le (mul_le_mul_of_nonneg_left hUV hε.le)⟩ -
monoEnvelopetheorem — Given uniform named cover witnesses and parameterwise envelope enlargements, the larger envelopes preserve the uniform named witnesses.hypotheses𝒳 :Type uS :Type*S → Type v(s : S) → ι s → 𝒳 → ℝS → ℝhF :hUV :∀ s, U s ≤ V sconclusionProof (Lean source)
theorem HasUniformPolynomialL2CoverOver.monoEnvelope {𝒳 : Type u} [MeasurableSpace 𝒳] {S : Type*} {ι : S → Type v} {F : (s : S) → ι s → 𝒳 → ℝ} {U V : S → ℝ} (hF : HasUniformPolynomialL2CoverOver S F U) (hUV : ∀ s, U s ≤ V s) : HasUniformPolynomialL2CoverOver S F V := by obtain ⟨A, p, hF⟩ := hF exact ⟨A, p, fun s => monoEnvelope (hF s) (hUV s)⟩ -
finiteClass_hasPolynomialL2Covertheorem — Given a finite function family, a positive envelope, measurability of every function, and a common envelope bound, the family has a polynomial L² covering certificate.hypotheses𝒳 :Type uι :Type vFintype ιF :ι → 𝒳 → ℝU :ℝhU :0 < Uhmeas :∀ i, Measurable (F i)hbound :∀ i x, |F i x| ≤ UconclusionProof (Lean source)
theorem finiteClass_hasPolynomialL2Cover {𝒳 : Type u} [MeasurableSpace 𝒳] {ι : Type v} [Fintype ι] (F : ι → 𝒳 → ℝ) {U : ℝ} (hU : 0 < U) (hmeas : ∀ i, Measurable (F i)) (hbound : ∀ i x, |F i x| ≤ U) : HasPolynomialL2Cover F U := by refine ⟨hU, hmeas, hbound, max 1 (Fintype.card ι : ℝ), 1, le_max_left _ _, ?_⟩ intro Q hQ ε hε hε1 classical refine ⟨Finset.univ, ?_, ?_⟩ · rw [Finset.card_univ] have hA0 : 0 ≤ max 1 (Fintype.card ι : ℝ) := (by norm_num : (0 : ℝ) ≤ 1).trans (le_max_left _ _) have hreal : (Fintype.card ι : ℝ) ≤ max 1 (Fintype.card ι : ℝ) / ε := by calc (Fintype.card ι : ℝ) ≤ max 1 (Fintype.card ι : ℝ) := le_max_right _ _ _ ≤ max 1 (Fintype.card ι : ℝ) / ε := by apply (le_div_iff₀ hε).2 nlinarith [mul_nonneg hA0 (sub_nonneg.mpr hε1)] have hnat : Fintype.card ι ≤ ceil (max 1 (Fintype.card ι : ℝ) / ε) := by exact_mod_cast hreal.trans (Nat.le_ceil (max 1 (Fintype.card ι : ℝ) / ε)) simpa using hnat · intro i refine ⟨i, Finset.mem_univ _, ?_⟩ simp [measureL2Dist, mul_pos hε hU] -
finiteClass_hasPolynomialL2CoverWiththeorem — Given a finite function family, a positive envelope, measurability of every function, and a common envelope bound, the family has named polynomial-cover witnesses depending only on its cardinality.hypotheses𝒳 :Type uι :Type vFintype ιF :ι → 𝒳 → ℝU :ℝhU :0 < Uhmeas :∀ i, Measurable (F i)hbound :∀ i x, |F i x| ≤ UconclusionHasPolynomialL2CoverWith F U (max 1 (Fintype.card ι : ℝ)) 1Proof (Lean source)
theorem finiteClass_hasPolynomialL2CoverWith {𝒳 : Type u} [MeasurableSpace 𝒳] {ι : Type v} [Fintype ι] (F : ι → 𝒳 → ℝ) {U : ℝ} (hU : 0 < U) (hmeas : ∀ i, Measurable (F i)) (hbound : ∀ i x, |F i x| ≤ U) : HasPolynomialL2CoverWith F U (max 1 (Fintype.card ι : ℝ)) 1 := by refine ⟨finiteClass_hasPolynomialL2Cover F hU hmeas hbound, le_max_left _ _, ?_⟩ intro Q hQ ε hε hε1 classical refine ⟨Finset.univ, ?_, ?_⟩ · rw [Finset.card_univ] have hA0 : 0 ≤ max 1 (Fintype.card ι : ℝ) := (by norm_num : (0 : ℝ) ≤ 1).trans (le_max_left _ _) have hreal : (Fintype.card ι : ℝ) ≤ max 1 (Fintype.card ι : ℝ) / ε := by calc (Fintype.card ι : ℝ) ≤ max 1 (Fintype.card ι : ℝ) := le_max_right _ _ _ ≤ max 1 (Fintype.card ι : ℝ) / ε := by apply (le_div_iff₀ hε).2 nlinarith [mul_nonneg hA0 (sub_nonneg.mpr hε1)] have hnat : Fintype.card ι ≤ ceil (max 1 (Fintype.card ι : ℝ) / ε) := by exact_mod_cast hreal.trans (Nat.le_ceil (max 1 (Fintype.card ι : ℝ) / ε)) simpa using hnat · intro i refine ⟨i, Finset.mem_univ _, ?_⟩ simp [measureL2Dist, mul_pos hε hU] -
radialMonomialClass_hasPolynomialL2Covertheorem — For a Euclidean dimension and maximal degree and a positive bandwidth, the moving-center radial monomials through that degree have a uniform polynomial cover with the radial-monomial envelope.hypothesesd p :ℕq a b :ℝhq :0 < qconclusionProof (Lean source)
theorem radialMonomialClass_hasPolynomialL2Cover (d p : ℕ) {q a b : ℝ} (hq : 0 < q) : HasPolynomialL2Cover (radialMonomialClass d p q a b) (radialMonomialEnvelope b p) := by apply (radialMonomialClass_hasPseudoDimAtMost d p hq).hasPolynomialL2Cover · intro θ exact radialAnnulusMonomial_measurable d θ.2.1 q a b θ.1 · unfold radialMonomialEnvelope positivity · intro θ z apply abs_radialAnnulusMonomial_le d p θ.2.1 hq exact le_of_lt_succ θ.2.2 -
radialAnnulusMonomial_hasPolynomialL2Covertheorem — For a Euclidean dimension, maximal degree, and selected degree, a positive bandwidth, and a selected degree below the maximum, the fixed-degree moving-center class has the full class's polynomial cover and envelope.hypothesesd p k :ℕq a b :ℝhq :0 < qhk :k ≤ pconclusionHasPolynomialL2Cover (fun x : EuclideanPoint d => radialAnnulusMonomial d q a b k x) (radialMonomialEnvelope b p)Proof (Lean source)
theorem radialAnnulusMonomial_hasPolynomialL2Cover (d p k : ℕ) {q a b : ℝ} (hq : 0 < q) (hk : k ≤ p) : HasPolynomialL2Cover (fun x : EuclideanPoint d => radialAnnulusMonomial d q a b k x) (radialMonomialEnvelope b p) := by let degree : Fin (p + 1) := ⟨k, Nat.lt_succ_iff.mpr hk⟩ exact HasPolynomialL2Cover.pullback (radialMonomialClass_hasPolynomialL2Cover d p hq) (fun x : EuclideanPoint d => (x, degree)) -
radialMonomialOn_hasPolynomialL2CoverWiththeorem — For a Euclidean dimension and maximal degree, a location map, measurability of that map, and a positive bandwidth, the observation-indexed radial class has explicit named entropy witnesses.hypothesesconclusionHasPolynomialL2CoverWith (radialMonomialOn d p loc q a b) (radialMonomialEnvelope b p) 16 (8 * (radialPseudoDimBound d p + 1))Proof (Lean source)
theorem radialMonomialOn_hasPolynomialL2CoverWith {Ω : Type u} [MeasurableSpace Ω] (d p : ℕ) (loc : Ω → EuclideanPoint d) {q a b : ℝ} (hloc : Measurable loc) (hq : 0 < q) : HasPolynomialL2CoverWith (radialMonomialOn d p loc q a b) (radialMonomialEnvelope b p) 16 (8 * (radialPseudoDimBound d p + 1)) := by apply (HasPseudoDimAtMost.compDomain (radialMonomialClass_hasPseudoDimAtMost d p hq) loc).hasPolynomialL2CoverWith · intro θ exact (radialAnnulusMonomial_measurable d θ.2.1 q a b θ.1).comp hloc · unfold radialMonomialEnvelope positivity · intro θ ω apply abs_radialAnnulusMonomial_le d p θ.2.1 hq exact le_of_lt_succ θ.2.2 -
finiteSignedArmRadial_hasPolynomialL2Covertheorem — For a Euclidean dimension and maximal degree, a location map, a finite family of signed arms, measurability of the location map, measurability of every arm, a unit bound on every arm, and a positive bandwidth, multiplying each moving-center radial monomial by an arm preserves a uniform polynomial cover.hypothesesΩ :Type uA :Type vFintype Ad p :ℕloc :Ω → EuclideanPoint darm :A → Ω → ℝq a b :ℝhloc :Measurable locharmMeas :∀ s, Measurable (arm s)harmBound :∀ s ω, |arm s ω| ≤ 1hq :0 < qconclusionHasPolynomialL2Cover (fun θ : RadialMonomialParam d p × A => fun ω => radialMonomialOn d p loc q a b θ.1 ω * arm θ.2 ω) (radialMonomialEnvelope b p)Proof (Lean source)
theorem finiteSignedArmRadial_hasPolynomialL2Cover {Ω : Type u} [MeasurableSpace Ω] {A : Type v} [Fintype A] (d p : ℕ) (loc : Ω → EuclideanPoint d) (arm : A → Ω → ℝ) {q a b : ℝ} (hloc : Measurable loc) (harmMeas : ∀ s, Measurable (arm s)) (harmBound : ∀ s ω, |arm s ω| ≤ 1) (hq : 0 < q) : HasPolynomialL2Cover (fun θ : RadialMonomialParam d p × A => fun ω => radialMonomialOn d p loc q a b θ.1 ω * arm θ.2 ω) (radialMonomialEnvelope b p) := by classical have hU : 0 < radialMonomialEnvelope b p := by unfold radialMonomialEnvelope positivity cases isEmpty_or_nonempty A with | inl hA => letI : IsEmpty A := hA refine ⟨hU, ?_, ?_, ?_⟩ · intro θ exact isEmptyElim θ.2 · intro θ exact isEmptyElim θ.2 · refine ⟨1, 0, le_rfl, ?_⟩ intro Q hQ ε hε hε1 refine ⟨∅, by simp, ?_⟩ intro θ exact isEmptyElim θ.2 | inr hA => letI : Nonempty A := hA have hrad := radialMonomialOn_hasPolynomialL2Cover d p loc hloc (a := a) (b := b) hq have harm : HasPolynomialL2Cover arm 1 := finiteClass_hasPolynomialL2Cover arm (by norm_num) harmMeas harmBound simpa using hrad.mul harm
Empirical 2 core · 6 supporting This module specializes the arbitrary-probability-measure VC-subgraph theorem to the empirical law of a nonempty finite sample, translates its L² distance to the existing empirical pseudometric, and exposes a fixed total ★ real_vcSubgraph_dudley_example
Empirical-measure and Dudley bridges
This module specializes the arbitrary-probability-measure VC-subgraph theorem
to the empirical law of a nonempty finite sample, translates its L² distance
to the existing empirical pseudometric, and exposes a fixed total-boundedness
witness and covering-number bound consumable by Dudley chaining.
For a sample of observations in a measurable space, the finite-sample measure assigns equal mass to each observation, equivalently forming the normalized sum of point masses at the observations (with the displayed formula also determining the value when ).
Direct application to the fixed-sample Dudley bound. For a measurable class of pseudo-dimension at most d, uniformly bounded by a positive envelope U, and a positive scale δ strictly less than U/2, evaluated on a sample S of positive size n, the class's empirical restriction is totally bounded, its covering number at every relative radius ε in (0,1] obeys the same polynomial bound vcSubgraphCoverBound d ε, and consequently its empirical Rademacher complexity without the outer absolute value is at most the Dudley entropy-integral bound 4δ + (12/√n) ∫_δ^(U/2) √(log(coveringNumber' x)) dx.
Formal statement
Proof (Lean source)
6 supporting declarations (lemmas, instances)
-
finiteSampleMeasure_isProbabilityMeasuretheorem — A finite sample with positive size has an empirical law that is a probability measure.hypothesesconclusionProof (Lean source)
theorem finiteSampleMeasure_isProbabilityMeasure {n : ℕ} (S : Fin n → 𝒳) (hn : 0 < n) : IsProbabilityMeasure (finiteSampleMeasure S) := by refine ⟨?_⟩ simp only [finiteSampleMeasure, Measure.smul_apply, Measure.finset_sum_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), Finset.sum_const, Finset.card_univ, Fintype.card_fin] rw [ENNReal.ofReal_natCast] simpa [nsmul_eq_mul] using ENNReal.inv_mul_cancel (Nat.cast_ne_zero.mpr (Nat.ne_of_gt hn)) (ENNReal.natCast_ne_top n) -
integral_finiteSampleMeasuretheorem — For a finite sample and a measurable real-valued function, integration against the empirical law equals the function's arithmetic average over the sample.hypothesesconclusion∫ x, f x ∂finiteSampleMeasure S = (1 / (n : ℝ)) * ∑ i : Fin n, f (S i)Proof (Lean source)
theorem integral_finiteSampleMeasure {n : ℕ} (S : Fin n → 𝒳) {f : 𝒳 → ℝ} (hf : Measurable f) : ∫ x, f x ∂finiteSampleMeasure S = (1 / (n : ℝ)) * ∑ i : Fin n, f (S i) := by rw [finiteSampleMeasure, integral_smul_measure] rw [integral_finset_sum_measure] · simp only [integral_dirac' f _ hf.stronglyMeasurable, ENNReal.toReal_inv, ENNReal.ofReal_natCast, ENNReal.toReal_natCast, smul_eq_mul] rw [one_div] · intro i hi exact integrable_dirac' hf.stronglyMeasurable (by simp) -
measureL2Dist_finiteSampleMeasure_eq_empiricalDisttheorem — For a finite sample and two measurable functions, their distance under the empirical law equals their empirical root-mean-square distance.hypothesesconclusionProof (Lean source)
theorem measureL2Dist_finiteSampleMeasure_eq_empiricalDist {n : ℕ} (S : Fin n → 𝒳) {f g : 𝒳 → ℝ} (hf : Measurable f) (hg : Measurable g) : measureL2Dist (finiteSampleMeasure S) f g = empiricalDist S f g := by rw [measureL2Dist, empiricalDist, empiricalNorm, integral_finiteSampleMeasure S ((hf.fun_sub hg).pow_const 2)] simp only [Pi.sub_apply, one_div] -
real_vcSubgraph_empirical_l2_coveringtheorem — If a class consists of measurable functions, has bounded pseudo-dimension, has a positive envelope, is evaluated at a positive relative radius, and obeys the envelope pointwise, then any finite sample of positive size inherits the stated VC-subgraph covering bound.hypotheses𝒳 :sharedType uι :sharedType vNonempty ιι → 𝒳 → ℝd n :ℕhmeas :∀ i, Measurable (F i)hpdim :U ε :ℝhU :0 < Uhε :0 < εhε1 :ε ≤ 1henvelope :∀ i x, |F i x| ≤ US :Fin n → 𝒳hn :0 < nconclusionProof (Lean source)
theorem real_vcSubgraph_empirical_l2_covering [Nonempty ι] {F : ι → 𝒳 → ℝ} {d n : ℕ} (hmeas : ∀ i, Measurable (F i)) (hpdim : HasPseudoDimAtMost F d) {U ε : ℝ} (hU : 0 < U) (hε : 0 < ε) (hε1 : ε ≤ 1) (henvelope : ∀ i x, |F i x| ≤ U) (S : Fin n → 𝒳) (hn : 0 < n) : L2CoveringNumberLe (finiteSampleMeasure S) F (ε * U) (vcSubgraphCoverBound d ε) := by letI : IsProbabilityMeasure (finiteSampleMeasure S) := finiteSampleMeasure_isProbabilityMeasure S hn exact real_vcSubgraph_l2_covering F d hmeas hpdim hU hε hε1 henvelope (finiteSampleMeasure S) -
real_vcSubgraph_empirical_totallyBoundedtheorem — If a class consists of measurable functions, has bounded pseudo-dimension, has a positive envelope, and obeys the envelope pointwise, then its restriction to any finite sample of positive size is totally bounded.hypotheses𝒳 :sharedType uι :sharedType vNonempty ιι → 𝒳 → ℝd n :ℕhmeas :∀ i, Measurable (F i)hpdim :U :ℝhU :0 < Uhenvelope :∀ i x, |F i x| ≤ US :Fin n → 𝒳hn :0 < nconclusionProof (Lean source)
theorem real_vcSubgraph_empirical_totallyBounded [Nonempty ι] {F : ι → 𝒳 → ℝ} {d n : ℕ} (hmeas : ∀ i, Measurable (F i)) (hpdim : HasPseudoDimAtMost F d) {U : ℝ} (hU : 0 < U) (henvelope : ∀ i x, |F i x| ≤ U) (S : Fin n → 𝒳) (hn : 0 < n) : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S)) := by classical rw [Metric.totallyBounded_iff] intro r hr let ε : ℝ := min 1 (r / U) have hε : 0 < ε := lt_min (by norm_num) (div_pos hr hU) have hε1 : ε ≤ 1 := min_le_left _ _ obtain ⟨C, hCcard, hCcover⟩ := real_vcSubgraph_empirical_l2_covering hmeas hpdim hU hε hε1 henvelope S hn let T : Finset (EmpiricalFunctionSpace F S) := C.image fun j => ⟨j⟩ refine ⟨(T : Set (EmpiricalFunctionSpace F S)), T.finite_toSet, ?_⟩ intro q hq obtain ⟨j, hjC, hj⟩ := hCcover q.index have hεU : ε * U ≤ r := by calc ε * U ≤ (r / U) * U := mul_le_mul_of_nonneg_right (min_le_right _ _) (le_of_lt hU) _ = r := by field_simp have hj' : empiricalDist S (F q.index) (F j) < r := by rw [← measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas q.index) (hmeas j)] exact lt_of_lt_of_le hj hεU refine Set.mem_iUnion_of_mem (⟨j⟩ : EmpiricalFunctionSpace F S) ?_ refine Set.mem_iUnion_of_mem ?_ ?_ · exact Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨j, hjC, rfl⟩) · exact hj' -
real_vcSubgraph_empirical_coveringNumber_letheorem — If a class consists of measurable functions, has bounded pseudo-dimension, has a positive envelope, is evaluated at a positive relative radius, and obeys the envelope pointwise, then on any finite sample of positive size, its empirical covering number has the stated polynomial bound.hypotheses𝒳 :sharedType uι :sharedType vNonempty ιι → 𝒳 → ℝd n :ℕhmeas :∀ i, Measurable (F i)hpdim :U ε :ℝhU :0 < Uhε :0 < εhε1 :ε ≤ 1henvelope :∀ i x, |F i x| ≤ US :Fin n → 𝒳hn :0 < nconclusionhtot :real_vcSubgraph_empirical_totallyBounded hmeas hpdim hU henvelope S hncoveringNumber' htot (ε * U) ≤ vcSubgraphCoverBound d εProof (Lean source)
theorem real_vcSubgraph_empirical_coveringNumber_le [Nonempty ι] {F : ι → 𝒳 → ℝ} {d n : ℕ} (hmeas : ∀ i, Measurable (F i)) (hpdim : HasPseudoDimAtMost F d) {U ε : ℝ} (hU : 0 < U) (hε : 0 < ε) (hε1 : ε ≤ 1) (henvelope : ∀ i x, |F i x| ≤ U) (S : Fin n → 𝒳) (hn : 0 < n) : let htot := real_vcSubgraph_empirical_totallyBounded hmeas hpdim hU henvelope S hn coveringNumber' htot (ε * U) ≤ vcSubgraphCoverBound d ε := by classical dsimp only let htot := real_vcSubgraph_empirical_totallyBounded hmeas hpdim hU henvelope S hn let r := ε * U have hr : 0 < r := mul_pos hε hU obtain ⟨C, hCcard, hCcover⟩ := real_vcSubgraph_empirical_l2_covering hmeas hpdim hU hε hε1 henvelope S hn let T : Finset (EmpiricalFunctionSpace F S) := C.image fun j => ⟨j⟩ have hTcover : (Set.univ : Set (EmpiricalFunctionSpace F S)) ⊆ ⋃ y ∈ T, ball y r := by intro q hq obtain ⟨j, hjC, hj⟩ := hCcover q.index have hj' : empiricalDist S (F q.index) (F j) < r := by rw [← measureL2Dist_finiteSampleMeasure_eq_empiricalDist S (hmeas q.index) (hmeas j)] exact hj refine Set.mem_iUnion_of_mem (⟨j⟩ : EmpiricalFunctionSpace F S) ?_ refine Set.mem_iUnion_of_mem ?_ ?_ · exact Finset.mem_coe.mpr (Finset.mem_image.mpr ⟨j, hjC, rfl⟩) · exact hj' rw [coveringNumber'_eq htot hr] calc find (coveringNumber_exists htot hr) ≤ T.card := Nat.find_min' (coveringNumber_exists htot hr) ⟨T, rfl, hTcover⟩ _ ≤ C.card := Finset.card_image_le _ ≤ vcSubgraphCoverBound d ε := hCcard
EntropyChaining 3 core · 1 supporting This file packages the measurable envelope, population-radius, and uniform polynomial-cover hypotheses needed by the variance-adaptive expected maximal inequality, and derives the corresponding countable chaining bound. ★ vcEntropy_chaining_bound
VC entropy chaining for expected empirical maxima
This file packages the measurable envelope, population-radius, and uniform polynomial-cover hypotheses needed by the variance-adaptive expected maximal inequality, and derives the corresponding countable chaining bound.
For a measure on a measurable sample space, a class of real-valued functions indexed by a set, an envelope bound, a radius, a covering constant, and an entropy exponent, the class has uniform VC-type entropy exactly when (1) the radius is positive, (2) the radius is strictly smaller than the envelope bound, (3) the covering constant is at least , (4) the entropy exponent is at least one, (5) every function in the class is measurable, (6) every function is bounded in absolute value by the envelope bound at every sample point, (7) every function has population distance at most the radius from the zero function, and (8) for every sequence of indices, the resulting sequence of functions has the stipulated polynomial empirical covering property.
Definition (Lean source)
For a measure on a measurable sample space, a class of real-valued functions, a countable enumeration of that class, and a finite sample, the countable empirical-process supremum is the extended nonnegative real supremum, over the enumerated functions, of the absolute centered empirical average.
Definition (Lean source)
Dudley chaining bound for VC-type entropy. Let μ be a probability measure on Ω, g : ι → Ω → ℝ a family of functions, and g0 : ℕ → ι a sequence of indices (for example an enumeration of a countable dense subfamily). If g has uniform VC-type entropy relative to μ, with envelope U, population radius σ, covering-entropy base A, and exponent v, then there is a constant C > 0, which may depend on U, σ, A and v, such that, for every sample size n ≥ 1, the expectation of the countable empirical-process supremum along the enumeration g0 over the n-fold product of μ is at most C · (σ √(log(U/σ)/n) + U log(U/σ)/n).
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
countableEmpiricalProcessSup_eq_of_envelopelemma — If the envelope bound is positive, every function in the class is measurable and bounded by that envelope, and the sample size is positive, then the extended-nonnegative-real supremum along an enumeration equals ENNReal.ofReal applied to the shared real-valued uniformDeviation supremum for the measure, class, enumeration, and sample under consideration.hypothesesΩ ι :Type*μ :g :ι → Ω → ℝg0 :ℕ → ιU :ℝhU :0 < Uhmeas :∀ i, Measurable (g i)henv :∀ i x, |g i x| ≤ Un :ℕhn :0 < nw :Fin n → ΩconclusioncountableEmpiricalProcessSup μ g g0 w= ofReal (uniformDeviation n (fun k => g (g0 k)) μ id w)Proof (Lean source)
lemma countableEmpiricalProcessSup_eq_of_envelope {Ω ι : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (g : ι → Ω → ℝ) (g0 : ℕ → ι) {U : ℝ} (hU : 0 < U) (hmeas : ∀ i, Measurable (g i)) (henv : ∀ i x, |g i x| ≤ U) {n : ℕ} (hn : 0 < n) (w : Fin n → Ω) : countableEmpiricalProcessSup μ g g0 w = ofReal (uniformDeviation n (fun k => g (g0 k)) μ id w) := by simp only [countableEmpiricalProcessSup, uniformDeviation, centeredEmpiricalAverage, id_eq] refine (Monotone.map_ciSup_of_continuousAt ENNReal.continuous_ofReal.continuousAt ENNReal.ofReal_mono (bdd := ?_)).symm refine ⟨2 * U, ?_⟩ rintro _ ⟨k, rfl⟩ have hint : Integrable (g (g0 k)) μ := Integrable.of_bound (hmeas (g0 k)).aestronglyMeasurable U (ae_of_all _ fun x => by simpa [Real.norm_eq_abs] using henv (g0 k) x) have hmean : |∫ x, g (g0 k) x ∂μ| ≤ U := by calc |∫ x, g (g0 k) x ∂μ| ≤ ∫ x, |g (g0 k) x| ∂μ := abs_integral_le_integral_abs _ ≤ ∫ _x, U ∂μ := integral_mono hint.abs (integrable_const U) (henv (g0 k)) _ = U := by simp have havg : |(n : ℝ)⁻¹ * ∑ i, g (g0 k) (w i)| ≤ U := by calc |(n : ℝ)⁻¹ * ∑ i, g (g0 k) (w i)| = (n : ℝ)⁻¹ * |∑ i, g (g0 k) (w i)| := by rw [abs_mul, abs_of_pos (inv_pos.mpr (Nat.cast_pos.mpr hn))] _ ≤ (n : ℝ)⁻¹ * ∑ i, |g (g0 k) (w i)| := by gcongr exact Finset.abs_sum_le_sum_abs _ _ _ ≤ (n : ℝ)⁻¹ * ∑ _i : Fin n, U := by gcongr with i; exact henv (g0 k) (w i) _ = U := by simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] field_simp change |(n : ℝ)⁻¹ * ∑ i, g (g0 k) (w i) - ∫ x, g (g0 k) x ∂μ| ≤ 2 * U exact (abs_sub _ _).trans (by linarith)
ExpectedMaximal 1 core · 1 supporting This module proves the countable-class expected empirical-supremum bound from the variance-adaptive Rademacher chaining estimate and symmetrization. ★ varianceAdaptiveExpectedMaximal_le
Variance-adaptive expected maximal inequality for countable VC-type classes
This module proves the countable-class expected empirical-supremum bound from
the variance-adaptive Rademacher chaining estimate and symmetrization. It
also provides an adapter for Causalean's existing uniform polynomial L²
covering certificate.
Variance-adaptive expected maximal inequality. Let P be a probability measure on the sample space and F a countable family of real-valued functions on it. Suppose the population radius σ is strictly positive and strictly less than the envelope U, the covering-entropy base A is at least Euler's number and the exponent v is at least one, every function in F is measurable and bounded in absolute value by U, each function's population distance from the zero function is at most σ, F has polynomial empirical covering numbers with envelope U, base A, and exponent v, and the sample size n is positive. Then the expected empirical supremum of F over an n-point i.i.d. sample drawn from P is at most the universal constant varianceAdaptiveVCConstant times the variance-adaptive rate σ √(v log(AU/σ)/n) + v U log(AU/σ)/n.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
varianceAdaptiveExpectedMaximal_letheorem — For a probability law, a countable function class with a polynomial covering certificate, a positive population radius below its envelope, and the corresponding population root-mean-square bound, there are explicit entropy constants for which the variance-adaptive expected maximal inequality holds at every positive sample size.hypotheses𝒳 :sharedType uι :sharedType vNonempty ιCountable ιP :F :ι → 𝒳 → ℝU σ :ℝhF :hσ :0 < σhσU :σ < UhL2 :∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σconclusion∃ A v : ℝ,exp 1 ≤ A1 ≤ vProof (Lean source)
theorem HasPolynomialL2Cover.varianceAdaptiveExpectedMaximal_le [Nonempty ι] [Countable ι] (P : Measure 𝒳) [IsProbabilityMeasure P] (F : ι → 𝒳 → ℝ) {U σ : ℝ} (hF : HasPolynomialL2Cover F U) (hσ : 0 < σ) (hσU : σ < U) (hL2 : ∀ i, measureL2Dist P (F i) (fun _ => 0) ≤ σ) : ∃ A v : ℝ, exp 1 ≤ A ∧ 1 ≤ v ∧ ∀ n : ℕ, 0 < n → ∫ S : Fin n → 𝒳, uniformDeviation n F P id S ∂Measure.pi (fun _ : Fin n => P) ≤ varianceAdaptiveVCConstant * vcExpectedMaximalRate U σ A v n := by /- Obtain empirical constants from `HasPolynomialL2Cover.hasPolynomialEmpiricalL2Cover` and invoke the main theorem using the measurability and envelope fields of `hF`. -/ obtain ⟨A, v, hA, hv, hcover⟩ := hF.hasPolynomialEmpiricalL2Cover refine ⟨A, v, hA, hv, ?_⟩ intro n hn exact varianceAdaptiveExpectedMaximal_le P F hσ hσU hA hv hF.measurable hF.envelope hL2 hcover n hn
Score 8 core · 3 supporting This module assembles the moving-center radial basis into a bounded polynomial and then into the residual score shape used by local-polynomial empirical process arguments. ★ radialResidualScore_hasPolynomialL2Cover
Bounded radial-polynomial score classes
This module assembles the moving-center radial basis into a bounded polynomial and then into the residual score shape used by local-polynomial empirical process arguments. Coefficients range over the existing finite coefficient box, all polynomial terms share one moving center, and a finite signed arm may multiply the score.
The proofs are designed to reuse HasPolynomialL2Cover.add, .mul, .neg,
.finSum, the bounded finite-class certificate, and parameter pullback. No
measure regularity beyond measurability is imposed, so the result remains
uniform for atomic probability measures.
Given a natural dimension, a maximal degree, a bandwidth and two relative annulus endpoints, a coefficient bound, a center, a boxed coefficient vector, and an evaluation point, the bounded radial polynomial is the coefficient-weighted sum of the radial annulus monomials about the shared center.
Definition (Lean source)
Given a natural dimension, a maximal degree, and a coefficient bound, the radial-polynomial parameter space consists of a Euclidean center paired with a coefficient vector whose every coordinate has absolute value at most .
Definition (Lean source)
Given an observation space equipped with a σ-algebra, a natural dimension, a maximal degree, a Euclidean location map, a bandwidth and two relative annulus endpoints, a coefficient bound, a radial-polynomial parameter, and an observation, the observation-indexed bounded radial polynomial is evaluated at the Euclidean location of that observation.
Definition (Lean source)
Given an outer relative radius, a maximal degree, and a coefficient bound, the radial-polynomial envelope is times the radial-monomial envelope at that outer radius and degree.
Definition (Lean source)
Given a natural dimension, a maximal degree, a coefficient bound, and an arm index set, the radial residual-score parameter space consists of a radial-polynomial parameter paired with one arm index.
Definition (Lean source)
Given an observation space equipped with a σ-algebra, an arm index set, a natural dimension, a maximal degree, a Euclidean location map, an arm-valued function, a response function, a bandwidth and two relative annulus endpoints, a coefficient bound, a degree index, a residual-score parameter, and an observation, the radial residual score is the arm value times the selected radial monomial times the residual from the shared-center polynomial fit.
Definition (Lean source)
Given an outer relative radius, a maximal degree, a coefficient bound, and a response bound, the radial residual-score envelope is the radial-monomial envelope times the sum of and the radial-polynomial envelope.
Definition (Lean source)
Covering certificate for a bounded finite-arm residual score. Given a measurable Euclidean location map, a finite family of arms, each measurable and bounded in absolute value by 1, a measurable response variable that is bounded in absolute value by R, together with a positive bandwidth q, a positive polynomial-coefficient bound B, and a positive response bound R, then the score formed by multiplying a bounded arm function, a radial monomial, and the residual of the response against a boxed radial-polynomial fit carries a positive-envelope uniform polynomial L²(Q) covering certificate — with envelope radialResidualScoreEnvelope b p B R — over every probability measure Q, including atomic ones.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
abs_boundedRadialPolynomial_letheorem — For a Euclidean dimension and maximal degree, a positive bandwidth, a nonnegative coefficient bound, a center, a boxed coefficient vector, and an evaluation point, the shared-center radial polynomial is bounded by its stated envelope.hypothesesd p :ℕq a b B :ℝhq :0 < qhB :0 ≤ Bx :z :conclusion|boundedRadialPolynomial d p q a b B x β z| ≤ radialPolynomialEnvelope b p BProof (Lean source)
theorem abs_boundedRadialPolynomial_le (d p : ℕ) {q a b B : ℝ} (hq : 0 < q) (hB : 0 ≤ B) (x : EuclideanPoint d) (β : CoeffBox (Fin (p + 1)) B) (z : EuclideanPoint d) : |boundedRadialPolynomial d p q a b B x β z| ≤ radialPolynomialEnvelope b p B := by classical calc |boundedRadialPolynomial d p q a b B x β z| ≤ ∑ k : Fin (p + 1), |β.1 k * radialAnnulusMonomial d q a b k.1 x z| := by exact Finset.abs_sum_le_sum_abs _ _ _ = ∑ k : Fin (p + 1), |β.1 k| * |radialAnnulusMonomial d q a b k.1 x z| := by apply Finset.sum_congr rfl intro k _ rw [abs_mul] _ ≤ ∑ _k : Fin (p + 1), B * radialMonomialEnvelope b p := by exact Finset.sum_le_sum fun k _ => mul_le_mul (β.2 k) (abs_radialAnnulusMonomial_le d p k.1 hq (le_of_lt_succ k.2) x z) (abs_nonneg _) hB _ = radialPolynomialEnvelope b p B := by simp [radialPolynomialEnvelope] ring -
boundedRadialPolynomialOn_hasPolynomialL2Covertheorem — For a Euclidean dimension and maximal degree, a location map, measurability of that map, a positive bandwidth, and a positive coefficient bound, boxed radial polynomials sharing one moving center have a uniform polynomial covering certificate.hypothesesΩ :Type ud p :ℕloc :Ω → EuclideanPoint dq a b B :ℝhloc :Measurable lochq :0 < qhB :0 < BconclusionProof (Lean source)
theorem boundedRadialPolynomialOn_hasPolynomialL2Cover {Ω : Type u} [MeasurableSpace Ω] (d p : ℕ) (loc : Ω → EuclideanPoint d) {q a b B : ℝ} (hloc : Measurable loc) (hq : 0 < q) (hB : 0 < B) : HasPolynomialL2Cover (boundedRadialPolynomialOn d p loc q a b B) (radialPolynomialEnvelope b p B) := by classical let M := radialMonomialEnvelope b p have hM : 0 < M := by dsimp [M, radialMonomialEnvelope] positivity letI : Nonempty (CoeffBox (Fin (p + 1)) B) := ⟨⟨fun _ => 0, fun _ => by simpa using hB.le⟩⟩ have hcoeff (k : Fin (p + 1)) : HasPolynomialL2Cover (fun β : CoeffBox (Fin (p + 1)) B => fun _ω : Ω => β.1 k) B := by have hbase := linearParameterClass_hasPolynomialL2Cover (𝒳 := Ω) (K := Fin 1) (B := B) (M := 1) (fun _ _ => (1 : ℝ)) hB (by norm_num) (fun _ => measurable_const) (fun _ _ => by norm_num) have hpull := pullback hbase (fun β : CoeffBox (Fin (p + 1)) B => (⟨fun _ : Fin 1 => β.1 k, fun _ => β.2 k⟩ : CoeffBox (Fin 1) B)) convert hpull using 1 · funext β ω simp [linearParameterClass] · simp have hradial (k : Fin (p + 1)) : HasPolynomialL2Cover (fun x : EuclideanPoint d => fun ω => radialAnnulusMonomial d q a b k.1 x (loc ω)) M := by have hfull := radialMonomialOn_hasPolynomialL2Cover d p loc hloc (a := a) (b := b) hq have hpull := pullback hfull (fun x : EuclideanPoint d => (x, k)) exact hpull have hterm (k : Fin (p + 1)) : HasPolynomialL2Cover (fun t : CoeffBox (Fin (p + 1)) B × EuclideanPoint d => fun ω => t.1.1 k * radialAnnulusMonomial d q a b k.1 t.2 (loc ω)) (B * M) := by exact (hcoeff k).mul (hradial k) have hsum := HasPolynomialL2Cover.finSum hterm have hpull := pullback hsum (fun θ : RadialPolynomialParam d p B => fun k => (θ.2, θ.1)) change HasPolynomialL2Cover (fun θ : RadialPolynomialParam d p B => fun ω => ∑ k : Fin (p + 1), θ.2.1 k * radialAnnulusMonomial d q a b k.1 θ.1 (loc ω)) (((p + 1 : ℕ) : ℝ) * B * M) simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, Nat.cast_add, Nat.cast_one, mul_assoc] using hpull -
radialResidualScore_hasUniformPolynomialL2CoverWiththeorem — For a Euclidean dimension and polynomial degree, there are entropy witnesses, depending only on those values and the finite arm type, that cover every admissible radial residual-score class. In particular, the witnesses are uniform over location maps, arms, responses, bandwidths, annuli, and envelope radii.hypothesesconclusion∃ C : ℝ,∃ n : ℕ,∀ (loc : Ω → EuclideanPoint d) (arm : A → Ω → ℝ) (response : Ω → ℝ) {q a b B R : ℝ},Measurable loc → (∀ s, Measurable (arm s)) → (∀ s ω, |arm s ω| ≤ 1) → Measurable response → (∀ ω, |response ω| ≤ R) → 0 < q → 0≤ a → a ≤ b → 0 < B → 0 < R → HasPolynomialL2CoverWith (fun θ : RadialResidualScoreParam d p B A × Fin (p + 1) => radialResidualScore d p loc arm response q a b B θ.2 θ.1) (radialResidualScoreEnvelope b p B R) C nProof (Lean source)
theorem radialResidualScore_hasUniformPolynomialL2CoverWith {Ω : Type u} [MeasurableSpace Ω] {A : Type v} [Fintype A] [Nonempty A] (d p : ℕ) : ∃ C : ℝ, ∃ n : ℕ, ∀ (loc : Ω → EuclideanPoint d) (arm : A → Ω → ℝ) (response : Ω → ℝ) {q a b B R : ℝ}, Measurable loc → (∀ s, Measurable (arm s)) → (∀ s ω, |arm s ω| ≤ 1) → Measurable response → (∀ ω, |response ω| ≤ R) → 0 < q → 0 ≤ a → a ≤ b → 0 < B → 0 < R → HasPolynomialL2CoverWith (fun θ : RadialResidualScoreParam d p B A × Fin (p + 1) => radialResidualScore d p loc arm response q a b B θ.2 θ.1) (radialResidualScoreEnvelope b p B R) C n := by classical let S := RadialResidualCoverData Ω A d p let M : S → ℝ := fun s => radialMonomialEnvelope s.b p let P : S → ℝ := fun s => radialPolynomialEnvelope s.b p s.B have hcoeff (k : Fin (p + 1)) : HasUniformPolynomialL2CoverOver S (fun s (β : CoeffBox (Fin (p + 1)) s.B) (_ω : Ω) => β.1 k) (fun s => s.B) := by refine ⟨32, 24, fun s => ?_⟩ letI : Nonempty (CoeffBox (Fin 1) s.B) := ⟨⟨fun _ => 0, fun _ => by simpa using s.B_pos.le⟩⟩ letI : Nonempty (CoeffBox (Fin (p + 1)) s.B) := ⟨⟨fun _ => 0, fun _ => by simpa using s.B_pos.le⟩⟩ have hbase := (linearParameterClass_hasPseudoDimAtMost (𝒳 := Ω) (K := Fin 1) (fun _ _ => (1 : ℝ)) s.B).hasPolynomialL2CoverWith (fun _ => measurable_const) (by simpa using s.B_pos) (fun θ ω => by simp [linearParameterClass] exact θ.2 0) have hpull := HasPolynomialL2CoverWith.pullback hbase (fun β : CoeffBox (Fin (p + 1)) s.B => (⟨fun _ : Fin 1 => β.1 k, fun _ => β.2 k⟩ : CoeffBox (Fin 1) s.B)) convert hpull using 1 · funext β ω simp [linearParameterClass] · norm_num · simp have hradial : HasUniformPolynomialL2CoverOver S (fun s (x : EuclideanPoint d × Fin (p + 1)) ω => radialAnnulusMonomial d s.q s.a s.b x.2.1 x.1 (s.loc ω)) M := by refine ⟨16, 8 * (radialPseudoDimBound d p + 1), fun s => ?_⟩ exact radialMonomialOn_hasPolynomialL2CoverWith d p s.loc s.loc_measurable s.q_pos have hradialDegree (k : Fin (p + 1)) : HasUniformPolynomialL2CoverOver S (fun s (x : EuclideanPoint d) ω => radialAnnulusMonomial d s.q s.a s.b k.1 x (s.loc ω)) M := by exact pullback hradial (fun _ => inferInstance) (fun _ x => (x, k)) have hterm (k : Fin (p + 1)) : HasUniformPolynomialL2CoverOver S (fun s (t : CoeffBox (Fin (p + 1)) s.B × EuclideanPoint d) ω => t.1.1 k * radialAnnulusMonomial d s.q s.a s.b k.1 t.2 (s.loc ω)) (fun s => s.B * M s) := (hcoeff k).mul (hradialDegree k) have hsum := HasUniformPolynomialL2CoverOver.finSum hterm have hpoly : HasUniformPolynomialL2CoverOver S (fun s (θ : RadialPolynomialParam d p s.B) ω => boundedRadialPolynomial d p s.q s.a s.b s.B θ.1 θ.2 (s.loc ω)) P := by have hpull := pullback hsum (fun s => ⟨(0, ⟨fun _ => 0, fun _ => by simpa using s.B_pos.le⟩)⟩) (fun s (θ : RadialPolynomialParam d p s.B) k => (θ.2, θ.1)) simpa only [boundedRadialPolynomial, P, M, radialPolynomialEnvelope, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, Nat.cast_add, Nat.cast_one, mul_assoc] using hpull have harm : HasUniformPolynomialL2CoverOver S (fun s => s.arm) (fun _ => 1) := by refine ⟨max 1 (Fintype.card A : ℝ), 1, fun s => ?_⟩ exact finiteClass_hasPolynomialL2CoverWith s.arm (by norm_num) s.arm_measurable s.arm_bound have hresponse : HasUniformPolynomialL2CoverOver S (fun s (_ : Unit) => s.response) (fun s => s.R) := by refine ⟨1, 1, fun s => ?_⟩ simpa using finiteClass_hasPolynomialL2CoverWith (fun _ : Unit => s.response) s.R_pos (fun _ => s.response_measurable) (fun _ => s.response_bound) have harmLeading := harm.mul hradial have hresidual := hresponse.add hpoly.neg have hsuper := harmLeading.mul hresidual have hpull := pullback hsuper (fun s => ⟨((0, ⟨fun _ => 0, fun _ => by simpa using s.B_pos.le⟩), choice inferInstance), 0⟩) (fun s (θ : RadialResidualScoreParam d p s.B A × Fin (p + 1)) => ((θ.1.2, (θ.1.1.1, θ.2)), ((), θ.1.1))) obtain ⟨C, n, hpull⟩ := hpull refine ⟨C, n, ?_⟩ intro loc arm response q a b B R hloc harmMeas harmBound hresponseMeas hresponseBound hq ha hab hB hR let s : S := { loc := loc arm := arm response := response q := q a := a b := b B := B R := R loc_measurable := hloc arm_measurable := harmMeas arm_bound := harmBound response_measurable := hresponseMeas response_bound := hresponseBound q_pos := hq a_nonneg := ha ab := hab B_pos := hB R_pos := hR } have hs := hpull s simp only [one_mul] at hs exact hs
Separability 3 core · 0 supporting This file gives a paper-neutral criterion reducing an uncountable empirical supremum to a fixed countable, pointwise-dense subfamily under every finite product law. ★ hasCountableEmpiricalSupReduction_of_pointwise_dense
Countable reduction of empirical suprema
This file gives a paper-neutral criterion reducing an uncountable empirical supremum to a fixed countable, pointwise-dense subfamily under every finite product law.
Given a measure on an observation space, a sample of observations, and a real-valued function, the centered empirical average is its sample average minus its integral with respect to . For an empty sample the average term is zero by the inverse-of-zero convention, so the value is minus the integral.
Definition (Lean source)
Given a measure on an observation space and a family of real-valued functions indexed by a set , the countable empirical-supremum reduction property holds exactly when every member of the family is measurable and there is a sequence of indices whose associated countable subfamily has, for every sample size, the same supremum of absolute centered empirical averages as the full family almost surely under the corresponding product measure.
Definition (Lean source)
Countable supremum reduction from pointwise density. Let μ be a σ-finite measure on Ω, g : ι → Ω → ℝ a family of functions, and g0 : ℕ → ι a countable subfamily. Suppose S is a μ-conull subset of Ω, on S, every g i is the pointwise limit, along some subsequence, of the countable subfamily g ∘ g0, each g i is measurable, and there is a single μ-integrable envelope G dominating |g i| uniformly in i. Then the countable subfamily indexed by g0 realizes the full continuum empirical-process supremum of g almost surely under every finite product law of μ.
Formal statement
Proof (Lean source)
Trace 4 core · 6 supporting This module provides a homogeneous linear-sign VC bound, deliberately coarse but explicit bounds for finite Boolean combinations and finite unions, and reindexing lemmas for both Boolean VC dimension and pseudo-dimension ★ booleanCombination_hasVCAtMost
Finite-trace tools for VC and pseudo-dimension bounds
This module provides a homogeneous linear-sign VC bound, deliberately coarse but explicit bounds for finite Boolean combinations and finite unions, and reindexing lemmas for both Boolean VC dimension and pseudo-dimension.
The Boolean-combination theorem is trace-level: its combining formula may depend on the sampled point. In particular, it supports applications whose formula changes with the sign of the sampled threshold.
Given a number of Boolean component classes and a common VC-dimension bound, the Boolean-combination VC bound is the explicit natural number .
Definition (Lean source)
Given a number of component classes and a common VC-dimension bound, the finite-union VC bound is the explicit natural number .
Definition (Lean source)
Given a finite feature index set, a real-valued feature family, a real coefficient vector, and an evaluation point, the homogeneous linear-sign classifier returns true exactly when the coefficient-feature inner product is positive.
Given Boolean classifier families, a common VC-dimension certificate for them, and a point-dependent combining rule, the combined class has VC dimension at most booleanCombinationVCBound m d.
Formal statement
Proof (Lean source)
6 supporting declarations (lemmas, instances)
-
reindextheorem — Given a Boolean class with a finite-trace VC bound and a reparameterization map, reparameterizing the class preserves that VC bound.hypothesesconclusionHasVCAtMost (fun k => π (e k)) dProof (Lean source)
theorem HasVCAtMost.reindex {ι : Type v} {κ : Type w} {π : ι → 𝒳 → Bool} {d : ℕ} (hπ : HasVCAtMost π d) (e : κ → ι) : HasVCAtMost (fun k => π (e k)) d := by intro n S apply (Finset.vcDim_mono (ℬ := growthFamily π S) ?_).trans (hπ n S) intro A hA rw [mem_growthFamily_iff] at hA ⊢ obtain ⟨k, rfl⟩ := hA exact ⟨e k, rfl⟩ -
compDomaintheorem — Given a Boolean class with a finite-trace VC bound and a map into its observation domain, precomposing the observation argument preserves that VC bound.hypothesesconclusionHasVCAtMost (fun i y => π i (g y)) dProof (Lean source)
theorem HasVCAtMost.compDomain {ι : Type v} {𝒴 : Type w} {π : ι → 𝒳 → Bool} {d : ℕ} (hπ : HasVCAtMost π d) (g : 𝒴 → 𝒳) : HasVCAtMost (fun i y => π i (g y)) d := by intro n S exact hπ n (fun j => g (S j)) -
reindextheorem — Given a real-valued class with a pseudo-dimension bound and a reparameterization map, reparameterizing the class preserves that pseudo-dimension bound.hypothesesconclusionHasPseudoDimAtMost (fun k => F (e k)) dProof (Lean source)
theorem HasPseudoDimAtMost.reindex {ι : Type v} {κ : Type w} {F : ι → 𝒳 → ℝ} {d : ℕ} (hF : HasPseudoDimAtMost F d) (e : κ → ι) : HasPseudoDimAtMost (fun k => F (e k)) d := by intro n T apply (Finset.vcDim_mono (ℬ := growthFamily (subgraphClassifier F) T) ?_).trans (hF n T) intro A hA rw [mem_growthFamily_iff] at hA ⊢ obtain ⟨k, rfl⟩ := hA exact ⟨e k, rfl⟩ -
compDomaintheorem — Given a real-valued class with a pseudo-dimension bound and a map into its observation domain, precomposing every function preserves that pseudo-dimension bound.hypothesesconclusionHasPseudoDimAtMost (fun i y => F i (g y)) dProof (Lean source)
theorem HasPseudoDimAtMost.compDomain {ι : Type v} {𝒴 : Type w} {F : ι → 𝒳 → ℝ} {d : ℕ} (hF : HasPseudoDimAtMost F d) (g : 𝒴 → 𝒳) : HasPseudoDimAtMost (fun i y => F i (g y)) d := by intro n T exact hF n (fun j => (g (T j).1, (T j).2)) -
linearSignClass_hasVCAtMosttheorem — Given a real-valued feature family, the associated homogeneous linear threshold classifiers have VC dimension at most the number of coordinates.hypothesesconclusionProof (Lean source)
theorem linearSignClass_hasVCAtMost {K : Type v} [Fintype K] (φ : K → 𝒳 → ℝ) : HasVCAtMost (linearSignClass φ) (card K) := by classical intro n S unfold vcDim refine Finset.sup_le fun s hs => ?_ rw [Finset.mem_shatterer] at hs by_contra hcard have hcard_lt : card K < s.card := by omega let v : {i // i ∈ s} → K → ℝ := fun i k => φ k (S i.1) have hvdep : ¬ LinearIndependent ℝ v := by intro hv have hle := hv.fintype_card_le_finrank rw [Module.finrank_pi, Fintype.card_coe] at hle omega obtain ⟨a, ha0, i0, hi0⟩ := Fintype.not_linearIndependent_iff.mp hvdep let g : {i // i ∈ s} → ℝ := if 0 < a i0 then a else fun i => -a i have hg0 : ∑ i, g i • v i = 0 := by dsimp [g] split_ifs · exact ha0 · calc ∑ i, (-a i) • v i = ∑ i, -(a i • v i) := by apply Finset.sum_congr rfl intro i _ exact neg_smul (a i) (v i) _ = -(∑ i, a i • v i) := by rw [Finset.sum_neg_distrib] _ = 0 := by rw [ha0, neg_zero] have hgi0 : 0 < g i0 := by dsimp [g] split_ifs with h · exact h · exact neg_pos.mpr (lt_of_le_of_ne (le_of_not_gt h) hi0) let g0 : Fin n → ℝ := fun i => if hi : i ∈ s then g ⟨i, hi⟩ else 0 let t : Finset (Fin n) := s.filter fun i => 0 < g0 i have hts : t ⊆ s := filter_subset _ _ obtain ⟨u, hu_growth, hsu⟩ := hs hts obtain ⟨θ, hθ⟩ := mem_growthFamily_iff.mp hu_growth have hlabel (i : {i // i ∈ s}) : linearSignClass φ θ (S i.1) = true ↔ 0 < g i := by rw [← restrictionPattern_mem_iff (p := linearSignClass φ θ) (S := S) (j := i.1), hθ] have hi_mem : i.1 ∈ u ↔ i.1 ∈ t := by constructor · intro hiu have : i.1 ∈ s ∩ u := Finset.mem_inter.mpr ⟨i.2, hiu⟩ rwa [hsu] at this · intro hit have : i.1 ∈ s ∩ u := by rwa [hsu] exact (Finset.mem_inter.mp this).2 rw [hi_mem] simp only [t, mem_filter, i.2, true_and] simp [g0, i.2] let e : {i // i ∈ s} → ℝ := fun i => ∑ k, θ k * φ k (S i.1) have he_pos (i : {i // i ∈ s}) (hi : 0 < g i) : 0 < e i := by simpa [linearSignClass, e] using (hlabel i).2 hi have he_nonpos (i : {i // i ∈ s}) (hi : ¬ 0 < g i) : e i ≤ 0 := by have hfalse : linearSignClass φ θ (S i.1) ≠ true := (hlabel i).not.mpr hi simpa [linearSignClass, e] using hfalse have hprod_nonneg (i : {i // i ∈ s}) : 0 ≤ g i * e i := by by_cases hi : 0 < g i · exact (mul_pos hi (he_pos i hi)).le · exact mul_nonneg_of_nonpos_of_nonpos (le_of_not_gt hi) (he_nonpos i hi) have hprod_pos : 0 < g i0 * e i0 := mul_pos hgi0 (he_pos i0 hgi0) have hsum_pos : 0 < ∑ i, g i * e i := Finset.sum_pos' (fun i _ => hprod_nonneg i) ⟨i0, Finset.mem_univ _, hprod_pos⟩ have hsum_zero : ∑ i, g i * e i = 0 := by have hcoord (k : K) : ∑ i, g i * v i k = 0 := by have := congrFun hg0 k simpa [Pi.smul_apply, smul_eq_mul] using this simp_rw [e, Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_eq_zero intro k _ rw [show (∑ i, g i * (θ k * φ k (S i.1))) = θ k * ∑ i, g i * v i k by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro i _ dsimp [v] ring] rw [hcoord, mul_zero] linarith -
finiteUnion_hasVCAtMosttheorem — Given a finite family of Boolean classifier families and a common VC-dimension certificate for them, their dependent union has VC dimension at most finiteUnionVCBound m d.hypothesesconclusionProof (Lean source)
theorem finiteUnion_hasVCAtMost {K : Type v} [Fintype K] {ι : K → Type w} {d : ℕ} (π : (k : K) → ι k → 𝒳 → Bool) (hπ : ∀ k, HasVCAtMost (π k) d) : HasVCAtMost (fun θ : Sigma ι => π θ.1 θ.2) (finiteUnionVCBound (card K) d) := by simpa only [finiteUnionVCBound] using hasVCAtMost_of_growth_card_le (fun θ : Sigma ι => π θ.1 θ.2) (card K * (d + 1)) (fun n S => finiteUnion_growth_card_le (n := n) π hπ S)