Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 3.4 — given α≥c(COPT)\alpha \ge c(\mathcal C_{OPT})α≥c(COPT​), the algorithm never fails, covers every element of weight ≥1\ge 1≥1, and pays (6+o(1)) αlog⁡mlog⁡n(6+o(1))\,\alpha\log m\log n(6+o(1))αlogmlogn

Proved
OnlineSetCover.Weighted.theorem_3_4

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisonline-algorithmsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1set-cover

Consider weighted online set cover on a ground set XXX with n=∣X∣n = |X|n=∣X∣ elements and a family S\mathcal SS of mmm sets with costs cSc_ScS​, and run the deterministic algorithm of Section 3 with guess α\alphaα on an arrival sequence σ\sigmaσ. Assume the normalized instance of p. 365:

  1. 1≤cS≤m1 \le c_S \le m1≤cS​≤m and cS≤αc_S \le \alphacS​≤α for every set SSS;
  2. a family COPT⊆S\mathcal C_{OPT} \subseteq \mathcal SCOPT​⊆S covers every element of σ\sigmaσ, and c(COPT)≤αc(\mathcal C_{OPT}) \le \alphac(COPT​)≤α;
  3. nnn and mmm are large enough that n⋅n2/m+n<n2n \cdot n^{2/m} + n < n^2n⋅n2/m+n<n2 (for instance n≥4n \ge 4n≥4 and m≥3m \ge 3m≥3).

Then every configuration the algorithm reaches is a running state, never FAIL, and in it

(i) every element j∈Xj \in Xj∈X of weight wj≥1w_j \ge 1wj​≥1 is covered by the current cover C\mathcal CC;

(ii) the cost of the current cover satisfies

∑S∈CcS≤3log⁡n(1+(1+1n)αlog⁡(m2(1+1n)))+2αlog⁡n.\sum_{S \in \mathcal C} c_S \le 3 \log n \Big(1 + \Big(1 + \frac1n\Big)\alpha \log\Big(m^2\Big(1+\frac1n\Big)\Big)\Big) + 2\alpha \log n.S∈C∑​cS​≤3logn(1+(1+n1​)αlog(m2(1+n1​)))+2αlogn.

The logarithm is natural. The paper writes (ii) as ∑S∈CcS≤(6+o(1))αlog⁡mlog⁡n\sum_{S \in \mathcal C} c_S \le (6 + o(1))\alpha \log m \log n∑S∈C​cS​≤(6+o(1))αlogmlogn with o(1)→0o(1) \to 0o(1)→0 as n,m→∞n, m \to \inftyn,m→∞; the displayed expression is what its proof yields from Lemma 3.2 and is (6+o(1))αlog⁡mlog⁡n(6 + o(1))\alpha \log m \log n(6+o(1))αlogmlogn because α≥1\alpha \ge 1α≥1.

Together with the doubling over guesses of α\alphaα (not part of this statement), this gives the paper's deterministic O(log⁡mlog⁡n)O(\log m \log n)O(logmlogn)-competitive algorithm for weighted online set cover.

Formalization Note "Throughout the algorithm" is every configuration reachable from the initial state (wS=1/m2w_S = 1/m^2wS​=1/m2, empty cover), including those between the per-set substeps of an augmentation step, for every order in which a step visits Sj\mathcal S_jSj​. Part (i) is asserted for every element of XXX, not only for arrived ones. The size condition is the inequality the proof uses for the initial potential; the paper only says that nnn and mmm are large.

Preamble
import Mathlib
import Definitions.Def_OnlinePrimalDual_OnlineSetCover_SetCoverInstance
import Definitions.Def_OnlinePrimalDual_OnlineSetCover_elementWeight
import Definitions.Def_OnlinePrimalDual_OnlineSetCover_coveredBy
import Definitions.Def_OnlineSetCover_Weighted_Run

open OnlinePrimalDual.OnlineSetCover
Formal statement
namespace OnlineSetCover.Weighted

/-- **Theorem 3.4** (Alon, Awerbuch, Azar, Buchbinder, Naor 2009, p. 367). On the normalized
instance of p. 365 (`1 ≤ c_S ≤ m` and `c_S ≤ α` for every set), with `Copt` covering every
arriving element and `c(Copt) ≤ α`, and with `n, m` large in the sense the proof uses
(`n · n^(2/m) + n < n²`): every configuration the algorithm reaches on `σ` is a running state
(never `FAIL`) in which
(i) every element `j ∈ X` with `w_j ≥ 1` is covered, and
(ii) `∑_{S ∈ C} c_S ≤ 3 log n (1 + (1 + 1/n) α log(m² (1 + 1/n))) + 2 α log n`,
the explicit form of the paper's `(6 + o(1)) α log m log n`. -/
theorem theorem_3_4 {X T : Type*} [Fintype X] [Fintype T] [DecidableEq T]
    (inst : SetCoverInstance X T) (α : ℝ) (Copt : Finset T) (σ : List X)
    (hc_one : ∀ S, 1 ≤ inst.c S)
    (hc_m : ∀ S, inst.c S ≤ (Fintype.card T : ℝ))
    (hc_α : ∀ S, inst.c S ≤ α)
    (hcov : ∀ j ∈ σ, coveredBy inst Copt j)
    (hopt : ∑ S ∈ Copt, inst.c S ≤ α)
    (hsize : (Fintype.card X : ℝ) * (Fintype.card X : ℝ) ^ ((2 : ℝ) / (Fintype.card T : ℝ)) +
        (Fintype.card X : ℝ) < (Fintype.card X : ℝ) ^ 2)
    (c : Config X T) (hc : Reachable inst α σ c) :
    ∃ s : AlgState X T, c = .ok s ∧
      (∀ j : X, 1 ≤ elementWeight inst s.w j → coveredBy inst s.C j) ∧
      ∑ S ∈ s.C, inst.c S ≤
        3 * Real.log (Fintype.card X : ℝ) *
            (1 + (1 + 1 / (Fintype.card X : ℝ)) * α *
              Real.log ((Fintype.card T : ℝ) ^ 2 * (1 + 1 / (Fintype.card X : ℝ)))) +
          2 * α * Real.log (Fintype.card X : ℝ) := by sorry

end OnlineSetCover.Weighted
Source
Alon, Awerbuch, Azar, Buchbinder, Naor, The Online Set Cover Problem, SIAM J. Comput. 39(2) (2009), p. 367, Theorem 3.4 (standing assumptions p. 365)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me