Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2, (5), p. 5 — dynamic programming equation V^M_{µ,i} = T^M_{µ(·,i)} V^M_{µ,i+1}, V^M_{µ,τ+1} = 0

Proved
PosteriorSamplingRL.Regret.lemma2_dynamic_programming

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

bellman-equationdynamic-programmingmarkov-decision-processp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let MθM_\thetaMθ​ be a finite MDP of the family, with reward distributions supported on [0,1][0,1][0,1], and let μ:S×{1,…,τ}→A\mu:\mathcal S\times\{1,\dots,\tau\}\to\mathcal Aμ:S×{1,…,τ}→A be a deterministic policy. The path-defined value functions satisfy

Vμ,iθ=Tμ(⋅,i)θVμ,i+1θ(i=1,…,τ),V^\theta_{\mu,i}=\mathcal T^\theta_{\mu(\cdot,i)}V^\theta_{\mu,i+1}\qquad(i=1,\dots,\tau),Vμ,iθ​=Tμ(⋅,i)θ​Vμ,i+1θ​(i=1,…,τ),

with Vμ,τ+1θ=0V^\theta_{\mu,\tau+1}=0Vμ,τ+1θ​=0, where TdθV(s)=R‾d(s)θ(s)+∑s′Pd(s)θ(s′∣s)V(s′)\mathcal T^\theta_d V(s)=\overline R^\theta_{d(s)}(s)+\sum_{s'}P^\theta_{d(s)}(s'\mid s)V(s')Tdθ​V(s)=Rd(s)θ​(s)+∑s′​Pd(s)θ​(s′∣s)V(s′) is the Bellman operator of the stationary rule d=μ(⋅,i)d=\mu(\cdot,i)d=μ(⋅,i).

The equation lets one compare value functions of two MDPs one step at a time; it is the tool behind the Bellman-error decomposition (6).

Formalization Note Steps are 0-based: the conclusion is stated for Lean steps j<τj<\tauj<τ, the paper's i=j+1i=j+1i=j+1, and Vμ,τ+1θ=0V^\theta_{\mu,\tau+1}=0Vμ,τ+1θ​=0 is value F θ π τ = 0. The value is defined by the expectation along the trajectory, not by this recursion, so the equation is not definitional.

Preamble
import Mathlib
import Definitions.Def_PosteriorSamplingRL_Regret_MDP

open MeasureTheory ProbabilityTheory
Formal statement
namespace PosteriorSamplingRL.Regret

/-- Lemma 2 (Dynamic programming equation), (5) (arXiv:1306.0940v5, p. 5). For every MDP `M_θ`
and policy `π : S × {1, …, τ} → A`, `V^θ_{π,i} = T^θ_{π(·,i)} V^θ_{π,i+1}` for `i = 1, …, τ`, with
`V^θ_{π,τ+1} = 0`. In 0-based steps: `value j = T_{π(·,j)} (value (j+1))` for `j < τ`, and
`value τ = 0`. -/
theorem lemma2_dynamic_programming (S A τ : ℕ) (Θ : Type) [MeasurableSpace Θ]
    (F : MDPFamily S A Θ) (θ : Θ) (π : Policy S A τ) :
    (∀ (j : ℕ) (hj : j < τ) (s : Fin S),
      value F θ π j s = bellman F θ (fun s' => π s' ⟨j, hj⟩) (value F θ π (j + 1)) s) ∧
    value F θ π τ = 0 := by sorry

end PosteriorSamplingRL.Regret
Source
arXiv:1306.0940v5, Lemma 2, (5), p. 5
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

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