Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 9.2.3 — finite termination of multichain policy iteration

Disproved
PutermanMDP.Multichain.policy_iteration_terminates

by Shuze Chen · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

average-rewardmarkov-decision-processesmultichainp2o-gran-per-chapterp2o-plan-bookp2o-v1policy-iteration

Let SSS and every AsA_sAs​ be finite. Run the multichain policy iteration algorithm of §9.2.1 from an arbitrary admissible rule. At every iteration solve the evaluation equations and use the canonical stationary bias hn=h(dn)∞h_n=h^{(d_n)^\infty}hn​=h(dn​)∞. The assertion is that there is a finite stopping index NNN such that

dN+1=dN,(dN)∞ is average optimal,(gN,hN) satisfies (9.1.5) and (9.1.6).d_{N+1}=d_N,\qquad(d_N)^\infty\text{ is average optimal},\qquad(g_N,h_N)\text{ satisfies (9.1.5) and (9.1.6)}.dN+1​=dN​,(dN​)∞ is average optimal,(gN​,hN​) satisfies (9.1.5) and (9.1.6).

Average optimality compares the stationary policy's lower average reward with the upper average reward of every history-dependent randomized policy. The conclusion concerns both the returned policy and the evaluated gain/bias pair.

Formalization Note This faithful goal uses phase-two maximization over all actions exactly as printed in (9.2.4) and (9.2.8). It is expected to be disproved: finding F3 supplies a two-state cycle despite canonical evaluation. The separately corrected item restricts phase two to gain-preserving actions. Runs here start at zero and are extended constantly after stopping; no termination assumption appears in the run predicate.

Preamble
import Mathlib
import Definitions.Def_PutermanMDP_Multichain_Iteration

open MarkovDecisionProcesses Filter
open scoped Topology
Formal statement
namespace PutermanMDP.Multichain

variable {S A : Type*} [Fintype S] [Fintype A] [DecidableEq A] [Nonempty S]

/-- Theorem 9.2.3, p. 457 (PDF 473), for the algorithm as printed in §9.2.1.
Finding F3 records a cycle; the printed goal is preserved, not silently corrected. -/
theorem policy_iteration_terminates (M : StationaryMDP S A)
    (d : ℕ → Rule M) (g h : ℕ → S → ℝ) (hrun : PrintedRun M d g h) :
    ∃ N : ℕ, d (N + 1) = d N ∧ IsAverageOptimal (policy M (d N)) ∧
      OptimalityEquations M (g N) (h N) := by sorry

end PutermanMDP.Multichain
Source
Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, Wiley, 1994, https://doi.org/10.1002/9780470316887, p. 457 (PDF 473), Theorem 9.2.3; algorithm pp. 452–453 (PDF 468–469)
Read-back

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

The statement concerns two types: a state type SSS and an action type AAA. Both are finite. SSS is assumed nonempty. AAA has decidable equality, but it is not assumed to be nonempty. The data are:

  • MMM, a stationary Markov decision process on states SSS and actions AAA (an object of type StationaryMDP S A, from the namespace MarkovDecisionProcesses).
  • A sequence (dn)n∈N(d_n)_{n \in \mathbb{N}}(dn​)n∈N​, where each dnd_ndn​ is a "rule" for MMM (an element of the type Rule M).
  • Two sequences of real-valued functions on the states, (gn)n∈N(g_n)_{n \in \mathbb{N}}(gn​)n∈N​ and (hn)n∈N(h_n)_{n \in \mathbb{N}}(hn​)n∈N​, with gn,hn:S→Rg_n, h_n : S \to \mathbb{R}gn​,hn​:S→R.
  • A hypothesis PrintedRun(M,d,g,h)\mathrm{PrintedRun}(M, d, g, h)PrintedRun(M,d,g,h) relating all of the above.

The names Rule, PrintedRun, policy, IsAverageOptimal and OptimalityEquations are defined in the imported module Definitions.Def_PutermanMDP_Multichain_Iteration. That module's code is not shown here, so this read-back cannot unfold them. Everything this statement asserts depends on what those definitions actually say. That includes which runs PrintedRun\mathrm{PrintedRun}PrintedRun allows, and whether any run satisfies it at all.

Under these assumptions, the statement asserts that there is some natural number NNN for which all three of the following hold together:

dN+1=dN,IsAverageOptimal(policy(M,dN)),OptimalityEquations(M,gN,hN).d_{N+1} = d_N, \qquad \mathrm{IsAverageOptimal}\big(\mathrm{policy}(M, d_N)\big), \qquad \mathrm{OptimalityEquations}(M, g_N, h_N).dN+1​=dN​,IsAverageOptimal(policy(M,dN​)),OptimalityEquations(M,gN​,hN​).

In words: two consecutive rules in the sequence are equal, as elements of Rule M. The policy that policy builds from MMM and the rule dNd_NdN​ satisfies the predicate IsAverageOptimal. And the pair (gN,hN)(g_N, h_N)(gN​,hN​) satisfies the predicate OptimalityEquations for MMM.

The statement says nothing more than that:

  • NNN is only claimed to exist. It has no stated bound, and it is not claimed to be the first index at which dn+1=dnd_{n+1} = d_ndn+1​=dn​.
  • Nothing is claimed about the rules at indices after N+1N + 1N+1.
  • Nothing is claimed about whether gNg_NgN​ and hNh_NhN​ relate to dNd_NdN​ in any way beyond what the three conjuncts themselves contain.

The doc comment cites "Theorem 9.2.3" and a "Finding F3". It is a comment, not part of the assertion, and has no effect on what the statement asserts. The opened namespaces Filter and Topology do not appear in the visible statement.

Degenerate cases.

  • SSS has one element. Then gng_ngn​ and hnh_nhn​ are each a single real number, and the conclusion reads as above with that simplification.
  • AAA is empty. This is allowed, because only SSS is assumed nonempty. If the hidden definition of Rule M assigns an action to each state, then Rule M has no elements when AAA is empty. In that case no sequence ddd exists and the theorem holds vacuously. Whether that happens cannot be determined from the code shown.
  • PrintedRun(M,d,g,h)\mathrm{PrintedRun}(M, d, g, h)PrintedRun(M,d,g,h) is unsatisfiable. If no sequences d,g,hd, g, hd,g,h satisfy it, for some or all MMM, the theorem is vacuously true for those MMM. If instead it constrains little, the conclusion is a strong claim about arbitrary sequences.
  • Default values from total functions. No division, natural-number subtraction, integral, supremum or extended-real arithmetic appears in the visible statement. Any default values of that kind can only enter through the hidden definitions.
Human review
  • Endorsed by Community (Bot) · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 29, 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