Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 947 — the policy-iteration algorithm of Fig. 1 produces an optimal stationary policy as good as any nonstationary policy

Proved
JewellMRP.Discounted.policyIteration_optimal_stationary

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamic-programmingmarkov-renewal-processoptimal-policyp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1policy-iterationstationary-policy

Let a Markov-renewal program with finitely many states SSS (NNN of them) and a nonempty finite set of alternatives (ZZZ of them) be given, and let α>0\alpha > 0α>0. Then:

  1. for every stationary policy ddd, the value-determination equations (15) of ddd have exactly one solution;
  2. for every run (dk,vk)k≥0(d_k, v_k)_{k\ge 0}(dk​,vk​)k≥0​ of the algorithm of Fig. 1, there is a cycle K<ZNK < Z^NK<ZN with dK+1=dKd_{K+1} = d_KdK+1​=dK​, and for that KKK:
    • the nnn-step return of the stationary policy dKd_KdK​ converges to vKv_KvK​ as n→∞n \to \inftyn→∞, for every choice of boundary rewards;
    • for every nonstationary policy π\piπ, every choice of boundary rewards V0V^0V0 and every state iii, the nnn-step return Viπ(n)V^\pi_i(n)Viπ​(n) converges to a limit xxx with x≤(vK)ix \le (v_K)_ix≤(vK​)i​;
    • the optimal nnn-step returns of (6) converge to vKv_KvK​, for every choice of boundary rewards:
lim⁡n→∞Vi(n,α)=(vK)ifor every i.\lim_{n\to\infty} V_i(n,\alpha) = (v_K)_i \qquad\text{for every } i .n→∞lim​Vi​(n,α)=(vK​)i​for every i.

The paper states: "Thus the algorithm of Fig. 1 produces an optimal, stationary policy that is as good as any optimal, nonstationary policy", resting on Claims (a)–(d) of p. 946 and the existence of an optimal stationary policy. Together these say that policy iteration solves the infinite-step discounted Markov-renewal program exactly, in finitely many cycles.

