Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Set-cover weak duality: every packing is bounded by every fractional cover

Proved
PrimalDualOnline.SetCover.packing_le_fractional

by moutei · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmscombinatoricsprimal-dualset-cover

Weak duality for the set-cover LP pair. For every fractional cover xxx and every dual packing yyy,

∑e∈Eye ≤ ∑s∈Scsxs.\sum_{e \in E} y_e \ \le\ \sum_{s \in S} c_s x_s.e∈E∑​ye​ ≤ s∈S∑​cs​xs​.

Any feasible packing is therefore a certified lower bound on the cost of any fractional cover, and in particular on the fractional and integral optima. This is the specialisation of mission II's weak duality theorem to the covering matrix of set cover, and it is what makes the certificate bounds meaningful: without it, comparing a cover against an accumulated dual would say nothing about optimality.

Both instance fields are logically implied here rather than doing work - nonnegative cost follows from the packing hypothesis, and coverability from the fractional-cover hypothesis - and they are retained deliberately, to keep the statement about the source's model of the problem.

Instance-bundled hypotheses. The problem's two standing assumptions - every set cost is nonnegative, and every element lies in at least one available set - are not loose hypotheses of this statement. They are fields of the SetCoverInstance argument, so the statement cannot be instantiated at data violating either.

Preamble
import Definitions.Def_PrimalDualOnline_SetCover
import Mathlib.Tactic
Formal statement
open PrimalDualOnline.SetCover

theorem PrimalDualOnline.SetCover.packing_le_fractional
    {E S : Type*} [Fintype E] [Fintype S] [DecidableEq E] [DecidableEq S]
    (I : SetCoverInstance E S) (x : S → ℝ) (y : E → ℝ)
    (hx : IsFractionalCover I.sets x) (hy : IsDualPacking I.sets I.cost y) :
    packingValue y ≤ fractionalCost I.cost x := by sorry
Source
Niv Buchbinder, Designing Competitive Online Algorithms via a Primal-Dual Approach, PhD thesis, Tel Aviv University, 2008, https://www.tau.ac.il/~nivb/download/phd-thsis.pdf, Section 2.2, weak duality for programs (P) and (D), pp. 10-11
Read-back

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

Read-backs: certificate bounds

Throughout, the shared vocabulary is expanded as follows. A set-cover instance III on two types EEE (elements) and SSS (set indices) is a bundle of exactly four components:

  • a family A:S→Pfin(E)A : S \to \mathcal{P}_{\mathrm{fin}}(E)A:S→Pfin​(E), i.e. a finite subset As⊆EA_s \subseteq EAs​⊆E for each index sss;
  • a cost function c:S→Rc : S \to \mathbb{R}c:S→R;
  • a proof of nonnegative cost: ∀s∈S, 0≤cs\forall s \in S,\ 0 \le c_s∀s∈S, 0≤cs​;
  • a proof of coverability: ∀e∈E, ∃s∈S, e∈As\forall e \in E,\ \exists s \in S,\ e \in A_s∀e∈E, ∃s∈S, e∈As​.

Derived notions, all expanded inline in each section below:

N(e)  =  { s∈S  :  e∈As },f(e)  =  ∣N(e)∣∈N,Δ  =  sup⁡e∈Ef(e)∈N,N(e) \;=\; \{\, s \in S \;:\; e \in A_s \,\}, \qquad f(e) \;=\; |N(e)| \in \mathbb{N}, \qquad \Delta \;=\; \sup_{e \in E} f(e) \in \mathbb{N},N(e)={s∈S:e∈As​},f(e)=∣N(e)∣∈N,Δ=e∈Esup​f(e)∈N,

where N(e)N(e)N(e) is formed by filtering the whole index type SSS, f(e)f(e)f(e) is a cardinality in N\mathbb{N}N, and Δ\DeltaΔ is a supremum in N\mathbb{N}N taken over all of EEE — a supremum of an empty family, which is 000 when EEE is empty. Further:

