Stat.Concentration.Covering.DudleyEntropy
Dudley's chaining bound.
Chaining 6 core · 12 supporting This file constructs dyadic cover approximations and chain increments in the empirical pseudometric. ★ split_main_and_increment_terms
Finite Dudley chains
This file constructs dyadic cover approximations and chain increments in the empirical pseudometric. It establishes boundedness of the main and increment suprema and splits the signed Rademacher average into the pieces estimated by the later parts of the Dudley argument.
The dyadic radius at a chaining level is the initial radius divided by two repeatedly at each successive level. These radii set the resolution of the finite covers in the Dudley entropy argument.
Definition (Lean source)
At each positive dyadic radius, this selects a finite cover of the empirical function class. The selected cover supplies the approximation candidates at that level of the chaining construction.
Definition (Lean source)
For a sample size, the inverse sign-vector count is the reciprocal of the number of possible Rademacher sign vectors of that length. It normalizes the averages over signs in the chaining argument.
Definition (Lean source)
Each function in the empirical class is assigned one representative from the finite cover at every dyadic resolution. The assigned representative is within that resolution's radius and is used to form the chaining approximation.
Definition (Lean source)
The chaining approximation is zero at the coarsest level and otherwise uses the selected finite-cover representative at the corresponding dyadic resolution. It provides the successive approximations whose increments control empirical Rademacher complexity.
Definition (Lean source)
For a function class evaluated on a finite sample, a positive radius and evidence of its positivity, a uniform empirical-radius bound, total boundedness of the empirical class, and a terminal chaining level, the empirical Rademacher complexity is bounded by the sum of the terminal approximation term and all successive chaining increments.
Formal statement
Proof (Lean source)
12 supporting declarations (lemmas, instances)
-
term_le_total_sum_of_nonnegtheorem — A nonnegative term in a finite sum is bounded by the full sum of nonnegative terms.Proof (Lean source)
theorem term_le_total_sum_of_nonneg {α : Type u} [Fintype α] {M : Type*} [AddCommMonoid M] [Preorder M] [IsOrderedAddMonoid M] (j : α) (f : α → M) (h0 : ∀ j, 0 ≤ f j) : f j ≤ ∑ i : α, f i := by classical have hj : j ∈ (Finset.univ : Finset α) := by simp have hsum : (Finset.univ.erase j).sum (fun i : α => f i) + f j = ∑ i : α, f i := by exact Finset.sum_erase_add _ _ hj have h_nonneg : 0 ≤ (Finset.univ.erase j).sum (fun i : α => f i) := by refine Finset.sum_nonneg ?_ intro i hi exact h0 i have h_le : f j ≤ (Finset.univ.erase j).sum (fun i : α => f i) + f j := by simpa [add_comm] using add_le_add_left h_nonneg (f j) exact h_le.trans_eq hsum -
ej_poslemma — When the initial radius is positive, every dyadic chaining radius is positive. -
e_nonemptylemma — The empirical function space of a nonempty indexed class is nonempty.hypothesesconclusion(Set.univ : Set (EmpiricalFunctionSpace F S)).NonemptyProof (Lean source)
lemma e_nonempty : (Set.univ : Set (EmpiricalFunctionSpace F S)).Nonempty := by classical obtain ⟨i⟩ := (inferInstance : Nonempty ι) exact ⟨⟨i⟩, by simp⟩ -
exists_cover_approximationlemma — For a positive initial radius and a totally bounded empirical function space, every indexed function has a representative in each finite dyadic cover within that cover's radius.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh :ιj :ℕconclusion∃ f_j : EmpiricalFunctionSpace F S,conclusion 1f_j ∈ cj c_pos h jconclusion 2empiricalDist S (F fh) f_j ≤ ej c jProof (Lean source)
lemma exists_cover_approximation (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (fh : ι) (j : ℕ) : ∃ f_j : EmpiricalFunctionSpace F S, f_j ∈ cj c_pos h j ∧ empiricalDist S (F fh) f_j ≤ ej c j := by have : ⟨fh⟩ ∈ ⋃ y ∈ coveringFinset h (ej_pos c_pos j), ball y (ej c j) := coveringFinset_cover h (ej_pos c_pos j) (Set.mem_univ fh) obtain ⟨y, hy⟩ := Set.mem_iUnion.mp this obtain ⟨hy', hy''⟩ := Set.mem_iUnion.mp hy use ⟨y.index⟩ constructor · exact hy' · exact le_of_lt hy'' -
coverApprox_mem_coverlemma — For a positive initial radius and a totally bounded empirical function space, the chosen approximation belongs to its finite dyadic cover.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh :ιj :ℕconclusioncoverApprox c_pos h fh j ∈ cj c_pos h jProof (Lean source)
lemma coverApprox_mem_cover (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (fh : ι) (j : ℕ) : coverApprox c_pos h fh j ∈ cj c_pos h j := by classical exact (Classical.choose_spec (exists_cover_approximation c_pos h fh j)).1 -
empiricalDist_coverApprox_le_radiuslemma — For a positive initial radius and a totally bounded empirical function space, the empirical distance from a function to its chosen cover representative is at most the dyadic radius.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh :ιj :ℕconclusionProof (Lean source)
lemma empiricalDist_coverApprox_le_radius (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (fh : ι) (j : ℕ) : empiricalDist S (F fh) (coverApprox c_pos h fh j) ≤ ej c j := by classical exact (Classical.choose_spec (exists_cover_approximation c_pos h fh j)).2 -
chainApprox_deflemma — For a positive initial radius and a totally bounded empirical function space, the level-zero chain approximation is zero and every other level is the chosen cover approximation.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh j :conclusionchainApprox c_pos h fh j = if j = 0 then 0 else (coverApprox c_pos h fh j : Z → ℝ)Proof (Lean source)
lemma chainApprox_def (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) : ∀ fh j, chainApprox c_pos h fh j = if j = 0 then 0 else (coverApprox c_pos h fh j : Z → ℝ) := by intro fh j dsimp [chainApprox] -
chainApprox_succlemma — For a positive initial radius and a totally bounded empirical function space, the chain approximation at every positive level equals the chosen cover approximation at that level.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh :ιj :ℕconclusionchainApprox c_pos h fh (j + 1) = (coverApprox c_pos h fh (j + 1) : Z → ℝ)Proof (Lean source)
lemma chainApprox_succ (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (fh : ι) (j : ℕ) : chainApprox c_pos h fh (j + 1) = (coverApprox c_pos h fh (j + 1) : Z → ℝ) := by simp [chainApprox] -
pointwise_bound_from_empirical_normlemma — If every function has empirical norm at most a given bound on a positive-size sample, then its absolute value at each sampled observation is at most the sample-size square root times that bound.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝcs :∀ f : ι, empiricalNorm S (F f) ≤ ci :Fin mhm_pos :0 < mf :ιconclusion|F f (S i)| ≤ √↑m * cProof (Lean source)
lemma pointwise_bound_from_empirical_norm (cs : ∀ f : ι, empiricalNorm S (F f) ≤ c) (i : Fin m) (hm_pos : 0 < m) : ∀ (f : ι), |F f (S i)| ≤ √↑m * c := by intro f dsimp [empiricalNorm] at cs have fcs := cs f -- from a finite-sample ℓ₂ bound to a pointwise bound via the coordinate projection inequality have hm_pos : 0 < (m : ℝ) := by norm_cast have hm_sqrt_pos : 0 < sqrt (m : ℝ) := Real.sqrt_pos.2 hm_pos have hproj := empiricalDist_proj (S := S) (f := F f) (i := i) have hcancel : sqrt (m : ℝ) ≠ 0 := ne_of_gt hm_sqrt_pos have h1 : |F f (S i)| ≤ √↑m * empiricalNorm S (F f) := by have hproj' := mul_le_mul_of_nonneg_left hproj (le_of_lt hm_sqrt_pos) -- simplify the left side using positivity of √m have hleft : √↑m * (|F f (S i)| / √↑m) = |F f (S i)| := by field_simp [hcancel] simpa [hleft] using hproj' calc |F f (S i)| ≤ √↑m * empiricalNorm S (F f) := h1 _ ≤ √↑m * c := by apply mul_le_mul_of_nonneg_left fcs exact le_of_lt hm_sqrt_pos -
bddAbove_main_termtheorem — The main remainder term in the Dudley chain has a finite upper bound.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝ0 < ccs :∀ (f : ι), empiricalNorm S (F f) ≤ ch :n :ℕm_pos :¬m = 0i :Signs mconclusionProof (Lean source)
theorem splitBound.bddAbove_main_term {c_pos : 0 < c} (cs : ∀ (f : ι), empiricalNorm S (F f) ≤ c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (n : ℕ) (m_pos : ¬m = 0) (i : Signs m) : BddAbove (range fun fh ↦ ∑ i_1, ↑↑(i i_1) * (F fh (S i_1) - chainApprox c_pos h fh n (S i_1))) := by rw [bddAbove_def] classical refine ⟨m * (2 * (sqrt (m : ℝ) * c)), ?_⟩ intro y hy rcases hy with ⟨fh, rfl⟩ have hmpos : 0 < m := Nat.pos_of_ne_zero m_pos calc (∑ i_1, (i i_1 : ℝ) * (F fh (S i_1) - chainApprox c_pos h fh n (S i_1))) ≤ ∑ i_1, |(i i_1 : ℝ) * (F fh (S i_1) - chainApprox c_pos h fh n (S i_1))| := by refine Finset.sum_le_sum ?_ intro _ _ exact le_abs_self _ _ = ∑ i_1, |F fh (S i_1) - chainApprox c_pos h fh n (S i_1)| := by apply Finset.sum_congr rfl intro _ _ simp [abs_mul] _ ≤ ∑ i_1, (|F fh (S i_1)| + |chainApprox c_pos h fh n (S i_1)|) := by refine Finset.sum_le_sum ?_ intro i_1 _ have htri : |F fh (S i_1) - chainApprox c_pos h fh n (S i_1)| ≤ |F fh (S i_1)| + |chainApprox c_pos h fh n (S i_1)| := by exact abs_sub (F fh (S i_1)) (chainApprox c_pos h fh n (S i_1)) exact htri _ ≤ ∑ i_1, (sqrt (m : ℝ) * c + sqrt (m : ℝ) * c) := by refine Finset.sum_le_sum ?_ intro i_1 _ have hF : |F fh (S i_1)| ≤ sqrt (m : ℝ) * c := pointwise_bound_from_empirical_norm cs i_1 hmpos fh have hG : |chainApprox c_pos h fh n (S i_1)| ≤ sqrt (m : ℝ) * c := chainApprox_pointwise_bound c_pos hmpos cs n h i_1 fh have : |F fh (S i_1)| + |chainApprox c_pos h fh n (S i_1)| ≤ sqrt (m : ℝ) * c + sqrt (m : ℝ) * c := by nlinarith exact this _ = m * (2 * (sqrt (m : ℝ) * c)) := by simp grind -
bddAbove_increment_termtheorem — The sum of chaining increment terms has a finite upper bound.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝ0 < ccs :∀ (f : ι), empiricalNorm S (F f) ≤ ch :n :ℕm_pos :¬m = 0i :Signs mconclusionBddAbove (Set.range fun fh ↦ ∑ x_1 : Fin n, ∑ i_1, ↑↑(i i_1) * (chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1)))Proof (Lean source)
theorem splitBound.bddAbove_increment_term {c_pos : 0 < c} (cs : ∀ (f : ι), empiricalNorm S (F f) ≤ c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (n : ℕ) (m_pos : ¬m = 0) (i : Signs m) : BddAbove (Set.range fun fh ↦ ∑ x_1 : Fin n, ∑ i_1, ↑↑(i i_1) * (chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1))) := by rw [bddAbove_def] classical refine ⟨(n : ℝ) * m * (2 * (sqrt (m : ℝ) * c)), ?_⟩ intro y hy rcases hy with ⟨fh, rfl⟩ have hmpos : 0 < m := Nat.pos_of_ne_zero m_pos calc (∑ x_1 : Fin n, ∑ i_1, (i i_1 : ℝ) * (chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1))) ≤ ∑ x_1 : Fin n, ∑ i_1, |(i i_1 : ℝ) * (chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1))| := by refine Finset.sum_le_sum ?_ intro _ _ refine Finset.sum_le_sum ?_ intro _ _ exact le_abs_self _ _ = ∑ x_1 : Fin n, ∑ i_1, |chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1)| := by apply Finset.sum_congr rfl intro _ _ apply Finset.sum_congr rfl intro i_1 _ obtain ⟨v, hv⟩ := i i_1 simp at hv cases hv with | inl hv => simp [hv]; rw [<- abs_neg]; apply congrArg; linarith | inr hv => simp [hv] _ ≤ ∑ x_1 : Fin n, ∑ i_1, 2 * (sqrt (m : ℝ) * c) := by refine Finset.sum_le_sum ?_ intro x_1 _ refine Finset.sum_le_sum ?_ intro i_1 _ have hdiff : |chainApprox c_pos h fh (↑x_1 + 1) (S i_1) - chainApprox c_pos h fh (↑x_1) (S i_1)| ≤ 2 * (sqrt (m : ℝ) * c) := chainApprox_increment_bound c_pos hmpos cs (↑x_1) h i_1 fh nlinarith _ = (n : ℝ) * m * (2 * (sqrt (m : ℝ) * c)) := by simp [Finset.sum_const, Finset.card_univ, mul_assoc, mul_left_comm, mul_comm]
EntropyBound 1 core · 0 supporting This file assembles the finite-chain and Riemann-integral estimates into dudley_entropy_integral_bound, the signed empirical Rademacher bound for a totally bounded function class at a positive truncation scale. ★ dudley_entropy_integral_bound
Dudley entropy-integral bound
This file assembles the finite-chain and Riemann-integral estimates into
dudley_entropy_integral_bound, the signed empirical Rademacher bound for a
totally bounded function class at a positive truncation scale.
Dudley entropy-integral bound, without the outer absolute value. Fix a positive scale ε that is strictly less than half the common empirical-norm envelope c, where the sample size m is positive, every member of the class has empirical norm on the sample at most c, and the sample-restricted function class is totally bounded in the empirical pseudometric. Then the empirical Rademacher complexity computed without the outer absolute value is at most 4ε + (12/√m) ∫_ε^(c/2) √(log(coveringNumber' x)) dx, the usual Dudley chaining bound in terms of the covering-number entropy integral.
Formal statement
Proof (Lean source)
PartA 1 core · 2 supporting This file bounds the first, coarse-scale part of the dyadic Dudley chain. ★ partA_sup_bound
Dudley chaining: coarse-scale term
This file bounds the first, coarse-scale part of the dyadic Dudley chain. It
relates the signed empirical sum to empirical distance and proves
partA_sup_bound, leaving increment entropy and integral comparison to the
subsequent files.
For a function class evaluated on a finite sample, a positive empirical radius, positivity of that radius, total boundedness of the empirical class, a uniform empirical-radius bound, a chaining level, a sign vector, and a selected function, the signed terminal approximation error is at most the sample size times the dyadic radius at that level.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
empiricalDist_to_chainApprox_le_ejlemma — If the initial radius is positive, the empirical function space is totally bounded, and every class member has empirical norm at most that radius, then the distance from a class member to its level-n chain approximation is at most the level-n dyadic radius.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch :fh :ιn :ℕcs :∀ f : ι, empiricalNorm S (F f) ≤ cconclusionempiricalDist S (F fh) (chainApprox c_pos h fh n) ≤ c / 2 ^ nProof (Lean source)
lemma empiricalDist_to_chainApprox_le_ej (c_pos : 0 < c) (h : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (fh : ι) (n : ℕ) (cs : ∀ f : ι, empiricalNorm S (F f) ≤ c) : empiricalDist S (F fh) (chainApprox c_pos h fh n) ≤ c / 2 ^ n := by by_cases h' : n = 0 · simpa [chainApprox_def c_pos h, h'] using cs fh · rw [chainApprox_def c_pos h, if_neg h'] exact empiricalDist_coverApprox_le_radius c_pos h fh n -
signed_sum_le_empiricalDistlemma — A signed sum of pointwise differences is at most the sample size times the empirical distance between the two functions.hypothesesconclusion∑ i : Fin m, (σ i : ℝ) * (f (S i) - g (S i)) ≤ m * empiricalDist S f gProof (Lean source)
lemma signed_sum_le_empiricalDist (f g : Z → ℝ) (σ : Signs m) : ∑ i : Fin m, (σ i : ℝ) * (f (S i) - g (S i)) ≤ m * empiricalDist S f g := by calc _ = @inner ℝ (EuclideanSpace ℝ (Fin m)) _ (toLp 2 fun i ↦ (σ i : ℝ)) (toLp 2 fun i ↦ f (S i) - g (S i)) := by simp [inner] apply Finset.sum_congr rfl intro i hi exact (RCLike.inner_apply' (↑↑(σ i) : ℝ) (f (S i) - g (S i))).symm -- Use Cauchy-Schwarz inequality _ ≤ (@norm (EuclideanSpace ℝ (Fin m)) _ (toLp 2 fun i ↦ (σ i : ℝ))) * (@norm (EuclideanSpace ℝ (Fin m)) _ (toLp 2 fun i ↦ f (S i) - g (S i))) := @real_inner_le_norm (EuclideanSpace ℝ (Fin m)) _ _ (toLp 2 fun i ↦ (σ i : ℝ)) (toLp 2 fun i ↦ f (S i) - g (S i)) _ = m * empiricalDist S f g := by simp [norm, empiricalNorm] have : (∑ i, (σ i : ℝ) ^ 2) = m := by have : (∑ i, (σ i : ℝ) ^ 2) = (∑ i : Fin m, 1) := by congr ext i obtain ⟨σi, hσi⟩ := σ i simp at hσi simp cases hσi with | inl h1 => right; rw [h1]; norm_num | inr h2 => left; rw [h2] rw [this] apply (Finset.sum_const 1).trans simp rw [Real.sqrt_eq_rpow, Real.sqrt_eq_rpow, ←mul_assoc] congr · rw [←Real.rpow_neg (by simp), ←Real.rpow_one_add' (by simp) (by norm_num)] congr norm_num · norm_num
PartB 1 core · 0 supporting The Part B chaining estimate bounds the signed empirical increment sum by dyadic radius decrements weighted by logarithmic covering complexity. ★ partB_bound
The Part B chaining estimate bounds the signed empirical increment sum by dyadic radius decrements weighted by logarithmic covering complexity.
The finite-class construction and clean Massart reduction live in
PartBCore; this module exposes the resulting chaining bound.
For a function class evaluated on a finite sample, a positive empirical radius, positivity of that radius, total boundedness of the empirical class, a terminal chaining level, positive sample size, and a uniform empirical-radius bound, the sum of expected signed chaining increments is bounded by the corresponding sum of dyadic radius decrements times logarithmic covering complexities.
Formal statement
Proof (Lean source)
PartBCore 3 core · 3 supporting This module contains the finite-class construction underlying the Part B chaining estimate. ★ partB_sum_bound_via_massart
This module contains the finite-class construction underlying the Part B
chaining estimate. It uses the canonical Massart bound and exposes only the
adjacent-pair finite set and the intermediate estimate needed by PartB.
For a function class on a finite sample, a radius, positivity of that radius, total boundedness, a number of levels, and a level, this is the set of adjacent chaining-approximation pairs.
Definition (Lean source)
For a function class on a finite sample, a radius, positivity of that radius, total boundedness, a number of levels, and a level, this is the finite set of distinct adjacent chaining-approximation pairs.
Definition (Lean source)
For a function class on a finite sample, a radius, positivity of that radius, total boundedness, a number of levels, positive sample size, a uniform empirical-radius bound, and at least one chaining level, the signed increment sum is bounded by the Massart finite-class expression over adjacent approximation pairs.
Formal statement
Proof (Lean source)
3 supporting declarations (lemmas, instances)
-
finite_incrementPairSetlemma — For a function class on a finite sample, a radius, positivity, total boundedness, a number of levels, and a level, the adjacent-pair set is finite.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch' :n :ℕj :Fin nconclusion(incrementPairSet c_pos h' n j).FiniteProof (Lean source)
lemma finite_incrementPairSet (c_pos : 0 < c) (h' : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (n : ℕ) (j : Fin n) : (incrementPairSet c_pos h' n j).Finite := by unfold incrementPairSet refine (finite_approxPairSet c_pos h' n j).subset ?_ apply incrementPairSet_subset_approxPairSet -
incrementPairFinset_nonemptylemma — For a function class on a finite sample, a radius, positivity of that radius, total boundedness, a number of levels, and a level, the finite set of adjacent chaining-approximation pairs is nonempty.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch' :n :ℕj :Fin nconclusion(incrementPairFinset c_pos h' n j).NonemptyProof (Lean source)
lemma incrementPairFinset_nonempty (c_pos : 0 < c) (h' : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (n : ℕ) (j : Fin n) : (incrementPairFinset c_pos h' n j).Nonempty := by dsimp [incrementPairFinset] simp only [Set.Finite.toFinset_nonempty] exact ⟨_, ⟨Classical.arbitrary ι, rfl⟩⟩ -
mem_incrementPairFinset_reprtheorem — For a function class on a finite sample, a radius, positivity, total boundedness, a number of levels, a level, an approximation pair, and membership in the increment-pair finite set, the pair is represented by adjacent chain approximations.hypothesesZ :sharedType vm :sharedℕι :sharedType uι → Z → ℝc :sharedℝc_pos :0 < ch' :n :ℕj :Fin nhk :(Z → ℝ) × (Z → ℝ)hk0 :hk ∈ incrementPairFinset c_pos h' n jconclusion∃ fh, (chainApprox c_pos h' fh ((j : ℕ) + 1), chainApprox c_pos h' fh (j : ℕ)) = hkProof (Lean source)
theorem partB.mem_incrementPairFinset_repr (c_pos : 0 < c) (h' : TotallyBounded (Set.univ : Set (EmpiricalFunctionSpace F S))) (n : ℕ) (j : Fin n) (hk : (Z → ℝ) × (Z → ℝ)) (hk0 : hk ∈ incrementPairFinset c_pos h' n j) : ∃ fh, (chainApprox c_pos h' fh ((j : ℕ) + 1), chainApprox c_pos h' fh (j : ℕ)) = hk := by dsimp [incrementPairFinset] at hk0 simp at hk0 dsimp [incrementPairSet] at hk0 exact hk0
RiemannIntegral 1 core · 1 supporting This file converts the dyadic sum of square-root log covering numbers into a Riemann integral and chooses the dyadic truncation scale associated with a positive lower cutoff. ★ entropy_sum_to_integral_bound
Entropy sums and their integral bound
This file converts the dyadic sum of square-root log covering numbers into a Riemann integral and chooses the dyadic truncation scale associated with a positive lower cutoff. These are the analytic estimates used by the final Dudley entropy theorem.
For a function class evaluated on a finite sample, a positive empirical radius, positivity of that radius, total boundedness of the empirical class, a terminal chaining level, positive sample size, and a uniform empirical-radius bound, the empirical Rademacher complexity is bounded by a terminal dyadic remainder plus the entropy integral from that scale to half the radius.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
choose_dyadic_scale_for_epsilonlemma — If the target scale is positive and smaller than half the initial radius, then some dyadic chaining radius lies strictly above the target scale and at most twice it.hypothesesc :sharedℝε :ℝε_pos :0 < εc_ε :ε < c / 2Proof (Lean source)
lemma choose_dyadic_scale_for_epsilon (ε : ℝ) (ε_pos : 0 < ε) (c_ε : ε < c / 2) : ∃ n, (ε < (ej c (n+1))) ∧ ((ej c (n+1)) ≤ 2 * ε) := by dsimp [ej] suffices ∃ n : ℕ, n < Real.logb 2 (c / ε) ∧ Real.logb 2 (c / ε) ≤ n + 1 from by obtain ⟨m0, ⟨hm1, hm2⟩⟩ := this rw [Real.logb_le_iff_le_rpow] at hm2 rw [Real.lt_logb_iff_rpow_lt] at hm1 have r : 0 < m0 := by have r0 : 2 < c / ε := by have r00 : 2 * ε < c := by refine (lt_div_iff₀' ?_).mp c_ε norm_num exact (lt_div_iff₀ ε_pos).mpr r00 have r1 : (2 : ℝ) < (2 : ℝ) ^ (↑m0 + 1) := by norm_cast at hm2 apply lt_of_lt_of_le r0 norm_cast rcases Nat.eq_zero_or_pos m0 with h0 | h0 · rw [h0] at r1 norm_num at r1 · exact h0 have p0 : ε < c / 2 ^ (↑m0) := by have htmp := mul_lt_mul_of_pos_right hm1 ε_pos have htmp_mul : ε * 2 ^ (↑m0) < c := by field_simp at htmp simp at htmp rw [mul_comm] exact htmp have hpowpos : 0 < (2 : ℝ) ^ (↑m0) := pow_pos (by norm_num) _ have := mul_lt_mul_of_pos_right htmp_mul (inv_pos.mpr hpowpos) simpa [mul_comm, mul_left_comm, mul_assoc, div_eq_mul_inv] using this have p1 : c / 2 ^ (↑m0) ≤ 2 * ε := by have htmp : c ≤ ε * 2 ^ (↑m0 + 1) := by have := mul_le_mul_of_nonneg_left hm2 (le_of_lt ε_pos) field_simp at this norm_cast at this norm_cast have hpowpos : 0 < (2 : ℝ) ^ (↑m0) := pow_pos (by norm_num) _ have hpow_ne : (2 : ℝ) ^ (↑m0) ≠ 0 := by exact ne_of_gt hpowpos calc c / 2 ^ (↑m0) = c * ((2 : ℝ) ^ (↑m0))⁻¹ := by simp [div_eq_mul_inv] _ ≤ (ε * 2 ^ (↑m0 + 1)) * ((2 : ℝ) ^ (↑m0))⁻¹ := by exact mul_le_mul_of_nonneg_right htmp (inv_nonneg.mpr (le_of_lt hpowpos)) _ = ε * 2 := by simp [pow_succ, mul_comm, mul_assoc, hpow_ne] _ = 2 * ε := by ring use (m0 - 1) have : m0 - 1 + 1 = m0 := by grind rw [this] exact ⟨p0, p1⟩ · norm_num · field_simp linarith · norm_num · field_simp linarith use Int.toNat (Int.ceil (Real.logb 2 (c / ε))) - 1 have h3 : 0 < Real.logb 2 (c / ε) := by refine Real.logb_pos (by linarith) ?_ refine (one_lt_div₀ ε_pos).mpr ?_ apply lt_trans c_ε linarith have h2 : ((⌈Real.logb 2 (c / ε)⌉ : ℤ) : ℝ) = ((⌈Real.logb 2 (c / ε)⌉.toNat : ℕ) : ℝ) := by norm_cast refine Int.eq_natCast_toNat.mpr ?_ exact Int.ceil_nonneg (le_of_lt h3) have : (1 : ℤ) ≤ ⌈Real.logb 2 (c / ε)⌉ := by simpa using Int.one_le_ceil_iff.mpr h3 have hceil_nonneg : 0 ≤ ⌈Real.logb 2 (c / ε)⌉ := Int.ceil_nonneg (le_of_lt h3) have hcast : Int.ofNat (⌈Real.logb 2 (c / ε)⌉.toNat) = ⌈Real.logb 2 (c / ε)⌉ := Int.toNat_of_nonneg hceil_nonneg have h_nat : 1 ≤ ⌈Real.logb 2 (c / ε)⌉.toNat := by have : (Int.ofNat 1) ≤ Int.ofNat (⌈Real.logb 2 (c / ε)⌉.toNat) := by simpa [hcast] using this exact (Int.ofNat_le).1 this constructor · rw [Nat.cast_sub] rw [<- h2] simp rw [<- Int.le_ceil_iff] simpa using h_nat · norm_cast have : ⌈Real.logb 2 (c / ε)⌉.toNat - 1 + 1 = ⌈Real.logb 2 (c / ε)⌉.toNat := by exact Nat.sub_add_cancel h_nat rw [this] rw [<- h2] exact Int.le_ceil (Real.logb 2 (c / ε))