Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exercise 4: the growth function of the composition class F₂ ∘ F₁ is at most τ_{F₂}(m) τ_{F₁}(m)

Proved
UnderstandingML.growth_composition

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsgrowth-function

Exercise 4 (Growth function of composition). Let F1F_1F1​ be a set of functions from XXX to ZZZ and let F2F_2F2​ be a set of functions from ZZZ to YYY. Let H=F2∘F1H = F_2 \circ F_1H=F2​∘F1​ be the composition class: for every f1∈F1f_1 \in F_1f1​∈F1​ and f2∈F2f_2 \in F_2f2​∈F2​, there exists h∈Hh \in Hh∈H such that h(x)=f2(f1(x))h(x) = f_2(f_1(x))h(x)=f2​(f1​(x)). Then τH(m)≤τF2(m) τF1(m)\tau_H(m) \le \tau_{F_2}(m)\,\tau_{F_1}(m)τH​(m)≤τF2​​(m)τF1​​(m). The codomains Z,YZ, YZ,Y are finite.

Preamble
import Definitions.Def_UnderstandingML_NeuralNetworks

open MeasureTheory
Formal statement
namespace UnderstandingML

/-- **Exercise 4 (growth function of composition)** (p. 282). Let `F₁` be a set of functions
from `X` to `Z` and let `F₂` be a set of functions from `Z` to `Y`. Let `H = F₂ ∘ F₁` be the
composition class: for every `f₁ ∈ F₁` and `f₂ ∈ F₂`, there exists `h ∈ H` with
`h(x) = f₂(f₁(x))`. Then `τ_H(m) ≤ τ_{F₂}(m) τ_{F₁}(m)`. The codomains are finite. -/
theorem growth_composition {X Z Y : Type*} [Finite Z] [Finite Y] (F₁ : Set (X → Z))
    (F₂ : Set (Z → Y)) (m : ℕ) :
    growthY (compositionClass F₂ F₁) m ≤ growthY F₂ m * growthY F₁ m := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §20.9 p. 282, Exercise 4 (used in the proof of Theorem 20.6, p. 275)
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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