Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 — m^S(r) is either identically 2^r or majorized by r^n + 1

Proved
VapnikChervonenkis.GrowthFunction.theorem1_growth_dichotomy

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricslearning-theoryp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1vc-theory

Let XXX be a set and SSS a nonempty collection of subsets of XXX, with growth function mS(r)=max⁡ΔS(x1,…,xr)m^S(r) = \max \Delta^S(x_1, \dots, x_r)mS(r)=maxΔS(x1​,…,xr​), the maximal number of different subsamples that the sets of SSS induce in a sample of size rrr. Then one of the following holds:

  1. mS(r)=2rm^S(r) = 2^rmS(r)=2r for every r≥0r \ge 0r≥0; or
  2. there is a positive integer nnn, the first value of rrr for which the equation mS(r)=2rm^S(r) = 2^rmS(r)=2r is violated (that is, mS(n)≠2nm^S(n) \ne 2^nmS(n)=2n and mS(r)=2rm^S(r) = 2^rmS(r)=2r for all r<nr < nr<n), such that
mS(r)≤rn+1for every r≥0.m^S(r) \le r^n + 1 \qquad \text{for every } r \ge 0 .mS(r)≤rn+1for every r≥0.

Theorem 1 says that the growth function of any class of events is either exponential or bounded by a polynomial, whose degree is the size of the smallest sample on which the class fails to induce every subsample. In the paper this dichotomy makes the bound 4mS(2l)e−ε2l/84 m^S(2l) e^{-\varepsilon^2 l/8}4mS(2l)e−ε2l/8 of Theorem 2 tend to zero whenever mSm^SmS is not identically 2r2^r2r.

Formalization Note. The class SSS is assumed nonempty. The paper calls nnn "a positive constant"; for S=∅S = \emptysetS=∅ every index is 000, the first violation occurs at r=0r = 0r=0, and nnn would not be positive. The minimality of nnn is part of the statement: a bound rn+1r^n + 1rn+1 for an arbitrary violating nnn would be weaker. Samples are sequences Fin r → X and growthFunction is the supremum of the index over them; the case r=0r = 0r=0 reads mS(0)=1≤0n+1m^S(0) = 1 \le 0^n + 1mS(0)=1≤0n+1.

Preamble
import Mathlib
import Definitions.Def_VapnikChervonenkis_Shared_Phi
import Definitions.Def_VapnikChervonenkis_Shared_index
import Definitions.Def_VapnikChervonenkis_Shared_growthFunction
Formal statement
namespace VapnikChervonenkis.GrowthFunction

/-- **Theorem 1** of Vapnik and Chervonenkis (1971), p. 267: the growth function `m^S(r)` is
either identically equal to `2^r`, or else it is majorized by `r^n + 1`, where `n` is a positive
constant equal to the first value of `r` for which `m^S(r) = 2^r` is violated. The class `S` is
assumed nonempty (for `S = ∅` the first violation is `r = 0`, and `n` is not positive). -/
theorem theorem1_growth_dichotomy {X : Type*} (S : Set (Set X)) (hS : S.Nonempty) :
    (∀ r : ℕ, Shared.growthFunction S r = 2 ^ r) ∨
      ∃ n : ℕ, 0 < n ∧ Shared.growthFunction S n ≠ 2 ^ n ∧
        (∀ r < n, Shared.growthFunction S r = 2 ^ r) ∧
        ∀ r : ℕ, Shared.growthFunction S r ≤ r ^ n + 1 := by sorry

end VapnikChervonenkis.GrowthFunction
Source
Vapnik and Chervonenkis, On the Uniform Convergence of Relative Frequencies of Events to Their Probabilities, Theory Probab. Appl. 16 (1971), p. 267, Theorem 1 (with the sentence opening Subsection 2, p. 266)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let XXX be an arbitrary type (any universe, possibly empty, with no finiteness, measurability or other structure assumed). Let SSS be a family of subsets of XXX, so S⊆P(X)S \subseteq \mathcal{P}(X)S⊆P(X), with the single hypothesis that SSS is nonempty. SSS may be finite or infinite.

