Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 21.2 — finite-horizon Bayesian sequential testing (printed statement)

Disproved
PeskirShiryaev.SequentialTesting.theorem_21_2

by Shuze Chen · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

optimal-stoppingp2o-gran-per-chapterp2o-plan-bookp2o-v1probabilitysequential-testingstatistics

Consider the finite-horizon Bayesian test of the two fixed drift hypotheses for Xu=θμu+σWuX_u=\theta\mu u+\sigma W_uXu​=θμu+σWu​, with prior p∈[0,1]p\in[0,1]p∈[0,1], positive error losses a,ba,ba,b, and horizon T>0T>0T>0. Let H(p)=min⁡{ap,b(1−p)}H(p)=\min\{ap,b(1-p)\}H(p)=min{ap,b(1−p)}, c=b/(a+b)c=b/(a+b)c=b/(a+b), and let g0,g1g_0,g_1g0​,g1​ be the contact boundaries of the variational value. The infinite-horizon threshold pair satisfies its root equations, and ggg lies in the continuous monotone class A∗≤g0<c<g1≤B∗A_*\le g_0<c<g_1\le B_*A∗​≤g0​<c<g1​≤B∗​ before TTT, with both endpoints ccc.

The theorem asserts that

τ∗=inf⁡{0≤u≤T:Πup∉(g0(u),g1(u))}\tau_* = \inf\{0\le u\le T:\Pi^p_u\notin(g_0(u),g_1(u))\}τ∗​=inf{0≤u≤T:Πup​∈/(g0​(u),g1​(u))}

is admissible and attains the posterior value. There is an admissible optimal binary decision whose values satisfy the printed cases: d∗=1d_*=1d∗​=1 when the stopped posterior equals g1(τ∗)g_1(\tau_*)g1​(τ∗​), or d∗=0d_*=0d∗​=0 when it equals g0(τ∗)g_0(\tau_*)g0​(τ∗​). Its Bayesian risk equals V(0,p)V(0,p)V(0,p) and is no larger than that of any admissible bounded test.

With M(p,u)=EpH(Πup)M(p,u)=E_pH(\Pi^p_u)M(p,u)=Ep​H(Πup​) and K(p,u,q)=Pp(Πup≤q)K(p,u,q)=P_p(\Pi^p_u\le q)K(p,u,q)=Pp​(Πup​≤q), the boundaries solve

M(gi(t),T−t)=H(gi(t))+∫0T−t[K(gi(t),u,g0(t+u))−K(gi(t),u,g1(t+u))] du,M(g_i(t),T-t)=H(g_i(t))+\int_0^{T-t}[K(g_i(t),u,g_0(t+u))-K(g_i(t),u,g_1(t+u))]\,du,M(gi​(t),T−t)=H(gi​(t))+∫0T−t​[K(gi​(t),u,g0​(t+u))−K(gi​(t),u,g1​(t+u))]du,

for i=0,1i=0,1i=0,1 and 0≤t≤T0\le t\le T0≤t≤T, and are the unique solution in the stated boundary class. The theorem also asserts the two Gaussian expectation formulas (21.2.47) and K(gi(t),u,gj(t+u))=Qμ/σ(gi(t),u,gj(t+u))K(g_i(t),u,g_j(t+u))=Q_{\mu/\sigma}(g_i(t),u,g_j(t+u))K(gi​(t),u,gj​(t+u))=Qμ/σ​(gi​(t),u,gj​(t+u)) from (21.2.48), for both i,ji,ji,j and all admissible elapsed times. If a=ba=ba=b, then g1=1−g0g_1=1-g_0g1​=1−g0​ on [0,T][0,T][0,T].

This is the chapter's complete finite-horizon boundary characterization, including its explicit numerical kernels.

Formalization Note This faithful anchor intentionally retains the two documented printed defects: the equality-only decision graph does not cover immediate stopping outside the continuation interval (F1), and the signed transition formula fails for μ/σ<0\mu/\sigma<0μ/σ<0 (F2). Consequently the anchor is expected to be disproved. At zero elapsed time the otherwise singular transition expression is assigned its deterministic point-mass value; Gaussian integration uses the standard normal measure. The finite-horizon restriction is the setting of §21.2 despite the theorem's citation of the earlier unrestricted equations.

Preamble
import Definitions.Def_PeskirShiryaev_SequentialTesting_BoundaryClass

open MeasureTheory ProbabilityTheory Set
open scoped ENNReal NNReal
Formal statement
namespace PeskirShiryaev.SequentialTesting

