Theorem 4 — uniform convergence in probability iff H^S(l)/l → 0
ProvedVapnikChervonenkis.Entropy.theorem4_entropy_criterionLet be a probability space and a collection of measurable events. For an independent sample from let
be the largest deviation of a relative frequency from its probability, and let be the entropy of in samples of size . Assume, as the paper does, that , the semi-sample deviation and the index are measurable functions of the sample. Then the relative frequencies converge in probability to the probabilities uniformly over , that is,
if and only if
Unlike the distribution-free sufficient condition through the growth function (Theorem 2), this criterion depends on and is both necessary and sufficient.
Formalization Note. Samples are functions Fin l → X with the product law Measure.pi; probabilities are values in . The four measurability hypotheses are the paper's standing assumptions: the events of are measurable (p. 264), is a random variable (p. 265), is measurable (p. 268), and the index is measurable (p. 273).
import Mathlib import Definitions.Def_VapnikChervonenkis_Shared_index import Definitions.Def_VapnikChervonenkis_Shared_deviation import Definitions.Def_VapnikChervonenkis_Entropy_entropy open MeasureTheory Filter Topology
namespace VapnikChervonenkis.Entropy
/-- **Theorem 4** of Vapnik and Chervonenkis (1971), p. 275: a necessary and sufficient condition
for the relative frequencies to converge (in probability) to the probabilities uniformly over the
class of events `S`, i.e. `P{π^(l) > ε} → 0` for every `ε > 0` (p. 265), is that (21)
`lim_{l→∞} H^S(l)/l = 0`. `hS`, `hπ`, `hρ`, `hΔ` are the paper's standing assumptions: the events
of `S` are measurable (p. 264), and `π^(l)` (p. 265), `ρ^(l)` (p. 268) and the index `Δ^S`
(p. 273) are measurable functions of the sample. -/
theorem theorem4_entropy_criterion {X : Type*} [MeasurableSpace X] (P : Measure X)
[IsProbabilityMeasure P] (S : Set (Set X)) (hS : ∀ A ∈ S, MeasurableSet A)
(hπ : ∀ l, Measurable (Shared.maxDeviation S P l))
(hρ : ∀ l, Measurable (Shared.semiSampleDeviation S l))
(hΔ : ∀ l : ℕ, Measurable (fun x : Fin l → X => Shared.index S x)) :
(∀ ε : ℝ, 0 < ε → Tendsto (fun l : ℕ => Measure.pi (fun _ : Fin l => P)
{x | ε < Shared.maxDeviation S P l x}) atTop (𝓝 0))
↔ Tendsto (fun l : ℕ => entropy S P l / (l : ℝ)) atTop (𝓝 0) := by sorry
end VapnikChervonenkis.Entropy
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a measurable space , a probability measure on , and a family of subsets of (a set of events). For each sample size , write for the set of -tuples of points of . Give its product σ-algebra and the product probability measure ( copies).
The statement uses four objects from the accompanying definition files. Their definitions are not reproduced in the code shown here, so this read-back can only name them and give their types:
- (
Shared.maxDeviation S P l) is a real-valued function of a sample of size . It depends on , and . - (
Shared.semiSampleDeviation S l) is a function that depends on and . Neither its domain nor its codomain is visible. It appears only in a hypothesis, never in the conclusion. - (
Shared.index S x) is a quantity attached to and a finite sample . Its codomain is not visible. - (
entropy S P l) is a real number that depends on , and .
Hypotheses. The theorem assumes all of the following:
- Every is a measurable subset of .
- For every , the map is measurable on .
- For every , the map is measurable with respect to whatever σ-algebras its domain and codomain carry.
- For every , the map is measurable on .
Hypotheses 2–4 are stated as assumptions and are not derived from 1. Whether they can be satisfied, for a given and , depends on the hidden definitions.
Conclusion. Under these hypotheses, the following two statements are equivalent (each implies the other):
- (A) For every real ,
Here the probabilities are values of a measure, so they lie in , and the limit is taken in that space. The inequality is strict: .
- (B) The real sequence tends to :
Only and appear in the equivalence. and enter only through the measurability hypotheses 3 and 4.
Degenerate cases.
- empty: a probability measure on an empty space cannot exist, so the theorem says nothing about an empty .
- : has exactly one element, the empty tuple, and puts mass on it. The quotient in (B) is a division by zero, which is evaluated as by convention. Both conditions are limits as , so neither value affects them.
- empty, or a single point (so ): what and equal here is fixed entirely by the hidden definitions. For example, if they are defined as a supremum or a logarithm, an empty class could give conventional default values rather than meaningful ones. The theorem then asserts the equivalence of (A) and (B) for whatever those values are.
- Vacuity: if some choice of and makes one of hypotheses 2–4 false, the theorem asserts nothing about that choice.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.