Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter IX, § 12, Lemma (corrected) — the Euler scheme is within k/nk/nk/n of the solution

Proved
BellmanDP.Variational.euler_error_lemma

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

calculus-of-variationsnumerical-analysisordinary-differential-equationsp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

Let G(x,φ)G(x,\varphi)G(x,φ) be Lipschitz (jointly, with constant KKK) on the strip m≤x≤Mm\le x\le Mm≤x≤M, 0≤φ≤10\le\varphi\le 10≤φ≤1, and let T≥0T\ge 0T≥0. Then there is a constant κ\kappaκ, depending only on GGG, TTT, mmm, MMM and KKK, with the following property.

Let n≥1n\ge 1n≥1, N=⌊Tn⌋N=\lfloor Tn\rfloorN=⌊Tn⌋, and let φ0,…,φN∈[0,1]\varphi_0,\dots,\varphi_N\in[0,1]φ0​,…,φN​∈[0,1]. Let φ(t)\varphi(t)φ(t) be the step function equal to φk\varphi_kφk​ on k/n≤t<(k+1)/nk/n\le t<(k+1)/nk/n≤t<(k+1)/n, let x0=cx_0=cx0​=c, xk+1=xk+G(xk,φk)/nx_{k+1}=x_k+G(x_k,\varphi_k)/nxk+1​=xk​+G(xk​,φk​)/n, and let xˉ(t)=xk\bar x(t)=x_kxˉ(t)=xk​ on k/n≤t<(k+1)/nk/n\le t<(k+1)/nk/n≤t<(k+1)/n. If m≤xk≤Mm\le x_k\le Mm≤xk​≤M for k=0,…,Nk=0,\dots,Nk=0,…,N, and x(t)x(t)x(t) is a solution on [0,T][0,T][0,T] of

dxdt=G(x,φ(t)),x(0)=c,\frac{dx}{dt}=G(x,\varphi(t)),\qquad x(0)=c,dtdx​=G(x,φ(t)),x(0)=c,

with m≤x(t)≤Mm\le x(t)\le Mm≤x(t)≤M, then

∣x(t)−xˉ(t)∣≤κn,0≤t≤T.|x(t)-\bar x(t)|\le\frac{\kappa}{n},\qquad 0\le t\le T.∣x(t)−xˉ(t)∣≤nκ​,0≤t≤T.

This is the error estimate of Euler's method with a piecewise constant control, and the step that connects the discrete and the continuous problem in the proof of Theorem 2.

Formalization Note Two corrections of the print. The print's range "0≤t≤N0\le t\le N0≤t≤N" is read as the horizon 0≤t≤T0\le t\le T0≤t≤T (N=⌊Tn⌋N=\lfloor Tn\rfloorN=⌊Tn⌋ steps of length 1/n1/n1/n). The bounds m≤x≤Mm\le x\le Mm≤x≤M are imposed on the solution x(t)x(t)x(t) as well as on the sequence xkx_kxk​: the print bounds only the sequence, but a Lipschitz condition on the strip says nothing about GGG outside it, and the proof of Theorem 2 ("Let m≤x(t)≤Mm\le x(t)\le Mm≤x(t)≤M, and thus m≤xk≤Mm\le x_k\le Mm≤xk​≤M") supplies both. The constant may depend on mmm, MMM and the Lipschitz constant, which the Cauchy–Lipschitz argument uses. The solution is in integral form with a continuous xxx.

Preamble
import Mathlib
import Definitions.Def_BellmanDP_Variational_Approximation
Formal statement
namespace BellmanDP.Variational

open Set

/-- Bellman, *Dynamic Programming*, Ch. IX, § 12, Lemma, p. 261 (corrected: the print's range
`0 ≤ t ≤ N` is the horizon `0 ≤ t ≤ T`, `N = ⌊T n⌋`; the bounds `m ≤ x ≤ M` are imposed on the
solution `x (t)` as well as on the sequence `x_k`, as in the proof of Theorem 2).
Let `G (x, φ)` be Lipschitz for `m ≤ x ≤ M`, `0 ≤ φ ≤ 1`. There is a constant `κ` depending only
on `G`, `T` (and `m`, `M`) such that for every `n ≥ 1`, every step control with values
`0 ≤ φ_k ≤ 1` on `k/n ≤ t < (k+1)/n`, `k = 0, …, N`, whose Euler states `x_k` (12.6) satisfy
`m ≤ x_k ≤ M`, and every solution `x (t)` of `dx/dt = G (x, φ(t))`, `x (0) = x_0`, staying in
`[m, M]`, we have `|x (t) − x̄ (t)| ≤ κ / n` for `0 ≤ t ≤ T`, where `x̄ (t) = x_k` on
`k/n ≤ t < (k+1)/n`. -/
theorem euler_error_lemma (G : ℝ → ℝ → ℝ) (m M T : ℝ) (K : NNReal) (hT : 0 ≤ T)
    (hG : LipschitzOnWith K (fun z : ℝ × ℝ => G z.1 z.2) (Icc m M ×ˢ Icc (0 : ℝ) 1)) :
    ∃ κ : ℝ, ∀ n : ℕ, 0 < n → ∀ (c : ℝ) (φs : ℕ → ℝ) (x : ℝ → ℝ),
      (∀ k ≤ horizonSteps T n, φs k ∈ Icc (0 : ℝ) 1) →
      (∀ k ≤ horizonSteps T n, eulerTraj G c n φs k ∈ Icc m M) →
      IsTrajectory G c (stepControl n φs) T x →
      (∀ t ∈ Icc 0 T, x t ∈ Icc m M) →
      ∀ t ∈ Icc 0 T, |x t - eulerTraj G c n φs ⌊t * n⌋₊| ≤ κ / n := by sorry

end BellmanDP.Variational
Source
Bellman, Dynamic Programming, Princeton University Press (1957; Princeton Landmarks ed. 2010), DOI 10.2307/j.ctv1nxcw0f, Chapter IX, § 12, Lemma, p. 261
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