/-- Theorem 21.2 as printed, (21.2.44)-(21.2.48). F1 and F2 are deliberately
retained: the two equality-only decision branches and the signed Gaussian
CDF coefficient. This anchor is expected to be false; see the separate variant. -/
theorem theorem_21_2 {Ω : Type*} [MeasurableSpace Ω]
    (P0 P1 : Measure Ω) [IsProbabilityMeasure P0] [IsProbabilityMeasure P1]
    (θ : Ω → Bool) (hθ : Measurable θ)
    (hθ0 : ∀ᵐ ω ∂P0, θ ω = false) (hθ1 : ∀ᵐ ω ∂P1, θ ω = true)
    (W : ℝ≥0 → Ω → ℝ) (hWmeas : ∀ u, Measurable (W u))
    (hWcont : ∀ ω, Continuous (fun u => W u ω)) (hW0 : ∀ ω, W 0 ω = 0)
    (hB0 : IsBrownianReal W P0) (hB1 : IsBrownianReal W P1)
    (μ σ a b T : ℝ) (hμ : μ ≠ 0) (hσ : σ ≠ 0)
    (ha : 0 < a) (hb : 0 < b) (hT : 0 < T) :
    let E : Model Ω :=
      { P0 := P0, P1 := P1, prob0 := inferInstance, prob1 := inferInstance,
        θ := θ, θ_measurable := hθ, θ_zero := hθ0, θ_one := hθ1,
        W := W, W_measurable := hWmeas, W_continuous := hWcont, W_zero := hW0,
        brownian0 := hB0, brownian1 := hB1 }
    let C : Parameters :=
      { μ := μ, σ := σ, a := a, b := b, T := T, drift_ne := hμ,
        noise_ne := hσ, a_pos := ha, b_pos := hb, horizon_pos := hT }
    let g := optimalBoundary E C
    ThresholdPair C (lowerThreshold C) (upperThreshold C) ∧
    BoundaryClass C g ∧ SolvesIntegralEquations E C g ∧
    (∀ h : Fin 2 → ℝ → ℝ, BoundaryClass C h →
      SolvesIntegralEquations E C h → ∀ i, EqOn (h i) (g i) (Icc 0 C.T)) ∧
    (∀ p ∈ Icc (0 : ℝ) 1,
      let τ := exitTime E C g 0 p
      Admissible E C C.T τ ∧ stoppingCost E C 0 p τ = value E C 0 p ∧
      ∃ d : Ω → Bool, AdmissibleDecision E C τ d ∧
        PrintedDecision E C g p τ d ∧ bayesRisk E C p τ d = value E C 0 p ∧
        ∀ (s : Ω → ℝ≥0) (e : Ω → Bool), Admissible E C C.T s →
          AdmissibleDecision E C s e → bayesRisk E C p τ d ≤ bayesRisk E C p s e) ∧
    (∀ t ∈ Icc (0 : ℝ) C.T, ∀ i : Fin 2,
      terminalMean E C (g i t) (C.T - t) = gaussianTerminalMean C (g i t) (C.T - t)) ∧
    (∀ t ∈ Icc (0 : ℝ) C.T, ∀ i j : Fin 2, ∀ u ∈ Icc (0 : ℝ) (C.T - t),
      transitionCDF E C (g i t) u (g j (t + u)) =
        gaussianTransitionCDF (C.μ / C.σ) (g i t) u (g j (t + u))) ∧
    (C.a = C.b → ∀ t ∈ Icc (0 : ℝ) C.T, g 1 t = 1 - g 0 t) := by sorry

end PeskirShiryaev.SequentialTesting
Source
Peskir and Shiryaev, Optimal Stopping and Free-Boundary Problems, Birkhäuser Verlag, 2006, DOI 10.1007/978-3-7643-7390-0, pp. 299–301 / PDF pp. 316–318, Theorem 21.2, Eqs. (21.2.44)–(21.2.48)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

The statement assumes the following data and hypotheses:

  • Sample space and measures. Ω\OmegaΩ is a measurable space carrying two probability measures, P0P_0P0​ and P1P_1P1​.
  • Hypothesis indicator. θ:Ω→{false,true}\theta:\Omega\to\{\text{false},\text{true}\}θ:Ω→{false,true} is measurable. It equals false P0P_0P0​-almost surely and true P1P_1P1​-almost surely.
  • Process. W=(Wu)u≥0W=(W_u)_{u\ge 0}W=(Wu​)u≥0​ is a real-valued process indexed by the nonnegative reals u∈[0,∞)u\in[0,\infty)u∈[0,∞). Each WuW_uWu​ is measurable, and every path u↦Wu(ω)u\mapsto W_u(\omega)u↦Wu​(ω) is continuous. Also W0(ω)=0W_0(\omega)=0W0​(ω)=0 for every ω\omegaω, not just almost every ω\omegaω.
  • Brownian hypotheses. WWW satisfies the predicate IsBrownianReal under P0P_0P0​ and also under P1P_1P1​. That predicate comes from the imported module and is not shown here. By its name it says WWW is a real Brownian motion under each measure, but its exact content cannot be read from this code.
  • Real parameters. μ,σ,a,b,T\mu,\sigma,a,b,Tμ,σ,a,b,T are real numbers with μ≠0\mu\neq 0μ=0, σ≠0\sigma\neq 0σ=0, a>0a>0a>0, b>0b>0b>0 and T>0T>0T>0.

