Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

(EC.1) — the net benefit of testing as a quadratic in the risk

Proved
FamilyGenTest.ec_1

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

genetic-testingmarkov-decision-processoptimal-stoppingp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

Let s\mathbf ss be feasible and iii untested in s\mathbf ss. Then

Ei[ri(Pi(S′))∣s]−ci(s)−rˉi(Pi(s))=−riδ Pi(s)2+(riδ+di−cif) Pi(s)−cis.\mathbb E_i[r_i(\mathbb P_i(\mathbf S'))\mid\mathbf s]-c_i(\mathbf s)-\bar r_i(\mathbb P_i(\mathbf s))=-r_i^\delta\,\mathbb P_i(\mathbf s)^2+(r_i^\delta+d_i-c_i^f)\,\mathbb P_i(\mathbf s)-c_i^s.Ei​[ri​(Pi​(S′))∣s]−ci​(s)−rˉi​(Pi​(s))=−riδ​Pi​(s)2+(riδ​+di​−cif​)Pi​(s)−cis​.

This is the one-person net benefit of testing, the source of the two-sided form of the rule.

Differences from the source:

  • reading: a set of genes J\mathcal JJ in the model of §2; Assumption 4, Assumption 5 and Theorem 1's proof are single-gene → one gene: gi∈{0,1,2}g_i\in\{0,1,2\}gi​∈{0,1,2}; reason: Theorem 1 compares Pi(s)\mathbb P_i(\mathbf s)Pi​(s) with two real thresholds, which needs a scalar; its proof, Assumption 4 and §4.3 are single-gene (pp.15, ec2), and no multi-gene threshold statement is printed
  • generalization: the Mendelian prior (5) → an arbitrary mass function on {0,1,2}I\{0,1,2\}^{\mathcal I}{0,1,2}I; reason: the argument does not use the pedigree and p.11 says priors incorporate all prior information; (5) is the special case given by the theorem eq_5_mendelian_prior
  • encoding: a state as a partition {s0,s1,s2}\{s_0,s_1,s_2\}{s0​,s1​,s2​} of the tested individuals, state space S={s:∃g∈G(s)}\mathcal S=\{\mathbf s:\exists g\in\mathcal G(\mathbf s)\}S={s:∃g∈G(s)} → State I := I → Option (Fin 3), with Feasible meaning P(G∈G(s))>0\mathbb P(G\in\mathcal G(\mathbf s))>0P(G∈G(s))>0; reason: same objects when G\mathcal GG is the support of the prior; the family is a Fintype, possibly empty
  • encoding: ri(Pi(S′))r_i(\mathbb P_i(\mathbf S'))ri​(Pi​(S′)) with Definition 3 and Assumption 1 → testedReward: ri0(0)r_i^0(0)ri0​(0) at result 000, ri1(1)r_i^1(1)ri1​(1) at results 1,21,21,2; reason: after a test the belief is the true carrier status, which is what Assumption 1 and Definition 3 give
  • generalization: the reward assumptions of §4 (Assumptions 1–4) → arbitrary real rewards and costs; reason: the identity is algebraic in the data and does not use them; every instance of the source is covered
Preamble
import Mathlib
import Definitions.Def_FamilyGenTest_Rewards
Formal statement
namespace FamilyGenTest

variable {I : Type*} [Fintype I] [DecidableEq I]

/-- (EC.1) (Adelman & Wang, Optimal Genetic Testing of Families, SSRN 4624694 (Jan 24 2023), p.ec2):
`Eᵢ[rᵢ(ℙᵢ(S′)) | s] − cᵢ(s) − r̄ᵢ(ℙᵢ(s)) = −rᵢ^δ ℙᵢ(s)² + (rᵢ^δ + dᵢ − cᵢᶠ) ℙᵢ(s) − cᵢˢ`. -/
theorem ec_1 (R : Rewards I) (μ : Prior I) (s : State I) (hs : Feasible μ s) (i : I)
    (hi : s i = none) :
    (∑ γ, marginal μ s i γ * testedReward R i γ) - cost R μ s i - rbar R i (risk μ s i)
      = -rdelta R i * risk μ s i ^ 2 + (rdelta R i + censoring R i - R.cf i) * risk μ s i
        - R.cs i := by sorry

end FamilyGenTest
Source
Adelman & Wang, Optimal Genetic Testing of Families, SSRN 4624694 (Jan 24 2023), (EC.1), p.ec2
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me