Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Claim (d), p. 946 — the algorithm of Fig. 1 terminates in a finite number of cycles

Proved
JewellMRP.Discounted.claim_d_finite_termination

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

finite-terminationmarkov-renewal-processp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1policy-iteration

Let a Markov-renewal program with NNN states and ZZZ alternatives be given and let α>0\alpha > 0α>0. For every run (dk,vk)k≥0(d_k, v_k)_{k \ge 0}(dk​,vk​)k≥0​ of the algorithm of Fig. 1 (each vkv_kvk​ solves (15) for dkd_kdk​, and dk+1d_{k+1}dk+1​ is obtained from dkd_kdk​ and vkv_kvk​ by the policy-improvement step with the retention rule), there is a cycle KKK with

dK+1=dKandK<ZN,d_{K+1} = d_K \qquad\text{and}\qquad K < Z^N ,dK+1​=dK​andK<ZN,

where ZNZ^NZN is the number of stationary policies.

The paper writes "(d) The algorithm terminates in a finite number of cycles", justified by "the fact that there are only a finite number of policies". The bound K<ZNK < Z^NK<ZN makes "finite" explicit using the paper's own count of stationary policies (p. 946: "there are ZNZ^NZN of them").

Formalization Note The algorithm is modelled as an infinite sequence of cycles; termination means that two successive policies coincide, which is the "Done" test of Fig. 1. The retention rule is essential: without it the iterates may alternate forever between two policies that tie. The bound K<ZNK < Z^NK<ZN is written as KKK less than the cardinality of the type of maps from states to alternatives.

Preamble
import Mathlib
import Definitions.Def_JewellMRP_Discounted_MRP
import Definitions.Def_JewellMRP_Discounted_PolicyIteration

open Filter Topology
Formal statement
namespace JewellMRP.Discounted

/-- Claim (d), p. 946: every run of the algorithm of Fig. 1 produces two identical successive
policies within at most as many cycles as there are stationary policies. -/
theorem claim_d_finite_termination {S A : Type*} [Fintype S] [DecidableEq S] [Fintype A]
    [Nonempty A] (M : MRP S A) {α : ℝ} (hα : 0 < α) {d : ℕ → S → A} {v : ℕ → S → ℝ}
    (hrun : IsFig1Run M α d v) :
    ∃ K, K < Fintype.card (S → A) ∧ d (K + 1) = d K := by sorry

end JewellMRP.Discounted
Source
Jewell, Markov-Renewal Programming. I: Formulation, Finite Return Models, Operations Research 11(6), 1963, p. 946, Claim (d)
Read-back

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

This theorem concerns a structure MMM as follows:

  • a finite state set SSS and a finite, nonempty alternative set AAA;
  • row-stochastic matrices pzp^zpz;
  • probability measures FijzF^z_{ij}Fijz​ supported on (0,∞)(0,\infty)(0,∞);
  • arbitrary returns.

Take any real α>0\alpha > 0α>0, a sequence of stationary policies (dk)k≥0(d_k)_{k\ge0}(dk​)k≥0​ and a sequence of vectors (vk)k≥0(v_k)_{k \ge 0}(vk​)k≥0​. The hypothesis is that they form a run: for every kkk, both of these hold.

  • vkv_kvk​ solves vk(i)=Tidk(i)(α,vk)v_k(i) = T^{d_k(i)}_i(\alpha, v_k)vk​(i)=Tidk​(i)​(α,vk​) for all iii.
  • dk+1d_{k+1}dk+1​ is an improvement of dkd_kdk​ with respect to vkv_kvk​. That is, dk+1(i)d_{k+1}(i)dk+1​(i) attains max⁡zTiz(α,vk)\max_z T^z_i(\alpha, v_k)maxz​Tiz​(α,vk​) in every state, and dk+1(i)=dk(i)d_{k+1}(i) = d_k(i)dk+1​(i)=dk​(i) whenever dk(i)d_k(i)dk​(i) already attains it.

Here TTT is the test quantity with f~ijz(α)=∫(0,∞)e−αt dFijz(t)\tilde f^z_{ij}(\alpha) = \int_{(0,\infty)} e^{-\alpha t}\,dF^z_{ij}(t)f~​ijz​(α)=∫(0,∞)​e−αtdFijz​(t).

The conclusion is that there exists an index KKK with

K<∣A∣∣S∣anddK+1=dK.K < |A|^{|S|} \quad\text{and}\quad d_{K+1} = d_K.K<∣A∣∣S∣anddK+1​=dK​.

The bound ∣A∣∣S∣|A|^{|S|}∣A∣∣S∣ is the number of stationary policies. The statement says nothing about the policies after K+1K + 1K+1.

Degenerate cases: the case α≤0\alpha \le 0α≤0 is excluded. If SSS is empty, then ∣A∣∣S∣=1|A|^{|S|} = 1∣A∣∣S∣=1, and K=0K = 0K=0 works because all policies coincide. If AAA has one element, K=0K = 0K=0 works for the same reason. The hypothesis also requires a solution vkv_kvk​ to exist for every kkk.

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