Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter II, Theorem 2 — the index rule p1r1x/(1−p1)≷p2r2y/(1−p2)p_1r_1x/(1-p_1)\gtrless p_2r_2y/(1-p_2)p1​r1​x/(1−p1​)≷p2​r2​y/(1−p2​) for two mines

Proved
BellmanDP.GoldMining.index_rule_two_mines

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

dynamic-programmingfunctional-equationsgold-miningindex-policyp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

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, and let fff be the solution of the gold-mining equation

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

that is, a solution bounded in every rectangle 0≤x≤Xˉ0 \le x \le \bar X0≤x≤Xˉ, 0≤y≤Yˉ0 \le y \le \bar Y0≤y≤Yˉ. Then at every point x,y≥0x, y \ge 0x,y≥0:

  1. if p1r1x1−p1>p2r2y1−p2\dfrac{p_1r_1x}{1-p_1} > \dfrac{p_2r_2y}{1-p_2}1−p1​p1​r1​x​>1−p2​p2​r2​y​, then f(x,y)f(x,y)f(x,y) equals the A-branch;
  2. if p1r1x1−p1<p2r2y1−p2\dfrac{p_1r_1x}{1-p_1} < \dfrac{p_2r_2y}{1-p_2}1−p1​p1​r1​x​<1−p2​p2​r2​y​, then f(x,y)f(x,y)f(x,y) equals the B-branch;
  3. if p1r1x1−p1=p2r2y1−p2\dfrac{p_1r_1x}{1-p_1} = \dfrac{p_2r_2y}{1-p_2}1−p1​p1​r1​x​=1−p2​p2​r2​y​, then f(x,y)f(x,y)f(x,y) equals both branches: either choice is optimal.

Bellman reads the rule as maximizing the ratio of immediate expected gain piri⋅(gold)p_ir_i\cdot(\text{gold})pi​ri​⋅(gold) to immediate expected loss 1−pi1-p_i1−pi​.

Formalization Note The book's class ("bounded in any rectangle") is a hypothesis on fff; Theorem 1 gives existence for ri<1r_i < 1ri​<1, and the same successive-approximation argument gives it for ri=1r_i = 1ri​=1, so the statement is not vacuous on the book's wider range 0≤ri≤10 \le r_i \le 10≤ri​≤1.

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

/-- Bellman, *Dynamic Programming*, Ch. II, Theorem 2, p. 69: for `0 ≤ p₁, p₂ < 1`,
`0 ≤ r₁, r₂ ≤ 1`, the solution `f` of (9) (the solution bounded in every rectangle) satisfies, at
every `x, y ≥ 0`: `f = A`-branch when `p₁ r₁ x/(1 − p₁) > p₂ r₂ y/(1 − p₂)`, `f = B`-branch when
the reverse strict inequality holds, and both branches equal `f` (either choice is optimal) on
equality. -/
theorem index_rule_two_mines (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)
    (f : ℝ → ℝ → ℝ) (hf : IsGoldMiningSolution p₁ p₂ r₁ r₂ f) (hfb : BoundedOnRectangles f)
    (x y : ℝ) (hx : 0 ≤ x) (hy : 0 ≤ y) :
    (p₂ * r₂ * y / (1 - p₂) < p₁ * r₁ * x / (1 - p₁) → f x y = goldA p₁ r₁ f x y) ∧
    (p₁ * r₁ * x / (1 - p₁) < p₂ * r₂ * y / (1 - p₂) → f x y = goldB p₂ r₂ f x y) ∧
    (p₁ * r₁ * x / (1 - p₁) = p₂ * r₂ * y / (1 - p₂) →
      f x y = goldA p₁ r₁ f x y ∧ f x y = goldB p₂ r₂ f x y) := by sorry

end BellmanDP.GoldMining
Source
Bellman, Dynamic Programming, Princeton University Press (1957; Princeton Landmarks ed. 2010), DOI 10.2307/j.ctv1nxcw0f, Chapter II, § 8, Theorem 2, p. 69
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