Theorem 2.1 — the key theorem: ERM is consistent iff uniform one-sided convergence holds
ProvedNatureSLT.Consistency.key_theoremLet be a probability measure on and let , , be a set of -integrable real functions whose risks are bounded:
Write for the empirical risk on an i.i.d. sample from . Then the ERM principle is (nontrivially) consistent — for every with nonempty, in probability — if and only if the empirical risk converges uniformly to the actual risk in the one-sided sense
This is the key theorem of learning theory (Vapnik and Chervonenkis, 1989): consistency of empirical risk minimization is determined by the worst function of the set, so any analysis of the ERM principle must be a worst-case analysis.
Formalization Note Integrability of each is assumed so that is the book's integral. The book takes probabilities of the events and without comment; the theorem assumes, for every and , that and are measurable functions of the sample. Suprema and the empirical infimum are taken in the extended reals; probabilities are values of the product measure .
import Mathlib import Definitions.Def_NatureSLT_Consistency_risk import Definitions.Def_NatureSLT_Consistency_nontriviallyConsistent import Definitions.Def_NatureSLT_Consistency_uniformConvergence open MeasureTheory Filter Topology
namespace NatureSLT.Consistency
/-- **Theorem 2.1** (the key theorem of learning theory; Vapnik 2000, p. 38). Let `Q(z, α)`,
`α ∈ Λ`, be a set of functions with `A ≤ ∫ Q(z, α) dF(z) ≤ B` for all `α`. Then the ERM principle
is (nontrivially) consistent iff the empirical risk converges uniformly one-sidedly to the risk,
`lim_{ℓ→∞} P{sup_{α ∈ Λ} (R(α) − R_emp(α)) > ε} = 0` for all `ε > 0` (2.4).
`hint`: each `Q(·, α)` is integrable, so that `R(α)` is the book's integral. `hsup`, `hinf`: the
book's tacit measurability — the sample functions `sup_α (R(α) − R_emp(α))` and
`inf_{α ∈ Λ(c)} R_emp(α)` whose probabilities are taken are measurable. -/
theorem key_theorem {Z Λ : Type*} [MeasurableSpace Z] (F : Measure Z) [IsProbabilityMeasure F]
(Q : Λ → Z → ℝ) (hint : ∀ α, Integrable (Q α) F) (A B : ℝ)
(hAB : ∀ α, A ≤ risk F Q α ∧ risk F Q α ≤ B)
(hsup : ∀ ℓ : ℕ, Measurable (fun z : Fin ℓ → Z => supOneSidedDeviation F Q z))
(hinf : ∀ (c : ℝ) (ℓ : ℕ),
Measurable (fun z : Fin ℓ → Z => infEmpiricalRisk Q (levelSet F Q c) z)) :
NontriviallyConsistent F Q ↔ UniformOneSidedConvergence F Q := by sorry
end NatureSLT.Consistency
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The statement concerns the following objects, all universally quantified:
- and are arbitrary types. carries a -algebra. carries no structure: no topology, no measurability, no countability and no nonemptiness requirement.
- is a probability measure on .
- is a family of real-valued functions on , one for each index .
- are two real constants.
Imported definitions. The statement relies on six names that come from imported definition files: , , , , and . Their bodies are not shown in the code under audit, so this read-back cannot unfold them. They appear below under their own names, written for and so on. Everything said about them comes only from the arguments they take in this statement. The docstring above the theorem is commentary. It is not part of what is asserted, and it is not used here to interpret these names.
Hypotheses.
- Integrability. For every , the function is integrable with respect to .
- Two-sided bound. For every ,
where is a real number defined in an imported file. 3. Measurability of the deviation. For every sample size , the map
is measurable. Here (functions from to ) carries the product -algebra. The codomain carries the standard -algebra of whatever type this imported function returns, which is not visible here. 4. Measurability of the infimum. For every real level and every , the map
is measurable. In this map, is an imported object determined by , and , presumably a subset of . takes , that object and the sample, but not .
Conclusion. Under these hypotheses,
This is a two-sided equivalence of two imported propositions, each depending only on and . The constants and appear only in hypothesis 2 and in neither side of the conclusion. No condition is placed on how and compare, and no finiteness, positivity or boundedness condition is placed on itself beyond hypotheses 1 and 2.
Degenerate cases.
- cannot be empty. A probability measure on forces to be nonempty.
- Empty . Hypotheses 1 and 2 hold vacuously, and and may be any reals, including . The theorem still asserts the equivalence. Whether either side is true for empty depends entirely on the imported definitions, for example on how a supremum or infimum over an empty index set is evaluated.
- is only possible for empty . If is nonempty and , hypothesis 2 cannot be satisfied, so the theorem says nothing in that case.
- One-element . All hypotheses reduce to statements about a single function , and the equivalence is asserted for that single function.
- Sample size . The sample space has exactly one point, so every function on it is measurable. Hypotheses 3 and 4 therefore hold automatically at .
- Empty level sets. For levels at which is empty, hypothesis 4 concerns whatever value assigns to an empty set. That could be a default "junk" value, such as for a real infimum or in the extended reals, and this read-back cannot tell which.
- Measurability. Hypotheses 3 and 4 are assumed, not derived. They are not automatically satisfied when is uncountable.
- Integrals of non-integrable functions. The junk value that an integral takes for a non-integrable function cannot arise for itself, because hypothesis 1 rules it out. Whether is actually such an integral is not visible here.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.