The statement uses one non-standard notion, the growth function mS(r)m^S(r)mS(r). It is written Shared.growthFunction S r\texttt{Shared.growthFunction}\ S\ rShared.growthFunction S r in the code, takes the family SSS and a natural number rrr, and is defined in a separate shared definitions file. That definition is not included in the code given to this auditor. So this read-back cannot say what mS(r)m^S(r)mS(r) actually computes: whether it counts the distinct traces {A∩F:A∈S}\{A \cap F : A \in S\}{A∩F:A∈S} on rrr-point sets, how it treats repeated points or rrr larger than ∣X∣|X|∣X∣, or what value it takes when that count is infinite. Its codomain is also not visible. The comparisons below with 2r2^r2r and rn+1r^n + 1rn+1 happen in that codomain, whatever it is.

The theorem asserts that at least one of the following two alternatives holds:

  1. Alternative 1. For every natural number rrr (including r=0r = 0r=0),
mS(r)=2r.m^S(r) = 2^r.mS(r)=2r.
  1. Alternative 2. There is a natural number nnn that satisfies all four of these conditions:
    • n≥1n \ge 1n≥1;
    • mS(n)≠2nm^S(n) \ne 2^nmS(n)=2n;
    • mS(r)=2rm^S(r) = 2^rmS(r)=2r for every natural number r<nr < nr<n;
    • for every natural number rrr (including r=0r = 0r=0 and every r<nr < nr<n),
mS(r)≤rn+1.m^S(r) \le r^n + 1.mS(r)≤rn+1.

Together, the second and third conditions mean that nnn is exactly the smallest rrr with mS(r)≠2rm^S(r) \ne 2^rmS(r)=2r. So when Alternative 2 holds, nnn is uniquely determined. The two alternatives exclude each other, because Alternative 2 exhibits an rrr where Alternative 1 fails. The statement is written as an ordinary "or", though. The bound in Alternative 2 is the polynomial rn+1r^n + 1rn+1, whose exponent is that first failure index nnn. Nothing is said about how tight the bound is, and no condition other than mS(r)≤rn+1m^S(r) \le r^n + 1mS(r)≤rn+1 is placed on mS(r)m^S(r)mS(r) for r≥nr \ge nr≥n.

Degenerate cases.

  • r=0r = 0r=0 in Alternative 2. Because n≥1n \ge 1n≥1, the bound reads mS(0)≤0n+1=1m^S(0) \le 0^n + 1 = 1mS(0)≤0n+1=1. The third condition also forces mS(0)=20=1m^S(0) = 2^0 = 1mS(0)=20=1, since 0<n0 < n0<n.
  • r=1r = 1r=1 in Alternative 2. The bound reads mS(1)≤2m^S(1) \le 2mS(1)≤2. If n=1n = 1n=1, the bound is mS(r)≤r+1m^S(r) \le r + 1mS(r)≤r+1 for all rrr.
  • Empty SSS. The hypothesis rules this case out, so the theorem says nothing about it.
  • Empty or one-element XXX. These are allowed. If XXX is empty, the only nonempty choice is S={∅}S = \{\emptyset\}S={∅}. If XXX has one element, the choices are {∅}\{\emptyset\}{∅}, {X}\{X\}{X} and {∅,X}\{\emptyset, X\}{∅,X}.
    • In these cases the theorem still asserts one of the two alternatives. Which one holds depends entirely on how the unseen definition of mS(r)m^S(r)mS(r) behaves when rrr exceeds the number of points of XXX.
    • For example, if that definition returns 000, a default value, or a count over multisets of points, the conclusion changes. That behaviour cannot be determined from the code shown.
  • Infinite SSS and junk values. The same caveat applies. The statement contains no division, no natural-number subtraction, no integral and no supremum. Any default or junk values could only enter through the definition of the growth function itself.
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me