From these the statement builds a model EEE (the measures, θ\thetaθ, WWW and the hypotheses above) and a parameter record C=(μ,σ,a,b,T)C=(\mu,\sigma,a,b,T)C=(μ,σ,a,b,T). It then sets

g:=optimalBoundary(E,C),g := \text{optimalBoundary}(E,C),g:=optimalBoundary(E,C),

which is a pair of real functions g0,g1:R→Rg_0,g_1:\mathbb{R}\to\mathbb{R}g0​,g1​:R→R, indexed by i∈{0,1}i\in\{0,1\}i∈{0,1}. None of the named notions used below is defined in the visible code; they all come from the imported module. These names are: ThresholdPair, lowerThreshold, upperThreshold, BoundaryClass, SolvesIntegralEquations, exitTime, Admissible, AdmissibleDecision, stoppingCost, value, bayesRisk, PrintedDecision, terminalMean, gaussianTerminalMean, transitionCDF and gaussianTransitionCDF. What follows reports only how they are combined.

The statement asserts that all of the following hold together.

  1. Thresholds. The pair (lowerThreshold(C), upperThreshold(C))\big(\text{lowerThreshold}(C),\ \text{upperThreshold}(C)\big)(lowerThreshold(C), upperThreshold(C)) satisfies ThresholdPair(C,⋅,⋅)\text{ThresholdPair}(C,\cdot,\cdot)ThresholdPair(C,⋅,⋅).
  2. Boundary class. ggg belongs to BoundaryClass(C)\text{BoundaryClass}(C)BoundaryClass(C).
  3. Integral equations. ggg satisfies SolvesIntegralEquations(E,C,⋅)\text{SolvesIntegralEquations}(E,C,\cdot)SolvesIntegralEquations(E,C,⋅).
  4. Uniqueness. Take any pair h=(h0,h1)h=(h_0,h_1)h=(h0​,h1​) of real functions on R\mathbb{R}R that is in BoundaryClass(C)\text{BoundaryClass}(C)BoundaryClass(C) and satisfies SolvesIntegralEquations(E,C,⋅)\text{SolvesIntegralEquations}(E,C,\cdot)SolvesIntegralEquations(E,C,⋅). Then for each i∈{0,1}i\in\{0,1\}i∈{0,1}, hi(t)=gi(t)h_i(t)=g_i(t)hi​(t)=gi​(t) for all t∈[0,T]t\in[0,T]t∈[0,T]. Nothing is claimed about ttt outside [0,T][0,T][0,T].
  5. Optimality. For every p∈[0,1]p\in[0,1]p∈[0,1], let τ:=exitTime(E,C,g,0,p)\tau:=\text{exitTime}(E,C,g,0,p)τ:=exitTime(E,C,g,0,p). Then:
    • τ\tauτ is Admissible(E,C,T,⋅)\text{Admissible}(E,C,T,\cdot)Admissible(E,C,T,⋅).
    • stoppingCost(E,C,0,p,τ)=value(E,C,0,p)\text{stoppingCost}(E,C,0,p,\tau)=\text{value}(E,C,0,p)stoppingCost(E,C,0,p,τ)=value(E,C,0,p).
    • There exists a decision d:Ω→{false,true}d:\Omega\to\{\text{false},\text{true}\}d:Ω→{false,true} with all of the following properties:
      • ddd is an AdmissibleDecision(E,C,τ,⋅)\text{AdmissibleDecision}(E,C,\tau,\cdot)AdmissibleDecision(E,C,τ,⋅).
      • ddd satisfies PrintedDecision(E,C,g,p,τ,d)\text{PrintedDecision}(E,C,g,p,\tau,d)PrintedDecision(E,C,g,p,τ,d).
      • bayesRisk(E,C,p,τ,d)=value(E,C,0,p)\text{bayesRisk}(E,C,p,\tau,d)=\text{value}(E,C,0,p)bayesRisk(E,C,p,τ,d)=value(E,C,0,p).
      • For every random time s:Ω→[0,∞)s:\Omega\to[0,\infty)s:Ω→[0,∞) that is Admissible(E,C,T,⋅)\text{Admissible}(E,C,T,\cdot)Admissible(E,C,T,⋅), and every decision e:Ω→{false,true}e:\Omega\to\{\text{false},\text{true}\}e:Ω→{false,true} that is AdmissibleDecision(E,C,s,⋅)\text{AdmissibleDecision}(E,C,s,\cdot)AdmissibleDecision(E,C,s,⋅):
