Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 5.4 — the fraction of good r is at least ε/3

Proved
SetCoverThreshold.MaxCover.prop_5_4

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

combinatoricshardness-of-approximationmax-k-coverp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let ε>0\varepsilon>0ε>0. Then there is k0k_0k0​ such that for every k≥k0k\ge k_0k≥k0​, every ℓ\ellℓ, every code of kkk words of length ℓ\ellℓ, weight ℓ/2\ell/2ℓ/2 and pairwise distance at least ℓ/3\ell/3ℓ/3, and every 3CNF-5 formula φ\varphiφ, the following holds in the max k′k'k′-cover instance of §5 (N=mRN=mRN=mR points, m=k2ℓm=k^{2^\ell}m=k2ℓ, R=(3M)ℓR=(3M)^\ellR=(3M)ℓ). If a collection C\mathcal CC of at most k′=kQk'=kQk′=kQ sets covers at least (1−1/e+ε)N(1-1/e+\varepsilon)N(1−1/e+ε)N points, then

#{r:r is good} ≥ ε3 R,\#\{r : r \text{ is good}\}\ \ge\ \frac{\varepsilon}{3}\,R,#{r:r is good} ≥ 3ε​R,

where rrr is good if wr≤3k/εw_r\le 3k/\varepsilonwr​≤3k/ε and two sets of C\mathcal CC with (q,i),(q′,i′)∈r(q,i),(q',i')\in r(q,i),(q′,i′)∈r and i≠i′i\ne i'i=i′ induce the same partition label ara_rar​.

In the paper's words: assume that a (1−1/e+ε)(1-1/e+\varepsilon)(1−1/e+ε)-fraction of the points are covered; then the fraction of good rrr is at least ε/3\varepsilon/3ε/3. It is the §5 analogue of Proposition 4.2.

Formalization Note "For large enough kkk" (from the proof) is ∃k0 ∀k≥k0\exists k_0\,\forall k\ge k_0∃k0​∀k≥k0​, with k0k_0k0​ chosen before ℓ\ellℓ, φ\varphiφ and C\mathcal CC. The fraction is stated as a count, which avoids a division by RRR (and a vacuous failure when φ\varphiφ has no clauses). The proof's reference to "Proposition 8" is a typo for Proposition 4.2.

Preamble
import Mathlib
import Definitions.Def_CookPvsNP_defs
import Definitions.Def_SetCoverThreshold_MaxCover_Formula
import Definitions.Def_SetCoverThreshold_MaxCover_ProofSystem
import Definitions.Def_SetCoverThreshold_MaxCover_Reduction
Formal statement
namespace SetCoverThreshold.MaxCover

/-- **Proposition 5.4** (Feige 1998, p. 649): for every `ε > 0` and all large enough `k`, in
the §5 instance built from a 3CNF-5 formula `φ` and a code (weights `ℓ/2`, distances
`≥ ℓ/3`), every collection of at most `kQ` sets that covers at least a
`(1 − 1/e + ε)`-fraction of the `N` points has at least an `ε/3`-fraction of good random
strings. -/
theorem prop_5_4 (ε : ℝ) (hε : 0 < ε) :
    ∃ k₀ : ℕ, ∀ k : ℕ, k₀ ≤ k → ∀ (ℓ : ℕ) (code : Fin k → Fin ℓ → Bool), IsCode code →
      ∀ (φ : Formula5) (C : Finset (SetIdx φ code)), C.card ≤ coverBudget φ code →
        (1 - Real.exp (-1) + ε) *
            (Fintype.card (RandString φ ℓ × ((Fin ℓ → Bool) → Fin k)) : ℝ) ≤
          ((coveredMaxCover φ code C).card : ℝ) →
        ε / 3 * (Fintype.card (RandString φ ℓ) : ℝ) ≤ (goodCount φ code ε C : ℝ) := by sorry

end SetCoverThreshold.MaxCover
Source
Feige, A threshold of ln n for approximating set cover, J. ACM 45(4) (1998), p. 649, Proposition 5.4
Read-back

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