coverCost(c,C)=∑s∈Ccs,fracCost(c,x)=∑s∈Scsxs,pack(y)=∑e∈Eye.\mathrm{coverCost}(c, \mathcal{C}) = \sum_{s \in \mathcal{C}} c_s, \qquad \mathrm{fracCost}(c, x) = \sum_{s \in S} c_s x_s, \qquad \mathrm{pack}(y) = \sum_{e \in E} y_e .coverCost(c,C)=s∈C∑​cs​,fracCost(c,x)=s∈S∑​cs​xs​,pack(y)=e∈E∑​ye​.

coverCost\mathrm{coverCost}coverCost sums only over the given finite index set C\mathcal{C}C; fracCost\mathrm{fracCost}fracCost sums over all of SSS; pack\mathrm{pack}pack sums over all of EEE.


PrimalDualOnline.SetCover.packing_le_fractional

Binders and instance arguments. The statement is universally quantified over two arbitrary types EEE and SSS (implicit arguments), with four typeclass arguments: EEE is a finite type, SSS is a finite type, equality on EEE is decidable, and equality on SSS is decidable. Finiteness does not exclude emptiness: either type may be empty. Decidable equality on SSS is what allows N(e)N(e)N(e) to be formed by filtering SSS; decidable equality on EEE is demanded as an instance argument, while none of the notions occurring in this statement mentions it. Three explicit arguments follow: a set-cover instance III on E,SE, SE,S (carrying AAA, ccc, the nonnegativity proof and the coverability proof), an arbitrary function x:S→Rx : S \to \mathbb{R}x:S→R, and an arbitrary function y:E→Ry : E \to \mathbb{R}y:E→R.

Hypotheses. Two, both about xxx and yyy with respect to the family and cost inside III:

  1. xxx is a fractional cover of AAA, which unfolds to the conjunction of
∀s∈S, 0≤xsand∀e∈E,  1≤∑s∈N(e)xs.\forall s \in S,\ 0 \le x_s \qquad\text{and}\qquad \forall e \in E,\ \ 1 \le \sum_{s \in N(e)} x_s .∀s∈S, 0≤xs​and∀e∈E,  1≤s∈N(e)∑​xs​.

There is no upper bound on any xsx_sxs​: entries are not capped at 111 or anywhere else. 2. yyy is a dual packing for (A,c)(A, c)(A,c), which unfolds to the conjunction of

∀e∈E, 0≤yeand∀s∈S,  ∑e∈Asye≤cs.\forall e \in E,\ 0 \le y_e \qquad\text{and}\qquad \forall s \in S,\ \ \sum_{e \in A_s} y_e \le c_s .∀e∈E, 0≤ye​and∀s∈S,  e∈As​∑​ye​≤cs​.

The second constraint ranges over every index s∈Ss \in Ss∈S.

Conclusion.

∑e∈Eye    ≤    ∑s∈Scs xs.\sum_{e \in E} y_e \;\;\le\;\; \sum_{s \in S} c_s\, x_s .e∈E∑​ye​≤s∈S∑​cs​xs​.

A non-strict inequality between the total dual value over all of EEE and the cost-weighted total of xxx over all of SSS.

1. Nonnegativity of cost; every element in some set. Nonnegativity of ccc is not a loose hypothesis: it is a field of the bundled argument III (as is coverability, ∀e∃s, e∈As\forall e \exists s,\ e \in A_s∀e∃s, e∈As​). Consequently the statement cannot be instantiated at a family/cost pair violating either: the argument III cannot be formed without supplying both proofs, so the statement simply does not apply to such data. Neither field is mentioned in the conclusion; they travel along inside III.

2. Logical redundancy. Both bundled proof fields are derivable from the remaining hypotheses.

  • Nonnegativity of cost follows from hypothesis 2: for each sss, all terms of ∑e∈Asye\sum_{e \in A_s} y_e∑e∈As​​ye​ are nonnegative because y≥0y \ge 0y≥0, so 0≤∑e∈Asye≤cs0 \le \sum_{e \in A_s} y_e \le c_s0≤∑e∈As​​ye​≤cs​.
  • Coverability follows from hypothesis 1: if some eee had N(e)=∅N(e) = \emptysetN(e)=∅, then ∑s∈N(e)xs=0\sum_{s \in N(e)} x_s = 0∑s∈N(e)​xs​=0, contradicting 1≤01 \le 01≤0; hence N(e)≠∅N(e) \ne \emptysetN(e)=∅, i.e. ∃s, e∈As\exists s,\ e \in A_s∃s, e∈As​.