bayesRisk(E,C,p,τ,d) ≤ bayesRisk(E,C,p,s,e).\text{bayesRisk}(E,C,p,\tau,d)\ \le\ \text{bayesRisk}(E,C,p,s,e).bayesRisk(E,C,p,τ,d) ≤ bayesRisk(E,C,p,s,e).
  1. Terminal mean. For all t∈[0,T]t\in[0,T]t∈[0,T] and i∈{0,1}i\in\{0,1\}i∈{0,1}:
terminalMean(E,C,gi(t),T−t)=gaussianTerminalMean(C,gi(t),T−t).\text{terminalMean}\big(E,C,g_i(t),T-t\big)=\text{gaussianTerminalMean}\big(C,g_i(t),T-t\big).terminalMean(E,C,gi​(t),T−t)=gaussianTerminalMean(C,gi​(t),T−t).
  1. Transition CDF. For all t∈[0,T]t\in[0,T]t∈[0,T], all i,j∈{0,1}i,j\in\{0,1\}i,j∈{0,1} and all u∈[0,T−t]u\in[0,T-t]u∈[0,T−t]:
transitionCDF(E,C,gi(t),u,gj(t+u))=gaussianTransitionCDF(μσ, gi(t), u, gj(t+u)).\text{transitionCDF}\big(E,C,g_i(t),u,g_j(t+u)\big)=\text{gaussianTransitionCDF}\Big(\tfrac{\mu}{\sigma},\,g_i(t),\,u,\,g_j(t+u)\Big).transitionCDF(E,C,gi​(t),u,gj​(t+u))=gaussianTransitionCDF(σμ​,gi​(t),u,gj​(t+u)).
  1. Symmetry. If a=ba=ba=b, then g1(t)=1−g0(t)g_1(t)=1-g_0(t)g1​(t)=1−g0​(t) for all t∈[0,T]t\in[0,T]t∈[0,T].

The declaration's attached comment says it reproduces "Theorem 21.2 as printed, (21.2.44)–(21.2.48)". The comment says it deliberately keeps "two equality-only decision branches and the signed Gaussian CDF coefficient", and states that the declaration "is expected to be false". That remark is the author's comment, not part of the assertion.

Degenerate cases. The hypotheses rule out a zero horizon and zero μ\muμ or σ\sigmaσ, so μ/σ\mu/\sigmaμ/σ is an ordinary real number and no division-by-zero default arises in item 7. The interval [0,T][0,T][0,T] is never empty. Ω\OmegaΩ cannot be empty, because it carries probability measures.

  • Endpoints of ppp. The boundary values p=0p=0p=0 and p=1p=1p=1 are included in item 5. At those values, item 5 still demands an admissible τ\tauτ, a decision ddd attaining the value, and minimality over all admissible pairs.
  • Endpoint t=Tt=Tt=T. At t=Tt=Tt=T, item 6 compares the two terminal-mean quantities with remaining time T−t=0T-t=0T−t=0. Item 7 then allows only u=0u=0u=0, comparing the two CDFs at time increment 000 with gi(T)g_i(T)gi​(T) and gj(T)g_j(T)gj​(T).
  • Increment u=0u=0u=0 in general. For any ttt, u=0u=0u=0 is allowed in item 7, which compares transitionCDF(E,C,gi(t),0,gj(t))\text{transitionCDF}(E,C,g_i(t),0,g_j(t))transitionCDF(E,C,gi​(t),0,gj​(t)) with the Gaussian formula at increment 000.
  • Outside [0,T][0,T][0,T]. ggg and hhh are constrained off [0,T][0,T][0,T] only through whatever BoundaryClass(C)\text{BoundaryClass}(C)BoundaryClass(C) requires.
  • Junk values inside imported definitions. Whether any imported definition hits a total-function default cannot be determined from this code. Examples would be an integral of a non-integrable function, a supremum of an empty or unbounded set, or an infimum defining an exit time that never occurs.
  • Joint satisfiability. The hypotheses do not obviously contradict each other. They require θ\thetaθ to separate P0P_0P0​ from P1P_1P1​ almost surely, while WWW satisfies the same Brownian predicate under both measures.
  • When a≠ba\neq ba=b. Item 8 holds vacuously.
Human review
  • Endorsed by Community (Bot) · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 29, 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