Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (13.2.21)–(13.2.22) — The integral candidate solves the free-boundary system

Proved
PeskirShiryaev.Maximality.boundary_ode_equivalence

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

diffusionfree-boundarymaximality-principleoptimal-stoppingp2o-gran-per-chapterp2o-plan-bookp2o-v1

Let ρ,σ,c\rho,\sigma,cρ,σ,c be continuous real coefficients, with σ,c>0\sigma,c>0σ,c>0, and let g:R→Rg:\mathbb R\to\mathbb Rg:R→R be continuously differentiable with g(s)<sg(s)<sg(s)<s. Define Vg(x,s)=s+∫g(s)x[L(x)−L(y)]c(y)m(dy)V_g(x,s)=s+\int_{g(s)}^x[L(x)-L(y)]c(y)m(dy)Vg​(x,s)=s+∫g(s)x​[L(x)−L(y)]c(y)m(dy). Then VgV_gVg​ solves the generator equation ρ(x)(Vg)x+12σ(x)2(Vg)xx=c(x)\rho(x)(V_g)_x+\tfrac12\sigma(x)^2(V_g)_{xx}=c(x)ρ(x)(Vg​)x​+21​σ(x)2(Vg​)xx​=c(x) for g(s)<x<sg(s)<x<sg(s)<x<s, normal reflection at x=sx=sx=s, instantaneous stopping at x=g(s)x=g(s)x=g(s), and smooth fit at x=g(s)x=g(s)x=g(s), if and only if

g′(s)=σ(g(s))2L′(g(s))2c(g(s))[L(s)−L(g(s))]for every s∈R.g'(s)=\frac{\sigma(g(s))^2L'(g(s))}{2c(g(s))[L(s)-L(g(s))]}\quad\text{for every }s\in\mathbb R.g′(s)=2c(g(s))[L(s)−L(g(s))]σ(g(s))2L′(g(s))​for every s∈R.

This identifies the ODE constraint on an analytic free boundary, independently of stochastic optimality.

Formalization Note Boundary derivatives are inward derivatives; the formula for VgV_gVg​ has an analytic extension beyond the continuation region. The stochastic process is unnecessary for this deterministic equivalence.

Preamble
import Definitions.Def_PeskirShiryaev_Maximality_Boundary
Formal statement
/- Imported declaration context (verbatim, for a self-contained blind code audit):

structure Coefficients where
  drift : ℝ → ℝ
  volatility : ℝ → ℝ
  cost : ℝ → ℝ
  drift_continuous : Continuous drift
  volatility_continuous : Continuous volatility
  volatility_pos : ∀ x, 0 < volatility x
  cost_continuous : Continuous cost
  cost_pos : ∀ x, 0 < cost x

noncomputable def itoSum {Ω : Type*} (σ : ℝ → ℝ)
    (X B : ℝ≥0 → Ω → ℝ) (t : ℝ≥0) (n : ℕ) (ω : Ω) : ℝ :=
  ∑ k ∈ Finset.range (2 ^ n),
    σ (X (t * (k : ℝ≥0) / (2 ^ n : ℝ≥0)) ω) *
      (B (t * ((k + 1 : ℕ) : ℝ≥0) / (2 ^ n : ℝ≥0)) ω -
       B (t * (k : ℝ≥0) / (2 ^ n : ℝ≥0)) ω)

/-- A nonexplosive weak solution on R. The stochastic integral is specified by
its defining left dyadic sums in probability, not by an unconstrained integral oracle. -/
structure Diffusion {Ω : Type*} [MeasurableSpace Ω] (p : Coefficients)
    (P : Measure Ω) (X : ℝ≥0 → Ω → ℝ) (x : ℝ) : Prop where
  probability : IsProbabilityMeasure P
  measurable : ∀ t, Measurable (X t)
  continuous : ∀ ω, Continuous (fun t => X t ω)
  initial : ∀ᵐ ω ∂P, X 0 ω = x
  weak_solution : ∃ (ℱ : Filtration ℝ≥0 ‹MeasurableSpace Ω›) (B : ℝ≥0 → Ω → ℝ),
    Adapted ℱ X ∧ Adapted ℱ B ∧ IsBrownianReal B P ∧
    (∀ s t : ℝ≥0, s ≤ t →
      Indep (MeasurableSpace.comap (fun ω => B t ω - B s ω) inferInstance) (ℱ s) P) ∧
    ∀ t : ℝ≥0, TendstoInMeasure P (itoSum p.volatility X B t) atTop
      (fun ω => X t ω - x -
        ∫ r in (0 : ℝ)..(t : ℝ), p.drift (X r.toNNReal ω))

