Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3, p. 18 — the bucketed optimal nice path costs at most (1+ϵ)2⋅OPTF(N(none))(1+\epsilon)^2\cdot\mathrm{OPT}_F(N^{(\mathrm{none})})(1+ϵ)2⋅OPTF​(N(none))

Proved
BatchTesting.PTAS.lemma_3

by mikedeng1 · Oct 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-schemebucketingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1sequential-testing

Let (p,c,β)(p,c,\beta)(p,c,β) be an instance with n≥1n\ge1n≥1, pi∈[0,1]p_i\in[0,1]pi​∈[0,1], ci>0c_i>0ci​>0, β≥0\beta\ge0β≥0, and let 0<ϵ≤10<\epsilon\le10<ϵ≤1. Let N∗(0)=0→⋯→N∗(T)=N(all)N^{*(0)}=0\to\cdots\to N^{*(T)}=N^{(\mathrm{all})}N∗(0)=0→⋯→N∗(T)=N(all) be an optimal path of the dynamic program over the nice-looking states. Partition its steps ttt into buckets by P0(N∗(t−1))∈((1+ϵ)−ℓ,(1+ϵ)−(ℓ−1)]P_0(N^{*(t-1)})\in((1+\epsilon)^{-\ell},(1+\epsilon)^{-(\ell-1)}]P0​(N∗(t−1))∈((1+ϵ)−ℓ,(1+ϵ)−(ℓ−1)], merge the steps of each non-empty bucket into one action, and let N⋄(0)=0,…,N⋄(M)=N(all)N^{\diamond(0)}=0,\dots,N^{\diamond(M)}=N^{(\mathrm{all})}N⋄(0)=0,…,N⋄(M)=N(all) be the resulting subsequence of states, with Δ⋄(m)=N⋄(m)−N⋄(m−1)\Delta^{\diamond(m)}=N^{\diamond(m)}-N^{\diamond(m-1)}Δ⋄(m)=N⋄(m)−N⋄(m−1). Then for every path π\piπ of the dynamic program over FFF,

∑m=1MP0(N⋄(m−1))⋅C(Δ⋄(m)) ≤ (1+ϵ)2⋅cost(π),\sum_{m=1}^{M}P_0(N^{\diamond(m-1)})\cdot C(\Delta^{\diamond(m)})\ \le\ (1+\epsilon)^2\cdot\mathrm{cost}(\pi),m=1∑M​P0​(N⋄(m−1))⋅C(Δ⋄(m)) ≤ (1+ϵ)2⋅cost(π),

that is, the bucketed solution costs at most (1+ϵ)2⋅OPTF(N(none))(1+\epsilon)^2\cdot\mathrm{OPT}_F(N^{(\mathrm{none})})(1+ϵ)2⋅OPTF​(N(none)).

The bucketed solution has at most one step per power of 1+ϵ1+\epsilon1+ϵ in probability; Lemma 4 and Property C rely on that structure.

Formalization Note. Steps with P0(N∗(t−1))=0P_0(N^{*(t-1)})=0P0​(N∗(t−1))=0, which the page's intervals miss when some pi=0p_i=0pi​=0, form one extra last bucket; they contribute 000 to both sides.

Preamble
import Mathlib
import Definitions.Def_BatchTesting_PTAS_Model
Formal statement
namespace BatchTesting.PTAS

theorem lemma_3 {n : ℕ} (I : Instance n) (hI : I.Standing) (eps : ℝ) (h0 : 0 < eps) (h1 : eps ≤ 1)
    (πs : List (State I eps)) (hπs : IsOptPath I eps (FNice I eps) πs)
    (π : List (State I eps)) (hπ : IsPath I eps (F I eps) π) :
    pathCost I eps (bucketed I eps πs) ≤ (1 + eps) ^ 2 * pathCost I eps π := by sorry

end BatchTesting.PTAS
Source
Segev & Shaposhnik, A Polynomial-Time Approximation Scheme for Sequential Batch Testing of Series Systems, SSRN preprint 3277805 (Nov. 2018), p. 18, §4.3, Lemma 3 (bucketing pp. 17–18)
Human review
  • Endorsed by Shuze Chen · Oct 20, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 20, 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