Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Display (6), p. 11 — the demand for a (φ,σ)-test is F(t_H) − F(t_L), so the availability is min{1, κ/(F(t_H) − F(t_L))}

Proved
ScarceTesting.PerfectTest.display_6

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

diagnostic-testingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1rationing

Throughout, 0<c<10<c<10<c<1 is the cost-to-benefit ratio of acting (seeking treatment), and a (φ,σ)(\varphi,\sigma)(φ,σ)-test has false positive rate φ\varphiφ and true positive rate σ\sigmaσ with 0≤φ≤σ≤10\le\varphi\le\sigma\le10≤φ≤σ≤1, σ>0\sigma>0σ>0 and φ<1\varphi<1φ<1. The prior density fff is a nonnegative integrable function on [0,1][0,1][0,1] with total mass 111, and F(x)=∫0xfF(x)=\int_0^x fF(x)=∫0x​f. Let 0<κ<10<\kappa<10<κ<1 be the mass of available test kits. The demand D(φ,σ)D(\varphi,\sigma)D(φ,σ) — the fff-mass of agents with positive value of the test — equals

D(φ,σ)=F(tH)−F(tL),D(\varphi,\sigma)=F(t_H)-F(t_L),D(φ,σ)=F(tH​)−F(tL​),

and consequently the availability under uniformly random allocation is

min⁡{1,κD(φ,σ)}=A(tL,tH)=min⁡{1,κF(tH)−F(tL)}.\min\Big\{1,\frac{\kappa}{D(\varphi,\sigma)}\Big\}=A(t_L,t_H)=\min\Big\{1,\frac{\kappa}{F(t_H)-F(t_L)}\Big\}.min{1,D(φ,σ)κ​}=A(tL​,tH​)=min{1,F(tH​)−F(tL​)κ​}.

This expresses the congestion created by a test entirely through its two thresholds.

Formalization Note The conditions σ>0\sigma>0σ>0 and φ<1\varphi<1φ<1 keep the denominators of tLt_LtL​ and tHt_HtH​ positive (Lean evaluates 0/00/00/0 as 000); they exclude only the degenerate (0,0)(0,0)(0,0)- and (1,1)(1,1)(1,1)-tests. The availability is 111 when the demand does not exceed κ\kappaκ, including zero demand.

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

/-- Display (6) and the availability, p. 11: the demand for a `(φ,σ)`-test is
`D(φ,σ) = F(t_H) − F(t_L)`, so the availability is `A(t_L,t_H) = min{1, κ/(F(t_H) − F(t_L))}`. -/
theorem display_6 (f : ℝ → ℝ) (c κ φ σ : ℝ)
    (hc0 : 0 < c) (hc1 : c < 1) (hφ0 : 0 ≤ φ) (hφσ : φ ≤ σ) (hσ1 : σ ≤ 1)
    (hσ0 : 0 < σ) (hφ1 : φ < 1)
    (hκ0 : 0 < κ) (hκ1 : κ < 1) (hf : IsPriorDensity f) :
    demand f c φ σ = cdf f (tH c φ σ) - cdf f (tL c φ σ) ∧
    availability κ (demand f c φ σ) = availThr f κ (tL c φ σ) (tH c φ σ) := 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), display (6) and the availability A(t_L,t_H), p. 11
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