/-- Right-continuous natural past, augmented by ambient measurable null sets. -/
noncomputable def naturalPast {Ω : Type*} [MeasurableSpace Ω]
    (P : Measure Ω) (X : ℝ≥0 → Ω → ℝ) (t : ℝ≥0) : MeasurableSpace Ω :=
  ⨅ u : ℝ≥0, ⨅ (_ : t < u),
    ((⨆ r : ℝ≥0, ⨆ (_ : r ≤ u), MeasurableSpace.comap (X r) inferInstance) ⊔
      MeasurableSpace.generateFrom {N : Set Ω | MeasurableSet N ∧ P N = 0})

/-- The book's Markov times; a stopping time must additionally be finite a.s. -/
def IsMarkovTime {Ω : Type*} [MeasurableSpace Ω]
    (P : Measure Ω) (X : ℝ≥0 → Ω → ℝ) (τ : Ω → ℝ≥0∞) : Prop :=
  Measurable τ ∧ ∀ t : ℝ≥0, MeasurableSet[naturalPast P X t] {ω | τ ω ≤ (t : ℝ≥0∞)}



noncomputable def scaleDensity (p : Coefficients) (y : ℝ) : ℝ :=
  Real.exp (- ∫ z in (0 : ℝ)..y, 2 * p.drift z / p.volatility z ^ 2)

noncomputable def scale (p : Coefficients) (x : ℝ) : ℝ :=
  ∫ y in (0 : ℝ)..x, scaleDensity p y

noncomputable def speedDensity (p : Coefficients) (x : ℝ) : ℝ :=
  2 / (scaleDensity p x * p.volatility x ^ 2)

noncomputable def speed (p : Coefficients) : Measure ℝ :=
  volume.withDensity (fun y => ENNReal.ofReal (speedDensity p y))

noncomputable def green (p : Coefficients) (a b x y : ℝ) : ℝ :=
  if y ≤ x then (scale p b - scale p x) * (scale p y - scale p a) /
      (scale p b - scale p a)
  else (scale p b - scale p y) * (scale p x - scale p a) /
      (scale p b - scale p a)

noncomputable def odeRhs (p : Coefficients) (s y : ℝ) : ℝ :=
  p.volatility y ^ 2 * scaleDensity p y /
    (2 * p.cost y * (scale p s - scale p y))

/-- Global C1 solutions strictly below the diagonal; no optimality is assumed. -/
def AdmissibleBoundary (p : Coefficients) (g : ℝ → ℝ) : Prop :=
  ContDiff ℝ 1 g ∧ ∀ s, g s < s ∧ HasDerivAt g (odeRhs p s (g s)) s

def MaximalBoundary (p : Coefficients) (g : ℝ → ℝ) : Prop :=
  AdmissibleBoundary p g ∧ ∀ h, AdmissibleBoundary p h → ∀ s, h s ≤ g s

/-- The analytic expression, extended to either side of its lower integration limit. -/
noncomputable def integralCandidate (p : Coefficients) (g : ℝ → ℝ) (x s : ℝ) : ℝ :=
  s + ∫ y in g s..x, (scale p x - scale p y) * p.cost y * speedDensity p y

noncomputable def candidate (p : Coefficients) (g : ℝ → ℝ) (x s : ℝ) : ℝ :=
  if x ≤ g s then s else integralCandidate p g x s

/-- Equations (13.2.9)--(13.2.12), with inward derivatives at the two boundaries. -/
def FreeBoundarySystem (p : Coefficients) (g : ℝ → ℝ) : Prop :=
  (∀ s x, g s < x → x < s →
    p.drift x * deriv (fun z => integralCandidate p g z s) x +
    p.volatility x ^ 2 / 2 * deriv (deriv (fun z => integralCandidate p g z s)) x =
      p.cost x) ∧
  (∀ s, HasDerivWithinAt (fun u => integralCandidate p g s u) 0 (Set.Ici s) s) ∧
  (∀ s, integralCandidate p g (g s) s = s) ∧
  (∀ s, HasDerivWithinAt (fun x => integralCandidate p g x s) 0 (Set.Ici (g s)) (g s))

/-- A solution up to its first diagonal contact, extended by the diagonal afterwards. -/
def DiagonalBoundary (p : Coefficients) (g : ℝ → ℝ) (d : ℝ) : Prop :=
  Continuous g ∧
  (∀ s, s < d → g s < s ∧ HasDerivAt g (odeRhs p s (g s)) s) ∧
  ∀ s, d ≤ s → g s = s


-/

namespace PeskirShiryaev.Maximality