Setting. Fix a real ε>0\varepsilon>0ε>0. The objects involved:

  • Formula. φ\varphiφ is a Formula5: MMM clauses of three literals over distinct variables var(c,p)\mathrm{var}(c,p)var(c,p), with every occurring variable in exactly 555 clauses.
  • Code. code:{0..k−1}×{0..ℓ−1}→Bool\mathrm{code}:\{0..k-1\}\times\{0..\ell-1\}\to\mathrm{Bool}code:{0..k−1}×{0..ℓ−1}→Bool is a code:
    • twice the number of ones in each word equals ℓ\ellℓ;
    • distinct words have Hamming distance ddd with ℓ≤3d\ell\le3dℓ≤3d.
  • Random strings. A random string rrr maps each j<ℓj<\ellj<ℓ to (cj,pj)(c_j,p_j)(cj​,pj​). There are (3M)ℓ(3M)^\ell(3M)ℓ of them.
  • Questions. Prover iii's question on rrr has entry jjj equal to cjc_jcj​ if code(i,j)\mathrm{code}(i,j)code(i,j) is true, and to var(cj,pj)\mathrm{var}(c_j,p_j)var(cj​,pj​) otherwise.
  • Set indices. A set index s=(i,q,a)s=(i,q,a)s=(i,q,a) consists of a prover i<ki<ki<k, a question qqq that prover iii receives on some rrr, and an answer aaa to qqq. The answer gives a satisfying triple for each clause entry and a bit for each variable entry.
    • ar∈Boolℓa_r\in\mathrm{Bool}^\ellar​∈Boolℓ takes bit pjp_jpj​ of the triple, or the bit.
  • Points. Points are pairs (r,b)(r,b)(r,b) with b:Boolℓ→{0..k−1}b:\mathrm{Bool}^\ell\to\{0..k-1\}b:Boolℓ→{0..k−1}, so
N=(3M)ℓk2ℓ.N=(3M)^\ell k^{2^\ell}.N=(3M)ℓk2ℓ.

(r,b)(r,b)(r,b) is covered by sss iff prover iii's question on rrr is qqq and b(ar)=ib(a_r)=ib(ar​)=i.

  • Budget. coverBudget=∑i∣{possible questions of i}∣\mathrm{coverBudget}=\sum_i|\{\text{possible questions of } i\}|coverBudget=∑i​∣{possible questions of i}∣.
  • Good strings. rrr is good for CCC if both:
    • wr≤3k/εw_r\le3k/\varepsilonwr​≤3k/ε, where wrw_rwr​ counts the s∈Cs\in Cs∈C whose question matches rrr;
    • some s,s′∈Cs,s'\in Cs,s′∈C with different provers both match rrr and have (as)r=(as′)r(a_s)_r=(a_{s'})_r(as​)r​=(as′​)r​.

Claim. There is k0∈Nk_0\in\mathbb Nk0​∈N such that the following holds for every k≥k0k\ge k_0k≥k0​, every ℓ∈N\ell\in\mathbb Nℓ∈N, every code, every φ\varphiφ (no satisfiability assumption), and every collection CCC of set indices with ∣C∣≤coverBudget|C|\le\mathrm{coverBudget}∣C∣≤coverBudget:

(1−e−1+ε)N≤∣points covered by C∣  ⟹  ε3(3M)ℓ≤#{r good}.\Big(1-e^{-1}+\varepsilon\Big)N\le|\text{points covered by }C| \;\Longrightarrow\; \tfrac{\varepsilon}{3}(3M)^\ell\le\#\{r\text{ good}\}.(1−e−1+ε)N≤∣points covered by C∣⟹3ε​(3M)ℓ≤#{r good}.

The same ε\varepsilonε appears in the coverage slack and in the goodness threshold.

Degenerate cases:

  • Large ε\varepsilonε. If ε>e−1\varepsilon>e^{-1}ε>e−1, the premise requires more than NNN covered points. So for N>0N>0N>0 it is impossible and the implication is vacuous. For N=0N=0N=0 both sides are 0≤00\le00≤0.
  • N=0N=0N=0. This happens when M=0M=0M=0 and ℓ≥1\ell\ge1ℓ≥1, or when k=0k=0k=0.
  • Odd ℓ\ellℓ with k≥1k\ge1k≥1. No code exists, so the statement is vacuous.
  • ℓ=0\ell=0ℓ=0. Any code qualifies, there is one random string and kkk points.
  • k≤1k\le1k≤1. No string is good, so for N>0N>0N>0 the premise must fail.
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