If these two fields were dropped (the statement restated over a bare family AAA and bare cost ccc with no such hypotheses), the collection of situations the statement covers would not change: every A,c,x,yA, c, x, yA,c,x,y satisfying the two remaining hypotheses already satisfies both properties. No other hypothesis is derivable: nonnegativity of xxx, the covering inequalities for xxx, nonnegativity of yyy, and the packing inequalities for yyy are mutually independent.

3. Arbitrary or specific. The fractional cover is arbitrary: xxx is universally quantified and constrained only by feasibility. No optimality is invoked — the notions of least fractional cost and least integral cover cost defined in the vocabulary are not used here. The dual vector yyy is likewise arbitrary, constrained only by being a dual packing. There is no cover (no finite index set C\mathcal{C}C) in this statement at all.

4. Cast from N\mathbb{N}N to R\mathbb{R}R. There is none: every quantity in this statement is real-valued, and no cardinality or frequency appears.

5. Degenerate cases.

  • EEE empty. Coverability is vacuous; the covering inequalities in hypothesis 1 and the nonnegativity of yyy are vacuous; each AsA_sAs​ is empty, so every packing constraint reads 0≤cs0 \le c_s0≤cs​, which holds by the bundled nonnegativity. pack(y)=0\mathrm{pack}(y) = 0pack(y)=0, and the conclusion becomes 0≤∑scsxs0 \le \sum_s c_s x_s0≤∑s​cs​xs​, a sum of products of nonnegative reals.
  • SSS empty. Then N(e)=∅N(e) = \emptysetN(e)=∅ for every eee, so hypothesis 1 would demand 1≤01 \le 01≤0; thus the hypotheses are unsatisfiable unless EEE is also empty. (Independently, the bundled coverability field already cannot be constructed with SSS empty and EEE nonempty.) With both empty, both sides are empty sums and the conclusion is 0≤00 \le 00≤0.
  • C\mathcal{C}C empty. Not applicable: no cover appears.
  • c≡0c \equiv 0c≡0. Nonnegativity holds. The packing constraints give ∑e∈Asye≤0\sum_{e \in A_s} y_e \le 0∑e∈As​​ye​≤0, and with y≥0y \ge 0y≥0 this forces ye=0y_e = 0ye​=0 for every eee lying in some AsA_sAs​ — which, by coverability, is every eee. So pack(y)=0\mathrm{pack}(y) = 0pack(y)=0 and fracCost(c,x)=0\mathrm{fracCost}(c,x) = 0fracCost(c,x)=0: the conclusion is 0≤00 \le 00≤0.
  • Individual zero-cost sets. If cs=0c_s = 0cs​=0 for a particular sss, the packing constraint at sss together with y≥0y \ge 0y≥0 forces ye=0y_e = 0ye​=0 for every e∈Ase \in A_se∈As​.
  • ρ\rhoρ. Not applicable: no multiplier appears.
  • Unbounded entries of the fractional cover. Only x≥0x \ge 0x≥0 and the covering inequalities are imposed; individual xsx_sxs​ may be arbitrarily large, and the right-hand side is correspondingly unbounded above. Coordinates sss with xs=0x_s = 0xs​=0 are still summed over in fracCost\mathrm{fracCost}fracCost, contributing 000.
  • Empty sets As=∅A_s = \emptysetAs​=∅ are permitted; their packing constraint reads 0≤cs0 \le c_s0≤cs​. Distinct indices may carry equal subsets.

Not asserted. Nothing about optimality: neither xxx nor yyy is claimed minimal, maximal, or extremal, and no least fractional cost or least cover cost is mentioned. No claim that the inequality is tight, attained, or reversible; no strict inequality. No claim that a fractional cover or a dual packing exists — both are supplied as arguments, so the statement is silent if none exists. Nothing about integral covers, cover cost, frequency, maximum frequency, or any approximation factor. No algorithm, no ordering or online structure, and no assertion that the hypotheses are simultaneously satisfiable.


Human review
  • Endorsed by Shuze Chen · Sep 17, 2026

  • Endorsed by moutei · Sep 17, 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