Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4.1 — the set-cover gap: kQkQkQ versus (1−2f) kQln⁡m(1-2f)\,kQ\ln m(1−2f)kQlnm

Proved
SetCoverThreshold.SetCover.lemma_4_1

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

hardness-of-approximationp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1reductionset-cover

Assume the consequence of Raz's theorem (RazRepetition) and fix ε>0\varepsilon>0ε>0. There is c>0c>0c>0 (the constant of Lemma 2.3.1) such that the following holds for every 3CNF-5 formula φ\varphiφ, all ℓ,k,m,d\ell,k,m,dℓ,k,m,d, every code of weight ℓ/2\ell/2ℓ/2 and pairwise distance ≥ℓ/3\ge\ell/3≥ℓ/3, and every family of partition systems Br(m,2ℓ,k,d)B_r(m,2^\ell,k,d)Br​(m,2ℓ,k,d), one per random string rrr; consider the set-cover instance of Section 4 on N=mRN=mRN=mR points.

  1. If φ\varphiφ is satisfiable, the NNN points can be covered by kQkQkQ subsets.
  2. Let f>0f>0f>0 with d≥(1−f) kln⁡md\ge(1-f)\,k\ln md≥(1−f)klnm and
k2⋅2−cℓ < 2⋅2f(kln⁡m)2.k^2\cdot 2^{-c\ell}\ <\ \frac{2\cdot 2f}{(k\ln m)^2}.k2⋅2−cℓ < (klnm)22⋅2f​.

If only a (1−ε)(1-\varepsilon)(1−ε)-fraction of the clauses of φ\varphiφ are simultaneously satisfiable, every cover uses at least

(1−2f) kQln⁡m(1-2f)\,kQ\ln m(1−2f)kQlnm

subsets.

This is the gap of the reduction: a factor of about ln⁡m\ln mlnm between the two cases, which the proof of Theorem 4.4 turns into (1−ε)ln⁡N(1-\varepsilon)\ln N(1−ε)lnN.

Formalization Note "f(k)→0f(k)\to 0f(k)→0 as k→∞k\to\inftyk→∞" is not formalized as a limit: fff is a parameter tied to ddd by d≥(1−f)kln⁡md\ge(1-f)k\ln md≥(1−f)klnm (Lemma 3.2 gives f=2/kf=2/kf=2/k). "Sufficiently large ℓ" is replaced by the condition the proof itself uses (p. 647): 2δ/(kln⁡m)2>k22−cℓ2\delta/(k\ln m)^2>k^2 2^{-c\ell}2δ/(klnm)2>k22−cℓ with δ=2f\delta=2fδ=2f.

Preamble
import Mathlib
import Definitions.Def_CookPvsNP_defs
import Definitions.Def_SetCoverThreshold_SetCover_Formula
import Definitions.Def_SetCoverThreshold_SetCover_ProofSystem
import Definitions.Def_SetCoverThreshold_SetCover_PartitionSystem
import Definitions.Def_SetCoverThreshold_SetCover_Reduction
Formal statement
namespace SetCoverThreshold.SetCover

theorem lemma_4_1 (hRaz : RazRepetition) (ε : ℝ) (hε : 0 < ε) :
    ∃ c : ℝ, 0 < c ∧
      ∀ (φ : Formula5) (ℓ k m d : ℕ) (code : Fin k → Fin ℓ → Bool), IsCode ℓ k code →
        ∀ P : φ.RandomString ℓ → PartitionSystem m (2 ^ ℓ) k d,
          (φ.toCNF.Satisfiable →
              ∃ 𝒞 : Finset (φ.SetIdx code), φ.IsSCCover code P 𝒞 ∧
                𝒞.card ≤ k * φ.numQuestions ℓ) ∧
            ∀ f : ℝ, 0 < f → (1 - f) * k * Real.log m ≤ d →
              (k : ℝ) ^ 2 * (2 : ℝ) ^ (-(c * ℓ)) < 2 * (2 * f) / (k * Real.log m) ^ 2 →
                AtMostFracSat (1 - ε) φ.toCNF →
                  ∀ 𝒞 : Finset (φ.SetIdx code), φ.IsSCCover code P 𝒞 →
                    (1 - 2 * f) * k * φ.numQuestions ℓ * Real.log m ≤ 𝒞.card := by sorry

end SetCoverThreshold.SetCover
Source
Feige, A threshold of ln n for approximating set cover, J. ACM 45(4) (1998), p. 645, Lemma 4.1 (proof pp. 645–647; the ℓ condition from its last sentence, p. 647)
Read-back

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

Hypotheses: RazRepetition\mathrm{RazRepetition}RazRepetition and a real ε>0\varepsilon>0ε>0.

