Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3 — policy improvement: if every G(s, f) is empty, f^(∞) is β-optimal; an improving g gives g^(∞) > f^(∞)

Proved
BlackwellDiscreteDP.Stationary.theorem_3

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

dynamic-programmingmarkov-decision-processp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1policy-improvement

Fix 0≤β<10\le\beta<10≤β<1 and a decision rule fff. For each state sss let G(s,f)G(s,f)G(s,f) be the set of actions aaa with

i(s,a)+β p(s,a) Vβ(f(∞))>Vβ,s(f(∞)),i(s,a)+\beta\,p(s,a)\,V_\beta(f^{(\infty)})>V_{\beta,s}(f^{(\infty)}),i(s,a)+βp(s,a)Vβ​(f(∞))>Vβ,s​(f(∞)),

where p(s,a)p(s,a)p(s,a) is the row vector (q(s′∣s,a))s′(q(s'\mid s,a))_{s'}(q(s′∣s,a))s′​. Then:

  1. if G(s,f)G(s,f)G(s,f) is empty for every sss, then f(∞)f^{(\infty)}f(∞) is β\betaβ-optimal (against all policies);
  2. for every decision rule ggg such that (a) g(s)∈G(s,f)g(s)\in G(s,f)g(s)∈G(s,f) for some sss, and (b) g(s)=f(s)g(s)=f(s)g(s)=f(s) whenever g(s)∉G(s,f)g(s)\notin G(s,f)g(s)∈/G(s,f), we have Vβ(g(∞))>Vβ(f(∞))V_\beta(g^{(\infty)})>V_\beta(f^{(\infty)})Vβ​(g(∞))>Vβ​(f(∞)), that is, Vβ(g(∞))≥Vβ(f(∞))V_\beta(g^{(\infty)})\ge V_\beta(f^{(\infty)})Vβ​(g(∞))≥Vβ​(f(∞)) coordinatewise and the two vectors differ.

This is Howard's policy improvement routine for β<1\beta<1β<1: either the current stationary policy is optimal, or switching to improving actions in some states strictly improves it.

Preamble
import Mathlib
import Definitions.Def_BlackwellDiscreteDP_Stationary_Model
Formal statement
namespace BlackwellDiscreteDP.Stationary

/-- Theorem 3, pp. 720–721 (Blackwell, *Discrete Dynamic Programming*, Ann. Math. Statist. 33(2):719–726 (1962),
DOI 10.1214/aoms/1177704593), the policy improvement theorem for a fixed
`β ∈ [0, 1)`. With `G(s, f)` the set of actions `a` such that
`i(s, a) + βp(s, a)V(f^(∞)) > V_s(f^(∞))`:

1. if `G(s, f)` is empty for all `s`, then `f^(∞)` is optimal (§3 sense, against all policies);
2. for any `g` such that (a) `g(s) ∈ G(s, f)` for some `s` and (b) `g(s) = f(s)` whenever
   `g(s) ∉ G(s, f)`, we have `g^(∞) > f^(∞)`, where `>` is "≧ coordinatewise and ≠". -/
theorem theorem_3 {St Act : Type} [Fintype St] [DecidableEq St] [Nonempty St] [Fintype Act] [Nonempty Act]
    (M : Model St Act)
    (β : ℝ) (hβ0 : 0 ≤ β) (hβ1 : β < 1) (f : St → Act) :
    ((∀ s : St, M.G β f s = ∅) → M.IsBetaOptimal β (stationary f)) ∧
    (∀ g : St → Act, (∃ s : St, g s ∈ M.G β f s) →
        (∀ s : St, g s ∉ M.G β f s → g s = f s) →
        M.V β (stationary f) ≤ M.V β (stationary g) ∧
          M.V β (stationary g) ≠ M.V β (stationary f)) := by sorry

end BlackwellDiscreteDP.Stationary
Source
Blackwell, Discrete Dynamic Programming, Ann. Math. Statist. 33(2):719–726 (1962), DOI 10.1214/aoms/1177704593, pp. 720–721, Theorem 3
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