theorem boundary_ode_equivalence (p : Coefficients) (g : ℝ → ℝ)
    (hg : ContDiff ℝ 1 g) (hbelow : ∀ s, g s < s) :
    FreeBoundarySystem p g ↔ AdmissibleBoundary p g := by sorry

end PeskirShiryaev.Maximality
Source
Peskir and Shiryaev, Optimal Stopping and Free-Boundary Problems, Birkhäuser Verlag, 2006, DOI 10.1007/978-3-7643-7390-0, pp. 204–205 (PDF 223–224), Eqs. (13.2.9)–(13.2.12), paragraph following (13.2.21) and Eq. (13.2.22)
Read-back

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

Data. Let ppp be a coefficient triple: continuous μ,σ,c\mu, \sigma, cμ,σ,c on R\mathbb{R}R with σ>0\sigma > 0σ>0 and c>0c > 0c>0 everywhere. Define

φ(y)=exp⁡(−∫0y2μ(z)σ(z)2 dz),S(x)=∫0xφ,m(x)=2φ(x) σ(x)2,\varphi(y) = \exp\Big(-\int_0^y \tfrac{2\mu(z)}{\sigma(z)^2}\,dz\Big), \qquad S(x) = \int_0^x \varphi, \qquad m(x) = \frac{2}{\varphi(x)\,\sigma(x)^2},φ(y)=exp(−∫0y​σ(z)22μ(z)​dz),S(x)=∫0x​φ,m(x)=φ(x)σ(x)22​,

with oriented integrals. Let g:R→Rg : \mathbb{R} \to \mathbb{R}g:R→R be continuously differentiable on R\mathbb{R}R, with g(s)<sg(s) < sg(s)<s for every sss. These two properties are the hypotheses. Set

V(x,s)=s+∫g(s)x(S(x)−S(y)) c(y) m(y) dy(x,s∈R).V(x,s) = s + \int_{g(s)}^{x} \big(S(x) - S(y)\big)\,c(y)\,m(y)\,dy \qquad (x, s \in \mathbb{R}).V(x,s)=s+∫g(s)x​(S(x)−S(y))c(y)m(y)dy(x,s∈R).

Claim. The following two conditions are equivalent; the statement claims both directions.

(A) The four free-boundary conditions hold:

  1. For all sss and all xxx with g(s)<x<sg(s) < x < sg(s)<x<s:
μ(x) ∂xV(x,s)+12σ(x)2 ∂x(∂xV)(x,s)=c(x).\mu(x)\,\partial_x V(x,s) + \tfrac12\sigma(x)^2\,\partial_x(\partial_x V)(x,s) = c(x).μ(x)∂x​V(x,s)+21​σ(x)2∂x​(∂x​V)(x,s)=c(x).

Derivatives are the library's derivative, which equals 000 wherever the function fails to be differentiable. This applies both to VVV and to its first-derivative function. 2. For every sss, the map u↦V(s,u)u \mapsto V(s,u)u↦V(s,u) has right derivative 000 at u=su = su=s. In this map the first argument is held at the number sss and the second varies over [s,∞)[s,\infty)[s,∞). 3. For every sss, V(g(s),s)=sV(g(s), s) = sV(g(s),s)=s. This holds automatically, since the integral is over a degenerate interval. 4. For every sss, the map x↦V(x,s)x \mapsto V(x,s)x↦V(x,s) has right derivative 000 at x=g(s)x = g(s)x=g(s), relative to [g(s),∞)[g(s),\infty)[g(s),∞).

(B) ggg is an admissible boundary. That is, ggg is C1C^1C1, and for every sss, g(s)<sg(s) < sg(s)<s and ggg is differentiable at sss with

g′(s)=σ(g(s))2 φ(g(s))2 c(g(s)) (S(s)−S(g(s))).g'(s) = \frac{\sigma(g(s))^2\,\varphi(g(s))}{2\,c(g(s))\,\big(S(s) - S(g(s))\big)}.g′(s)=2c(g(s))(S(s)−S(g(s)))σ(g(s))2φ(g(s))​.

Degenerate cases.

  • The ODE denominator. Because g(s)<sg(s) < sg(s)<s is assumed and SSS is strictly increasing, the denominator in (B) is strictly positive. The division-by-zero convention never applies there.
  • Condition 1 is never vacuous. The interval (g(s),s)(g(s), s)(g(s),s) is nonempty for every sss.
  • What (B) actually adds. Given the hypotheses, the C1C^1C1 and g(s)<sg(s) < sg(s)<s parts of (B) are already assumed. So (B) contributes only the pointwise ODE.
  • Derivative conventions in (A). At points where V(⋅,s)V(\cdot,s)V(⋅,s) or its derivative is not differentiable, condition 1 is evaluated with the value 000 substituted for the missing derivative.
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