Greedy (dual-fitting) certificates give a -approximation
ProvedPrimalDualOnline.SetCover.greedy_certificate_boundThe certificate half of Theorem 2.4 of the source. Let and let be a greedy certificate at ratio : covers every element, , the cover cost equals the dual value exactly, , and every packing constraint holds after scaling, for every . Then for every fractional cover ,
This is the dual-fitting pattern: the constructed pays for the cover exactly but is infeasible, and becomes feasible after dividing by . Instantiating recovers the source's greedy guarantee; the harmonic bound itself is already available in Mathlib and is not restated here.
Note that is only required to be positive: values below are not excluded, and they make both the certificate hypothesis and the conclusion correspondingly stronger. As with the primal-dual bound, nothing here asserts that the greedy algorithm produces such a certificate, so Theorem 2.4 is not thereby fully formalized.
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.
import Definitions.Def_PrimalDualOnline_SetCover import Mathlib.Tactic
open PrimalDualOnline.SetCover
theorem PrimalDualOnline.SetCover.greedy_certificate_bound
{E S : Type*} [Fintype E] [Fintype S] [DecidableEq E] [DecidableEq S]
(I : SetCoverInstance E S) (C : Finset S) (y : E → ℝ) (ρ : ℝ)
(hρ : 0 < ρ) (hcert : IsGreedyCertificate I.sets I.cost C y ρ)
(x : S → ℝ) (hx : IsFractionalCover I.sets x) :
coverCost I.cost C ≤ ρ * fractionalCost I.cost x := by sorryRead-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 on two types (elements) and (set indices) is a bundle of exactly four components:
- a family , i.e. a finite subset for each index ;
- a cost function ;
- a proof of nonnegative cost: ;
- a proof of coverability: .
Derived notions, all expanded inline in each section below:
where is formed by filtering the whole index type , is a cardinality in , and is a supremum in taken over all of — a supremum of an empty family, which is when is empty. Further:
sums only over the given finite index set ; sums over all of ; sums over all of .
PrimalDualOnline.SetCover.greedy_certificate_bound
Binders and instance arguments. Universally quantified over arbitrary types and (implicit), with four typeclass arguments: finite, finite, equality on decidable, equality on decidable; either type may be empty. Decidable equality on is needed to form and the covering sums; decidable equality on is required as an instance argument though no notion in the statement refers to it. Six explicit arguments, in order: a set-cover instance (carrying , , the proof , and the proof ); a finite index set ; a function ; a real number ; then, after the hypotheses on and the certificate, a function .
Hypotheses. Three:
- — strictly positive, so and negative are excluded.
- is a -greedy certificate for , unfolding to a conjunction of four parts:
- ( covers );
- ;
- — an exact equality between the cost of and the total of over all of , not an inequality;
- — a -relaxed packing constraint at every index of , with scaling the cost side only.
- is a fractional cover of : , and . No upper bound on any .
Conclusion.
The same that appears in the relaxed packing constraint is the multiplier in the conclusion. The dual vector does not appear in the conclusion.
1. Nonnegativity of cost; every element in some set. Both are fields of the bundled argument , not loose hypotheses. The statement therefore cannot be instantiated at data violating either: the bundle cannot be constructed without proofs of and .
2. Logical redundancy.
- Nonnegativity of cost is derivable from hypothesis 1 together with the fourth conjunct of hypothesis 2: for each , (the left inequality because ), and dividing by gives . This derivation uses the strict positivity of .
- Coverability is derivable from the covering conjunct of hypothesis 2 (a witness in is a witness in ) and independently from hypothesis 3 (an element with would make the covering sum , contradicting ).
- Strict positivity of is not derivable from the other hypotheses: they are satisfiable with — take , , and any covering , so that and . Hence removing hypothesis 1 would strictly enlarge the set of situations the statement ranges over (all configurations with , which the relaxed packing constraint together with and confines to for all ).
- Dropping the two bundled fields would leave the covered situations unchanged, since hypotheses 1–3 force both properties. No other hypothesis is redundant: the exact equality , the covering conjunct, , the relaxed packing constraints, and both halves of hypothesis 3 are mutually independent.
3. Arbitrary or specific. The fractional cover is arbitrary: is universally quantified subject only to feasibility, and the least fractional cost is never mentioned. The cover is arbitrary subject to the four certificate conjuncts — nothing identifies it as the output of a greedy procedure or of any procedure, and it is not claimed minimum-cost or minimal. The dual vector is arbitrary subject to nonnegativity, the exact cost equality, and the -relaxed constraints; in particular is not required to be a dual packing (the unrelaxed inequality is not imposed unless makes it follow). is an arbitrary positive real, tied to nothing else — not to , not to a harmonic number, not to or .
4. Cast from to . There is none in this statement: the multiplier is the real parameter , and no cardinality, frequency, or maximum frequency appears. The multiplier consequently cannot be : hypothesis 1 asserts . For contrast, were permitted to be , the fourth conjunct would read at every , which with forces at every covered — i.e. at every , by the covering conjunct — hence and, by the equality conjunct, , while the right-hand side would be .
5. Degenerate cases.
- empty. The covering conjunct and are vacuous; every is empty, so the relaxed constraints read , which holds since and . , so the equality conjunct forces . The covering inequalities of hypothesis 3 are vacuous, leaving only , so and the conclusion reads with a nonnegative right side. Note the left side is forced to even if contains positive-cost indices — no such satisfies the hypotheses.
- empty. Then and for all , so hypothesis 3 is satisfiable only when is empty (and the bundled coverability field forces this anyway); all sums are empty and the conclusion is .
- empty. The covering conjunct is then unsatisfiable unless is empty; in that case consistently, and the conclusion reads .
- . The relaxed constraints give , and with this forces for every covered , hence (by the covering conjunct) for all ; so and, by the equality conjunct, . Also , so the conclusion reads for every feasible and every .
- Individual zero-cost sets inside the certificate. For any (in or not) with , the fourth conjunct gives , and with this forces for every . Such an index contributes to the left side and to the right side whatever is. Unlike the primal–dual certificate, no equality is imposed on indices of ; only the global equality is.
- small. For the relaxed constraints are stronger than the unrelaxed packing constraints, and the asserted inequality is correspondingly strong: the cost of is bounded by a fraction of the fractional cost of every feasible . As the hypotheses become increasingly restrictive, in the limiting direction forcing to vanish on all covered elements and hence .
- large. Both the fourth conjunct and the conclusion weaken; no upper bound on is imposed, and is not required to be an integer or to relate to any structural quantity of the instance.
- Unbounded entries of the fractional cover. Entries may be arbitrarily large (only and the covering inequalities are imposed), making the right-hand side arbitrarily large; entries may be , and all of is summed over in . Since and , the right-hand side is always nonnegative.
- Empty sets are permitted; distinct indices may carry equal subsets; may contain indices whose removal would still leave a cover.
Not asserted. No claim that arises from a greedy algorithm, or from any algorithm — "greedy" names the predicate only, whose content is exactly the four conjuncts listed. No claim that is a minimum-cost cover, that is of least fractional cost, or that is a maximum packing; the least-cover-cost and least-fractional-cost notions are unused, so nothing is asserted about any optimum, nor about a harmonic-number or logarithmic approximation factor. No claim that is a dual packing in the unrelaxed sense. No claim that a -greedy certificate exists for any given instance or for any particular , and no claim that the hypotheses are jointly satisfiable. No claim that is the least valid multiplier, no tightness or attainment, no reverse inequality, no strict inequality, and no comparison with the maximum frequency.
Confirmed by the mission captain (proposal self-audit).