Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Proposition 2(ii), p. 24 — dS/dσ(0,1) = −κf(1)((1−c)/c)(β∫_c^1(1−µ)f + ∫_0^c µf) + κµ̄ (printed middle term corrected)

Proved
ScarceTesting.PerfectTest.dS_dsigma

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

diagnostic-testingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1rationingsocial-planner

Let 0<c<10<c<10<c<1, 0≤β<10\le\beta<10≤β<1, 0<κ<10<\kappa<10<κ<1, let fff be a prior density on [0,1][0,1][0,1], continuous on [0,1][0,1][0,1] at 111, and let SSS be the planner's objective. The left derivative of σ↦S(0,σ)\sigma\mapsto S(0,\sigma)σ↦S(0,σ) at σ=1\sigma=1σ=1 (the perfect test) is

dSdσ(0,1)=−κf(1)1−cc β∫c1(1−μ)f(μ) dμ+κ∫01μf(μ) dμ−κf(1)1−cc∫0cμf(μ) dμ.\frac{dS}{d\sigma}(0,1)=-\kappa f(1)\frac{1-c}{c}\,\beta\int_c^1(1-\mu)f(\mu)\,d\mu+\kappa\int_0^1\mu f(\mu)\,d\mu-\kappa f(1)\frac{1-c}{c}\int_0^c\mu f(\mu)\,d\mu.dσdS​(0,1)=−κf(1)c1−c​β∫c1​(1−μ)f(μ)dμ+κ∫01​μf(μ)dμ−κf(1)c1−c​∫0c​μf(μ)dμ.

The middle term is the loss in detected infections from the lower true positive rate; the other two are the gain from high-prior agents leaving the queue. Part (ii) of Proposition 2 is the condition that this derivative is negative.

Formalization Note The page prints the middle term as κ∫0cμf(μ) dμ\kappa\int_0^c\mu f(\mu)\,d\muκ∫0c​μf(μ)dμ. Differentiating S(0,σ)=⋯+∫ctHA((1−μ)β−μ(1−σ))dF+∫0cA μσ dFS(0,\sigma)=\dots+\int_c^{t_H}A\big((1-\mu)\beta-\mu(1-\sigma)\big)dF+\int_0^cA\,\mu\sigma\,dFS(0,σ)=⋯+∫ctH​​A((1−μ)β−μ(1−σ))dF+∫0c​AμσdF in σ\sigmaσ produces κ∫c1μf\kappa\int_c^1\mu fκ∫c1​μf from the first integral and κ∫0cμf\kappa\int_0^c\mu fκ∫0c​μf from the second, so the middle term is κ∫01μf=κμˉ\kappa\int_0^1\mu f=\kappa\bar\muκ∫01​μf=κμˉ​; the condition on f(1)f(1)f(1) that the page derives next (with ∫01μf\int_0^1\mu f∫01​μf in its numerator) is the one this corrected derivative gives. The derivative is one-sided (within (−∞,1](-\infty,1](−∞,1]): true positive rates are at most 111.

Preamble
import Mathlib
import Definitions.Def_ScarceTesting_PerfectTest_Setting
Formal statement
namespace ScarceTesting.PerfectTest

/-- Proof of Proposition 2(ii), p. 24, corrected: the left derivative of `σ ↦ S(0,σ)` at `σ = 1` is
`−κ f(1) ((1−c)/c) β ∫_c^1 (1−μ) f + κ ∫_0^1 μ f − κ f(1) ((1−c)/c) ∫_0^c μ f`.
The printed display has `κ ∫_0^c μ f` as its middle term; differentiating the factor `−μ(1−σ)` of the
integral over `[c, t_H]` contributes `κ ∫_c^1 μ f` as well, so the middle term is `κ ∫_0^1 μ f = κ μ̄`,
which is the term the printed condition on `f(1)` uses. -/
theorem dS_dsigma (f : ℝ → ℝ) (c β κ : ℝ) (hc0 : 0 < c) (hc1 : c < 1)
    (hβ0 : 0 ≤ β) (hβ1 : β < 1) (hκ0 : 0 < κ) (hκ1 : κ < 1)
    (hf : IsPriorDensity f) (hf1 : ContinuousWithinAt f (Set.Icc 0 1) 1) :
    HasDerivWithinAt (fun σ => S f c β κ 0 σ)
      (-κ * f 1 * ((1 - c) / c) * β * (∫ μ in c..1, (1 - μ) * f μ) +
        κ * (∫ μ in (0:ℝ)..1, μ * f μ) -
        κ * f 1 * ((1 - c) / c) * (∫ μ in (0:ℝ)..c, μ * f μ))
      (Set.Iic 1) 1 := by sorry

end ScarceTesting.PerfectTest
Source
Drakopoulos & Randhawa, Why Perfect Tests May Not Be Worth Waiting For: Information as a Commodity, SSRN 3565245 (version of January 13, 2021), proof of Proposition 2 (Appendix A.1.2), part (ii), p. 24, "Using the above, we obtain dS/dσ(0,1) = …" (middle term corrected)
Human review
  • Endorsed by Shuze Chen · Oct 19, 2026

    Confirmed by the moderator at approval.

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