Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The greedy set cover bound (§2.3): after i steps at most (1 − 1/opt)^i |U| elements are uncovered, and opt ln|U| sets cover U

Proved
ComputationalLearning.greedy_set_cover

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

approximationgreedy-algorithmsset-cover

The greedy set cover bound (p. 39). Let Ui⊆UU_i \subseteq UUi​⊆U denote the set of elements still not covered after iii steps of the greedy heuristic. Then ∣Ui+1∣≤∣Ui∣(1−1/opt(S))|U_{i+1}| \le |U_i|(1 - 1/\mathrm{opt}(\mathcal{S}))∣Ui+1​∣≤∣Ui​∣(1−1/opt(S)), so by induction ∣Ui∣≤(1−1/opt(S))i∣U∣|U_i| \le (1 - 1/\mathrm{opt}(\mathcal{S}))^i |U|∣Ui​∣≤(1−1/opt(S))i∣U∣, and choosing i≥opt(S)log⁡∣U∣i \ge \mathrm{opt}(\mathcal{S}) \log |U|i≥opt(S)log∣U∣ suffices to drive this bound below 111: all the elements of UUU are covered after the algorithm has chosen opt(S)log⁡∣U∣\mathrm{opt}(\mathcal{S})\log|U|opt(S)log∣U∣ sets.

Formally: for a collection S\mathcal{S}S covering the finite universe UUU and every greedy run ttt: for all iii, ∣uncovered(t,i)∣≤(1−1/opt(S))i∣U∣|\mathrm{uncovered}(t, i)| \le (1 - 1/\mathrm{opt}(\mathcal{S}))^i |U|∣uncovered(t,i)∣≤(1−1/opt(S))i∣U∣; and for all i≥1i \ge 1i≥1 with opt(S)ln⁡∣U∣≤i\mathrm{opt}(\mathcal{S}) \ln|U| \le iopt(S)ln∣U∣≤i, uncovered(t,i)=∅\mathrm{uncovered}(t, i) = \emptysetuncovered(t,i)=∅ (the strict inequality 1−x<e−x1 - x < e^{-x}1−x<e−x for x>0x > 0x>0 makes the bound strictly less than 111).

Preamble
import Definitions.Def_ComputationalLearning_Occam

open MeasureTheory
Formal statement
namespace ComputationalLearning

/-- **The greedy set cover bound** (§2.3, p. 39; Chvátal 1979). Let `𝒮` be a collection of subsets
of the finite universe `U` that covers `U`, and let `t` be a run of the greedy heuristic. Then
after `i` steps at most `(1 − 1/opt(𝒮))^i |U|` elements are uncovered, and all the elements of
`U` are covered after the heuristic has chosen `opt(𝒮) ln|U|` sets (at least one). -/
theorem greedy_set_cover {U : Type*} [DecidableEq U] [Fintype U] (𝒮 : Finset (Finset U))
    (hcov : IsCover 𝒮 𝒮) (t : ℕ → Finset U) (ht : IsGreedySequence 𝒮 t) :
    (∀ i : ℕ, ((uncovered t i).card : ℝ) ≤
      (1 - 1 / (optCover 𝒮 : ℝ)) ^ i * (Fintype.card U : ℝ)) ∧
    (∀ i : ℕ, 1 ≤ i → (optCover 𝒮 : ℝ) * Real.log (Fintype.card U) ≤ i →
      uncovered t i = ∅) := by sorry

end ComputationalLearning
Source
Kearns and Vazirani, An Introduction to Computational Learning Theory, MIT Press 1994, doi:10.7551/mitpress/3897.001.0001, §2.3 pp. 38-39, the greedy heuristic and its analysis (Chvátal 1979)
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