Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter II, Theorem 7 — stability: ∣f−g∣≤max⁡R∣h∣/q|f-g|\le \max_R|h|/q∣f−g∣≤maxR​∣h∣/q with q=min⁡(1−p1,1−p2)q=\min(1-p_1,1-p_2)q=min(1−p1​,1−p2​)

Proved
BellmanDP.GoldMining.stability

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

dynamic-programmingfunctional-equationsgold-miningp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1stability

Let 0≤p1,p2<10 \le p_1, p_2 < 10≤p1​,p2​<1 and 0≤r1,r2≤10 \le r_1, r_2 \le 10≤r1​,r2​≤1. Let fff be the solution of (5.1), and let ggg be the solution of the perturbed equation

g(x,y)=max⁡[A:p1(r1x+g((1−r1)x,y)),  B:p2(r2y+g(x,(1−r2)y))]+h(x,y),x,y≥0,g(x,y) = \max\Bigl[A: p_1\bigl(r_1x + g((1-r_1)x,y)\bigr),\; B: p_2\bigl(r_2y + g(x,(1-r_2)y)\bigr)\Bigr] + h(x,y), \qquad x, y \ge 0,g(x,y)=max[A:p1​(r1​x+g((1−r1​)x,y)),B:p2​(r2​y+g(x,(1−r2​)y))]+h(x,y),x,y≥0,

where hhh is bounded in every rectangle, both solutions being taken in the class of functions bounded in every rectangle. Then in any rectangle R:0≤x≤Xˉ, 0≤y≤YˉR: 0 \le x \le \bar X,\ 0 \le y \le \bar YR:0≤x≤Xˉ, 0≤y≤Yˉ,

∣f(x,y)−g(x,y)∣≤max⁡R∣h(x,y)∣q,q=min⁡(1−p1, 1−p2).|f(x,y) - g(x,y)| \le \frac{\max_R |h(x,y)|}{q}, \qquad q = \min\bigl(1-p_1,\,1-p_2\bigr).∣f(x,y)−g(x,y)∣≤qmaxR​∣h(x,y)∣​,q=min(1−p1​,1−p2​).

The solution therefore depends continuously on a perturbation of the equation, uniformly on rectangles.

Formalization Note The book places no condition on hhh; the hypothesis that hhh is bounded in every rectangle is added because it is what makes the perturbed equation have a solution in the class (the book's footnote 7: "the solution" is the unique solution in the appropriate function class). max⁡R∣h∣\max_R|h|maxR​∣h∣ is written through an arbitrary bound MMM of ∣h∣|h|∣h∣ on RRR, which is equivalent and avoids taking a supremum. The parameter ranges are those of § 8 and Theorem 2.

Preamble
import Mathlib
import Definitions.Def_BellmanDP_GoldMining_Model
Formal statement
namespace BellmanDP.GoldMining

/-- Bellman, *Dynamic Programming*, Ch. II, Theorem 7, p. 76: for `0 ≤ p₁, p₂ < 1`,
`0 ≤ r₁, r₂ ≤ 1`, let `f` be the solution of (5.1) and `g` the solution of the perturbed
equation (2), both in the class of functions bounded in every rectangle, with `h` bounded in every
rectangle (the hypothesis under which (2) has a solution in that class). Then in any rectangle
`R: 0 ≤ x ≤ X̄, 0 ≤ y ≤ Ȳ`, `|f(x, y) − g(x, y)| ≤ Max_R |h(x, y)| / q` with
`q = Min((1 − p₁), (1 − p₂))`; the maximum of `|h|` over `R` is written as an arbitrary bound `M`
of `|h|` on `R`. -/
theorem stability (p₁ p₂ r₁ r₂ : ℝ)
    (hp₁0 : 0 ≤ p₁) (hp₁1 : p₁ < 1) (hp₂0 : 0 ≤ p₂) (hp₂1 : p₂ < 1)
    (hr₁0 : 0 ≤ r₁) (hr₁1 : r₁ ≤ 1) (hr₂0 : 0 ≤ r₂) (hr₂1 : r₂ ≤ 1)
    (h : ℝ → ℝ → ℝ) (hh : BoundedOnRectangles h)
    (f : ℝ → ℝ → ℝ) (hf : IsGoldMiningSolution p₁ p₂ r₁ r₂ f) (hfb : BoundedOnRectangles f)
    (g : ℝ → ℝ → ℝ) (hg : IsPerturbedSolution p₁ p₂ r₁ r₂ h g) (hgb : BoundedOnRectangles g)
    (X Y M : ℝ) (hM : ∀ x y : ℝ, 0 ≤ x → x ≤ X → 0 ≤ y → y ≤ Y → |h x y| ≤ M) :
    ∀ x y : ℝ, 0 ≤ x → x ≤ X → 0 ≤ y → y ≤ Y →
      |f x y - g x y| ≤ M / min (1 - p₁) (1 - p₂) := by sorry

end BellmanDP.GoldMining
Source
Bellman, Dynamic Programming, Princeton University Press (1957; Princeton Landmarks ed. 2010), DOI 10.2307/j.ctv1nxcw0f, Chapter II, § 14, Theorem 7, p. 76
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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