Closed form of Φ(n, r)
ProvedVapnikChervonenkis.GrowthFunction.phi_closed_formLet be defined by the recurrence (1): , , . Then for all natural numbers and ,
The closed form identifies as the partial binomial sum of the Sauer–Shelah lemma. The polynomial bound follows from it.
Formalization Note. The printed display has as the summand, a misprint for : with the formula gives , whereas the recurrence gives . The statement uses . The sum runs over (Finset.range (n + 1)), and the case split is written as printed although both branches equal .
import Mathlib import Definitions.Def_VapnikChervonenkis_Shared_Phi
namespace VapnikChervonenkis.GrowthFunction
/-- Vapnik and Chervonenkis (1971), p. 266, display after (1): `Φ(n, r) = Σ_{k=0}^{n} (r choose k)`
if `r > n`, and `Φ(n, r) = 2^r` if `r ≤ n`. (The printed summand reads `(r choose n)`, a misprint
for `(r choose k)`: with `(r choose n)` the formula already fails at `Φ(1, 2) = 3`.) -/
theorem phi_closed_form (n r : ℕ) :
Shared.Phi n r = if n < r then ∑ k ∈ Finset.range (n + 1), r.choose k else 2 ^ r := by sorry
end VapnikChervonenkis.GrowthFunction
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. and are arbitrary natural numbers, either of which may be .
The quantity involved. is a function of two natural numbers. It is defined in a separate definitions file that is not shown, so its definition cannot be unfolded here. Because the right-hand side below is a natural number, takes natural-number values.
Claim. For all :
The sum runs over inclusive. Since the first case requires , every binomial coefficient in it has and is positive. The statement pins down completely on all of .
Degenerate cases.
- , : .
- : .
- , any : .
- in general: .
No hypotheses restrict or , and no truncated subtraction or division occurs.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.