Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1–2.2, pp. 8–10 — greedy-within-class: every testing scheme is matched by a path of the DP over FFF

Proved
BatchTesting.PTAS.greedy_within_class

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

dynamic-programmingexchange-argumentp2o-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. For every testing scheme SSS there is a path 0=N(0)→⋯→N(T)=N(all)0=N^{(0)}\to\cdots\to N^{(T)}=N^{(\mathrm{all})}0=N(0)→⋯→N(T)=N(all) of the dynamic program over the full state space FFF whose cost, converted back to the original units, is at most the expected cost of SSS under the rounded costs c^\hat cc^:

cmin⁡⋅∑t=1TP0(N(t−1)) C(N(t)−N(t−1)) ≤ Ec^(S).c_{\min}\cdot\sum_{t=1}^{T}P_0(N^{(t-1)})\,C(N^{(t)}-N^{(t-1)})\ \le\ E_{\hat c}(S).cmin​⋅t=1∑T​P0​(N(t−1))C(N(t)−N(t−1)) ≤ Ec^​(S).

This is the content of the greedy-within-class property: testing the variables of each cost class in non-decreasing order of pip_ipi​ never hurts, so a scheme is determined, up to cost, by how many variables of each class it has tested. It shows cmin⁡⋅OPTF(N(none))c_{\min}\cdot\mathrm{OPT}_F(N^{(\mathrm{none})})cmin​⋅OPTF​(N(none)) is at most the rounded optimum.

Formalization Note. The page says an optimal scheme "necessarily" has the property; with ties among the pip_ipi​ that is true only up to ties, so the statement is the dominance form the dynamic program needs. Empty batches of SSS (which would be zero actions) are allowed in SSS; the path has strictly increasing states.

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

theorem greedy_within_class {n : ℕ} (I : Instance n) (hI : I.Standing) (eps : ℝ) (h0 : 0 < eps) (h1 : eps ≤ 1)
    (S : List (Finset (Fin n))) (hS : IsTestingScheme S) :
    ∃ π, IsPath I eps (F I eps) π ∧
      cmin I * pathCost I eps π ≤ expectedCostWith I (roundedCost I eps) S := 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), pp. 8–9, §2.1 (The greedy-within-class property), and p. 10, §2.2, eq. (1)
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