Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 8 — rounding the costs up to powers of 1+ϵ1+\epsilon1+ϵ changes every expected cost by a factor in [1,1+ϵ][1,1+\epsilon][1,1+ϵ]

Proved
BatchTesting.PTAS.rounding_sandwich

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

approximation-schemep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1roundingsequential-testing

Let (p,c,β)(p,c,\beta)(p,c,β) be an instance of sequential batch testing on n≥1n\ge1n≥1 variables with pi∈[0,1]p_i\in[0,1]pi​∈[0,1], ci>0c_i>0ci​>0 and β≥0\beta\ge0β≥0, and let 0<ϵ≤10<\epsilon\le10<ϵ≤1. Let c^i=cmin⁡(1+ϵ)ri\hat c_i=c_{\min}(1+\epsilon)^{r_i}c^i​=cmin​(1+ϵ)ri​ be the cost cic_ici​ rounded up: ci/cmin⁡c_i/c_{\min}ci​/cmin​ is replaced by the nearest power of 1+ϵ1+\epsilon1+ϵ at or above it. Write Ec(S)E_c(S)Ec​(S) for the expected cost of a testing scheme SSS under individual costs ccc. Then for every testing scheme SSS,

Ec(S) ≤ Ec^(S) ≤ (1+ϵ) Ec(S).E_c(S)\ \le\ E_{\hat c}(S)\ \le\ (1+\epsilon)\,E_c(S).Ec​(S) ≤ Ec^​(S) ≤ (1+ϵ)Ec​(S).

This is the first step of the algorithm: after rounding, the optimal expected cost grows by a factor of at most 1+ϵ1+\epsilon1+ϵ, and the variables fall into R+1R+1R+1 cost classes of identical cost.

Formalization Note. The rounded costs are in the original units (cmin⁡c_{\min}cmin​ times a power of 1+ϵ1+\epsilon1+ϵ), so both sides compare the same set-up cost β\betaβ. β≥0\beta\ge0β≥0 and pi≥0p_i\ge0pi​≥0 are used; ϵ≤1\epsilon\le1ϵ≤1 is a mission-wide hypothesis, not needed here.

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

theorem rounding_sandwich {n : ℕ} (I : Instance n) (hI : I.Standing) (eps : ℝ) (h0 : 0 < eps) (h1 : eps ≤ 1)
    (S : List (Finset (Fin n))) (hS : IsTestingScheme S) :
    expectedCost I S ≤ expectedCostWith I (roundedCost I eps) S ∧
      expectedCostWith I (roundedCost I eps) S ≤ (1 + eps) * expectedCost I 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), p. 8, §2.1 (Creating cost classes)
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