Theorem 4 — R[C1, SC(k)](n) ≤ Σ_{j=1}^k (1/j), with equality for all sufficiently large n
ProvedJohnsonApprox.SetCover.greedy_setCover_ratio_harmonicTheorem 4 (Johnson 1974). For all and , , with equality for all sufficiently large .
Here is SET COVERING I restricted to families no set of which has more than elements, is the minimum size of a subcover, and C1 is the greedy algorithm that repeatedly chooses a set covering the largest number of still uncovered points, breaking ties arbitrarily. Write . Fix . The theorem is stated in the following size-free form.
- Upper bound. For every input of and every family choosable by C1 given ,
- Attainment. There are an input of and a family choosable by C1 given with and
The theorem shows that the natural greedy heuristic for set covering has a worst-case ratio that depends only on the largest set size , and that the harmonic number is exactly the right constant.
Formalization Note The paper's is the maximum of over inputs of size at most "in some standard notation", which the paper never fixes. It is replaced by the size-free form above: part 1 says every ratio is at most , and part 2 says the value is attained by some input; since is a maximum over finitely many inputs and nondecreasing in , this is equivalent to the paper's claim. The ratio is stated multiplicatively in , so no division by occurs (the empty input gives in part 1 and is excluded from part 2 by ). Part 1 quantifies over every choosable output, which is the paper's = WORST over choosable solutions. Inputs are indexed families over any finite index type and any ground type with decidable equality; repeated sets are allowed, which only widens the input class. is Mathlib's harmonic k.
import Mathlib import Definitions.Def_JohnsonApprox_SetCover_Problem import Definitions.Def_JohnsonApprox_SetCover_C1
namespace JohnsonApprox.SetCover
theorem greedy_setCover_ratio_harmonic (k : ℕ) (hk : 1 ≤ k) :
(∀ {ι α : Type} [Fintype ι] [DecidableEq α] (S : ι → Finset α), InSC k S →
∀ F₁ : Finset (Finset α), Choosable S F₁ → (F₁.card : ℚ) ≤ harmonic k * opt S) ∧
(∃ (ι α : Type) (_ : Fintype ι) (_ : DecidableEq α) (S : ι → Finset α), InSC k S ∧
∃ F₁ : Finset (Finset α), Choosable S F₁ ∧ 0 < opt S ∧
(F₁.card : ℚ) = harmonic k * opt S) := by sorry
end JohnsonApprox.SetCover
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Here is a natural number with . The statement uses four names it does not define: , , and . The first three come from the imported modules Def_JohnsonApprox_SetCover_Problem and Def_JohnsonApprox_SetCover_C1. Their code was not given with this declaration, so this read-back can only name them and cannot expand them. The name matches the standard harmonic number , a rational with . That reading assumes no definition of the same name in the imported modules or the namespace JohnsonApprox.SetCover shadows it, which cannot be confirmed from what was given. Below, is compared with rationals, and it is either a rational or a quantity automatically converted to one.
The theorem asserts that two statements both hold.
(1) Upper bound, for every instance. Take any two types and with the following properties:
- is finite.
- Equality on is decidable.
- may be infinite.
Take any family of finite subsets with . Then for every finite collection of finite subsets of with ,
Here counts the distinct sets in . is a set of subsets of , not a list of indices from , so repeated sets and different indices with each count once. Statement (1) does not use the hypothesis .
(2) Tightness, by one instance. There exist all of the following:
- types and ;
- a finiteness structure on and a decidable-equality structure on , each of which may be any such structure, not necessarily the canonical one;
- a family with ;
- a finite collection of finite subsets of with .
For these, and
Statement (2) asks for just one such instance for the given . It says nothing about how large the instance is or whether such instances occur for infinitely many sizes. All types and in both statements are ordinary types in the lowest universe.
Degenerate cases. The hypothesis rules out . When , , so statement (1) reads and statement (2) asks for an instance with . Statement (1) quantifies over every finite , including an empty one, which gives the empty family . What happens there depends on the unexpanded definitions:
- whether can hold;
- which count as (possibly only , which makes the bound read );
- what value takes.
may also be a total function that returns a default value, such as , when no cover exists, for example when the do not cover the intended ground set. In that case statement (1) would force , that is, , for every choosable of such an instance. Statement (2) excludes this case only for its own witness, by requiring . Whether or can be satisfied at all, which would make statement (1) vacuous, cannot be read from this code. Statement (2) does assert that for each both are satisfied together at least once.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.