RazRepetition\mathrm{RazRepetition}RazRepetition says: for every ε′>0\varepsilon'>0ε′>0 there is c′>0c'>0c′>0 such that, for every Formula5\mathrm{Formula5}Formula5 in which every assignment satisfies at most a (1−ε′)(1-\varepsilon')(1−ε′)-fraction of clauses, the ℓ\ellℓ-fold clause–variable two-prover game accepts with fraction ≤2−c′ℓ\le2^{-c'\ell}≤2−c′ℓ for every ℓ\ellℓ and all strategies.

Conclusion: there is c>0c>0c>0, depending only on ε\varepsilonε, with the following property. Take any:

  • Formula5\mathrm{Formula5}Formula5 φ\varphiφ (nnn variables, M≥1M\ge1M≥1 three-literal clauses on distinct variables, each variable in exactly 555 (clause, position) pairs);
  • naturals ℓ,k,m,d\ell,k,m,dℓ,k,m,d;
  • code with IsCode(ℓ,k,code)\mathrm{IsCode}(\ell,k,\mathrm{code})IsCode(ℓ,k,code) (weights exactly ℓ/2\ell/2ℓ/2, pairwise distance ≥ℓ/3\ge\ell/3≥ℓ/3);
  • family PPP of partition systems B(m,2ℓ,k,d)B(m,2^\ell,k,d)B(m,2ℓ,k,d), one per random string rrr.

Write Q=n⌊ℓ/2⌋M⌊ℓ/2⌋Q=n^{\lfloor\ell/2\rfloor}M^{\lfloor\ell/2\rfloor}Q=n⌊ℓ/2⌋M⌊ℓ/2⌋. Then both of the following hold:

  1. If toCNF(φ)\mathrm{toCNF}(\varphi)toCNF(φ) is satisfiable (outside library's notion), there is a finite set C\mathcal CC of triples (i,q,a)(i,q,a)(i,q,a) that covers all points (r,b)(r,b)(r,b) and has ∣C∣≤kQ|\mathcal C|\le kQ∣C∣≤kQ.

  2. For every real f>0f>0f>0 with

    • (1−f) kln⁡m≤d(1-f)\,k\ln m\le d(1−f)klnm≤d, and
    • k2 2−cℓ<2(2f)(kln⁡m)2k^2\,2^{-c\ell}<\dfrac{2(2f)}{(k\ln m)^2}k22−cℓ<(klnm)22(2f)​,

    if every assignment satisfies at most (1−ε)M(1-\varepsilon)M(1−ε)M clauses of φ\varphiφ, then every covering C\mathcal CC satisfies

(1−2f) k Qln⁡m≤∣C∣.(1-2f)\,k\,Q\ln m\le|\mathcal C|.(1−2f)kQlnm≤∣C∣.

The notions used:

  • Triples (i,q,a)(i,q,a)(i,q,a): i<ki<ki<k; qqq has clause cjc_jcj​ where codei(j)=1\mathrm{code}_i(j)=1codei​(j)=1 and a variable elsewhere; aaa is a canonical answer (satisfying triples at clause coordinates, bits 1,21,21,2 false at variable coordinates).
  • Points are (r,b)(r,b)(r,b) with b<mb<mb<m.
  • (i,q,a)(i,q,a)(i,q,a) covers (r,b)(r,b)(r,b) iff prover iii's question on rrr is qqq and partr(b,t)=i\mathrm{part}_r(b,t)=ipartr​(b,t)=i, where t=∑j[βj]2jt=\sum_j[\beta_j]2^jt=∑j​[βj​]2j and β\betaβ is the induced assignment (aj(pj)a_j(p_j)aj​(pj​) at clause coordinates, aj(0)a_j(0)aj​(0) at variable coordinates).
  • A partition system B(m,L,k,d)B(m,L,k,d)B(m,L,k,d) has distinct partitions, and every cover of the points by blocks from pairwise different partitions has size ≥d\ge d≥d.

Degenerate cases:

  • If k=0k=0k=0 or m≤1m\le1m≤1, the right side of the second inequality in part 2 is 2(2f)/0=02(2f)/0=02(2f)/0=0, which is not >k22−cℓ≥0>k^2 2^{-c\ell}\ge0>k22−cℓ≥0. So part 2 is vacuous there.
  • With k=0k=0k=0 a family PPP exists only when m=0m=0m=0.
  • For f≥12f\ge\tfrac12f≥21​ (and m≥1m\ge1m≥1) the conclusion of part 2 is automatic.
  • For ε>1/8\varepsilon>1/8ε>1/8 the assumption of part 2 is unsatisfiable for a Formula5\mathrm{Formula5}Formula5, since some assignment satisfies at least 78M\tfrac78M87​M clauses.
  • For odd ℓ\ellℓ, IsCode\mathrm{IsCode}IsCode forces k=0k=0k=0.
  • Part 1 requires no relation between ddd, mmm and kkk.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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