Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter I, Theorem 9 — stability: ∣f(x)−F(x)∣≤∑n≥0D(cnx)|f(x)-F(x)|\le\sum_{n\ge0}D(c^nx)∣f(x)−F(x)∣≤∑n≥0​D(cnx)

Proved
BellmanDP.Allocation.stability_estimate

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

dynamic-programmingfunctional-equationsp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1stability

Let u(x,y)u(x,y)u(x,y) and v(x,y)v(x,y)v(x,y) be continuous for x,y≥0x,y\ge 0x,y≥0, let 0<a<10<a<10<a<1, 0<b<10<b<10<b<1 and c=max⁡(a,b)c=\max(a,b)c=max(a,b). Put

m(z)=max⁡0≤x≤z max⁡0≤y≤xmax⁡(∣u(x,y)∣,∣v(x,y)∣),D(z)=max⁡0≤x≤z max⁡0≤y≤x∣u(x,y)−v(x,y)∣,m(z) = \max_{0\le x\le z}\,\max_{0\le y\le x}\max\big(|u(x,y)|,|v(x,y)|\big), \qquad D(z) = \max_{0\le x\le z}\,\max_{0\le y\le x}|u(x,y)-v(x,y)|,m(z)=0≤x≤zmax​0≤y≤xmax​max(∣u(x,y)∣,∣v(x,y)∣),D(z)=0≤x≤zmax​0≤y≤xmax​∣u(x,y)−v(x,y)∣,

and assume ∑n≥0m(cnz)<∞\sum_{n\ge 0} m(c^n z)<\infty∑n≥0​m(cnz)<∞ and ∑n≥0D(cnz)<∞\sum_{n\ge0} D(c^n z) < \infty∑n≥0​D(cnz)<∞ for all z≥0z\ge 0z≥0. Let fff and FFF be continuous on [0,∞)[0,\infty)[0,∞) with f(0)=F(0)=0f(0)=F(0)=0f(0)=F(0)=0 and solve

f(x)=max⁡0≤y≤x[u(x,y)+f(ay+b(x−y))],F(x)=max⁡0≤y≤x[v(x,y)+F(ay+b(x−y))]f(x) = \max_{0\le y\le x}\big[u(x,y) + f(ay+b(x-y))\big], \qquad F(x) = \max_{0\le y\le x}\big[v(x,y) + F(ay+b(x-y))\big]f(x)=0≤y≤xmax​[u(x,y)+f(ay+b(x−y))],F(x)=0≤y≤xmax​[v(x,y)+F(ay+b(x−y))]

for x≥0x \ge 0x≥0. Then for every x≥0x\ge 0x≥0,

∣f(x)−F(x)∣≤∑n=0∞D(cnx).|f(x)-F(x)| \le \sum_{n=0}^{\infty} D(c^n x).∣f(x)−F(x)∣≤n=0∑∞​D(cnx).

The estimate justifies replacing a return function by a simpler approximation (a monomial or a quadratic) and bounds the resulting error in the value.

Preamble
import Mathlib
import Definitions.Def_BellmanDP_Allocation_GeneralEquation
Formal statement
namespace BellmanDP.Allocation

/-- Ch. I, Theorem 9, p. 29. Let `u, v` be continuous on `x, y ≥ 0`, `0 < a, b < 1`,
`c = Max(a, b)`, `m(z) = Max_{0 ≤ x ≤ z} Max_{0 ≤ y ≤ x} Max(|u(x, y)|, |v(x, y)|)` with
`Σ m(cⁿ z) < ∞`, and `D(z) = Max_{0 ≤ x ≤ z} Max_{0 ≤ y ≤ x} |u(x, y) − v(x, y)|` with
`Σ D(cⁿ z) < ∞`, for all `z ≥ 0`. If `f` and `F` are continuous solutions on `x ≥ 0`, vanishing at
`0`, of `f(x) = Max_{0 ≤ y ≤ x} [u(x, y) + f(ay + b(x − y))]` and of the same equation with `v`,
then `|f(x) − F(x)| ≤ Σ_{n=0}^∞ D(cⁿ x)` for all `x ≥ 0`. -/
theorem stability_estimate (u v : ℝ → ℝ → ℝ) (a b : ℝ)
    (ha0 : 0 < a) (ha1 : a < 1) (hb0 : 0 < b) (hb1 : b < 1)
    (hu : ContinuousOn (fun p : ℝ × ℝ => u p.1 p.2) (Set.Ici (0 : ℝ) ×ˢ Set.Ici (0 : ℝ)))
    (hv : ContinuousOn (fun p : ℝ × ℝ => v p.1 p.2) (Set.Ici (0 : ℝ) ×ˢ Set.Ici (0 : ℝ)))
    (hm : ∀ z : ℝ, 0 ≤ z → Summable (fun n : ℕ =>
      triangleMax (fun s t => max |u s t| |v s t|) (max a b ^ n * z)))
    (hD : ∀ z : ℝ, 0 ≤ z → Summable (fun n : ℕ =>
      triangleMax (fun s t => |u s t - v s t|) (max a b ^ n * z)))
    (f F : ℝ → ℝ)
    (hfc : ContinuousOn f (Set.Ici 0)) (hf0 : f 0 = 0) (hf : IsGeneralSolution u a b f)
    (hFc : ContinuousOn F (Set.Ici 0)) (hF0 : F 0 = 0) (hF : IsGeneralSolution v a b F) :
    ∀ x : ℝ, 0 ≤ x →
      |f x - F x| ≤ ∑' n : ℕ, triangleMax (fun s t => |u s t - v s t|) (max a b ^ n * x) := by sorry

end BellmanDP.Allocation
Source
Bellman, Dynamic Programming, Princeton University Press (1957; Princeton Landmarks ed. 2010), DOI 10.2307/j.ctv1nxcw0f, Chapter I, § 18, Eq. (18.1) and Theorem 9, p. 29
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