Formalization Note "Terminates in a finite number of cycles" is made explicit by the bound K<ZNK < Z^NK<ZN (the paper's count of stationary policies). "Optimal" is read as: the returned policy's return vKv_KvK​ dominates the limiting return of every policy of the paper's class (deterministic, Markov, possibly nonstationary) from every state, and equals the "maximum expected, discounted returns" lim⁡nVi(n,α)\lim_n V_i(n,\alpha)limn​Vi​(n,α) of (14). All limits are asserted to exist. The one-transition returns ρijz(α)\rho^z_{ij}(\alpha)ρijz​(α) are arbitrary real data, a generalization of the paper's (4). The returns of policies are defined by the one-step recursion of (6).

Preamble
import Mathlib
import Definitions.Def_JewellMRP_Discounted_MRP
import Definitions.Def_JewellMRP_Discounted_PolicyIteration

open Filter Topology
Formal statement
namespace JewellMRP.Discounted

/-- p. 947 with Claims (a)–(d) of p. 946: for `α > 0`, the value-determination equations (15)
of every stationary policy are uniquely solvable, and every run of the algorithm of Fig. 1
reaches two identical successive policies `d K = d (K + 1)` within at most `Z^N` cycles; the
stationary policy `d K` then has limiting return `v K`, which is at least the limiting return
of every nonstationary policy and equals the limit of the optimal `n`-step returns of (6). -/
theorem policyIteration_optimal_stationary {S A : Type*} [Fintype S] [DecidableEq S]
    [Fintype A] [Nonempty A] (M : MRP S A) {α : ℝ} (hα : 0 < α) :
    (∀ d : S → A, ∃! v : S → ℝ, SolvesEval M α d v) ∧
    ∀ (d : ℕ → S → A) (v : ℕ → S → ℝ), IsFig1Run M α d v →
      ∃ K, K < Fintype.card (S → A) ∧ d (K + 1) = d K ∧
        (∀ V0 : S → ℝ,
          Tendsto (fun n => policyReturn M α (fun _ => d K) V0 n) atTop (𝓝 (v K))) ∧
        (∀ (π : ℕ → S → A) (V0 : S → ℝ) (i : S), ∃ x : ℝ,
          Tendsto (fun n => policyReturn M α π V0 n i) atTop (𝓝 x) ∧ x ≤ v K i) ∧
        (∀ V0 : S → ℝ, Tendsto (optValue M α V0) atTop (𝓝 (v K))) := by sorry

end JewellMRP.Discounted
Source
Jewell, Markov-Renewal Programming. I: Formulation, Finite Return Models, Operations Research 11(6), 1963, p. 947, The Optimal Policy with Discounting and Fig. 1, with Claims (a)-(d) on p. 946
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Throughout, the names MRP\mathrm{MRP}MRP, SolvesEval\mathrm{SolvesEval}SolvesEval, IsFig1Run\mathrm{IsFig1Run}IsFig1Run, policyReturn\mathrm{policyReturn}policyReturn and optValue\mathrm{optValue}optValue come from two imported definition files. Those files are not part of the code supplied here. The statement uses them only as opaque predicates and functions, so what each one means rests entirely on those definitions. They are described below only by how they are applied.

Setting. Let SSS (the "states") and AAA (the "actions") be types. SSS is finite and has decidable equality. AAA is finite and nonempty. Let MMM be an object of type MRP(S,A)\mathrm{MRP}(S,A)MRP(S,A), and let α\alphaα be a real number with α>0\alpha > 0α>0. No upper bound is placed on α\alphaα. A decision rule is a function d:S→Ad : S \to Ad:S→A. There are exactly ∣A∣∣S∣|A|^{|S|}∣A∣∣S∣ decision rules. A policy is a sequence π=(π0,π1,… )\pi = (\pi_0, \pi_1, \dots)π=(π0​,π1​,…) of decision rules, indexed by N\mathbb{N}N. A terminal vector is any V0:S→RV_0 : S \to \mathbb{R}V0​:S→R. For a policy π\piπ, a terminal vector V0V_0V0​, a horizon n∈Nn \in \mathbb{N}n∈N and a state iii, write RM,α n(π,V0)(i)R^{\,n}_{M,\alpha}(\pi, V_0)(i)RM,αn​(π,V0​)(i) for the real number policyReturn(M,α,π,V0,n)(i)\mathrm{policyReturn}(M,\alpha,\pi,V_0,n)(i)policyReturn(M,α,π,V0​,n)(i). For each nnn, write VM,α∗,n(V0):S→RV^{*,n}_{M,\alpha}(V_0) : S \to \mathbb{R}VM,α∗,n​(V0​):S→R for optValue(M,α,V0)(n)\mathrm{optValue}(M,\alpha,V_0)(n)optValue(M,α,V0​)(n).

The theorem asserts the conjunction of two claims.

  1. Unique evaluation. For every decision rule d:S→Ad : S \to Ad:S→A there is exactly one v:S→Rv : S \to \mathbb{R}v:S→R such that SolvesEval(M,α,d,v)\mathrm{SolvesEval}(M,\alpha,d,v)SolvesEval(M,α,d,v) holds.

  2. Behaviour of every run. Take any sequence of decision rules d0,d1,d2,…d_0, d_1, d_2, \dotsd0​,d1​,d2​,… and any sequence of vectors v0,v1,v2,⋯:S→Rv_0, v_1, v_2, \dots : S \to \mathbb{R}v0​,v1​,v2​,⋯:S→R such that IsFig1Run(M,α,d,v)\mathrm{IsFig1Run}(M,\alpha,d,v)IsFig1Run(M,α,d,v) holds. Then there exists a natural number KKK with all of the following properties:

    • K<∣A∣∣S∣K < |A|^{|S|}K<∣A∣∣S∣, the number of functions S→AS \to AS→A (a strict inequality);
    • dK+1=dKd_{K+1} = d_KdK+1​=dK​, as functions on SSS;
    • Let dˉK\bar d_KdˉK​ be the stationary policy that uses dKd_KdK​ at every step. For every terminal vector V0V_0V0​:
lim⁡n→∞RM,α n(dˉK,V0)=vK.\lim_{n\to\infty} R^{\,n}_{M,\alpha}(\bar d_K, V_0) = v_K.n→∞lim​RM,αn​(dˉK​,V0​)=vK​.
 This is convergence in $\mathbb{R}^S$, which here means convergence at every state $i$.
  • For every policy π\piπ (stationary or not), every terminal vector V0V_0V0​ and every state iii, there is a real number xxx with
lim⁡n→∞RM,α n(π,V0)(i)=xandx≤vK(i).\lim_{n\to\infty} R^{\,n}_{M,\alpha}(\pi, V_0)(i) = x \quad\text{and}\quad x \le v_K(i).n→∞lim​RM,αn​(π,V0​)(i)=xandx≤vK​(i).
 The number $x$ may depend on $\pi$, $V_0$ and $i$. In particular, this says that the return of *every* policy converges at every state to a finite real limit. It does not say that such a limit fails to exist.
  • For every terminal vector V0V_0V0​:
lim⁡n→∞VM,α∗,n(V0)=vK,\lim_{n\to\infty} V^{*,n}_{M,\alpha}(V_0) = v_K,n→∞lim​VM,α∗,n​(V0​)=vK​,
 again as convergence in $\mathbb{R}^S$.

The statement does not directly say that vKv_KvK​ is the unique solution from claim 1 for dKd_KdK​. Any such link would have to come from the definition of IsFig1Run\mathrm{IsFig1Run}IsFig1Run. The inequality x≤vK(i)x \le v_K(i)x≤vK​(i) is non-strict. KKK is only asserted to exist; it is not stated to be the first index at which two successive decision rules coincide.

Degenerate cases. The type AAA can never be empty. If AAA has exactly one element, or if SSS is empty, there is only one decision rule. Then ∣A∣∣S∣=1|A|^{|S|} = 1∣A∣∣S∣=1, so K=0K = 0K=0, and d1=d0d_1 = d_0d1​=d0​ holds automatically. If SSS is empty, RS\mathbb{R}^SRS has a single element. In that case every "exists exactly one vvv" is automatically true, every limit statement is trivially true, and the quantifier over states iii is empty. So when SSS is empty, the theorem reduces to claim 2 holding for whatever runs IsFig1Run\mathrm{IsFig1Run}IsFig1Run admits. If IsFig1Run(M,α,d,v)\mathrm{IsFig1Run}(M,\alpha,d,v)IsFig1Run(M,α,d,v) is satisfied by no pair of sequences for a given MMM and α\alphaα, then claim 2 is vacuously true, and only claim 1 has content. Whether that happens depends on the imported definitions, which are not visible here. Likewise, the statement contains no conditions on MMM, such as nonnegativity or summing to one of any transition data. Any such conditions would have to be built into the type MRP\mathrm{MRP}MRP or the other definitions. The horizon n=0n = 0n=0 is included in each sequence, but it does not affect any of the limits. The statement's own text contains no division, natural-number subtraction, integral or supremum. Any such junk-value behaviour would sit inside the imported definitions.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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