Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 9.2.1 — Laurent expansion of a policy improvement

Disproved
PutermanMDP.Multichain.laurent_improvement

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

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

Let d,δd,\deltad,δ be admissible deterministic Markov decision rules in the finite model, and define wλ(δ,d)=rδ+λPδvλd∞−vλd∞w_\lambda(\delta,d)=r_\delta+\lambda P_\delta v_\lambda^{d^\infty}-v_\lambda^{d^\infty}wλ​(δ,d)=rδ​+λPδ​vλd∞​−vλd∞​. For 0≤λ<10\le\lambda<10≤λ<1:

  1. (I−λPδ)−1wλ(δ,d)=vλδ∞−vλd∞(I-\lambda P_\delta)^{-1}w_\lambda(\delta,d)=v_\lambda^{\delta^\infty}-v_\lambda^{d^\infty}(I−λPδ​)−1wλ​(δ,d)=vλδ∞​−vλd∞​.
  2. If δ(s)=d(s)\delta(s)=d(s)δ(s)=d(s) then wλ(δ,d)(s)=0w_\lambda(\delta,d)(s)=0wλ​(δ,d)(s)=0.
  3. The expansion is
wλ(δ,d)=(Pδ−I)gd∞1−λ+[rδ−gd∞+(Pδ−I)hd∞]+f(λ),f(λ)⟶0(λ↑1).w_\lambda(\delta,d)=\frac{(P_\delta-I)g^{d^\infty}}{1-\lambda}+\bigl[r_\delta-g^{d^\infty}+(P_\delta-I)h^{d^\infty}\bigr]+f(\lambda),\qquad f(\lambda)\longrightarrow0\quad(\lambda\uparrow1).wλ​(δ,d)=1−λ(Pδ​−I)gd∞​+[rδ​−gd∞+(Pδ​−I)hd∞]+f(λ),f(λ)⟶0(λ↑1).

This relates a single decision-rule switch to discounted value differences and the stationary gain and canonical bias.

Formalization Note The finite state/action hypothesis is the chapter's standing assumption on p. 442. The residual fff is explicitly defined as the difference between the two sides, and its vector convergence expresses the entire third clause. The matrix inverse is used in its nonsingular discount range. Finding F4 records an error in the printed third clause: in a two-state stay/exit model the stated residual is constantly (1,0), not tending to zero. The faithful statement retains the printed constant term; its conjunction is therefore expected to be disproved. Parts (1) and (2) are unchanged.

Preamble
import Mathlib
import Definitions.Def_PutermanMDP_Multichain_Criteria

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

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

/-- Lemma 9.2.1, p. 456 (PDF 472), all three parts. The last clause states
that the explicit residual in (9.2.11) tends to zero from the left. -/
theorem laurent_improvement [DecidableEq S] (M : StationaryMDP S A) (δ d : Rule M) :
    (∀ lam : ℝ, 0 ≤ lam → lam < 1 →
      (1 - lam • Matrix.of (transMatrix M δ.val))⁻¹ *ᵥ advantage M δ d lam =
        discounted M δ lam - discounted M d lam) ∧
    (∀ (lam : ℝ) (s : S), 0 ≤ lam → lam < 1 → δ.val s = d.val s →
      advantage M δ d lam s = 0) ∧
    Filter.Tendsto (residual M δ d) (nhdsWithin (1 : ℝ) (Set.Iio 1)) (nhds 0) := by sorry

end PutermanMDP.Multichain
Source
Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, Wiley, 1994, https://doi.org/10.1002/9780470316887, p. 456 (PDF 472), Lemma 9.2.1; standing finiteness p. 442 (PDF 458)
Read-back

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

Fix arbitrary types SSS of states and AAA of actions, with SSS and AAA finite, equality decidable on AAA and on SSS, and SSS nonempty; fix a stationary Markov decision process datum MMM over them and two admissible deterministic stationary rules δ\deltaδ and ddd (each a function S→AS \to AS→A together with a proof that its value at every state is admissible there). Writing r(s,a)r(s,a)r(s,a) and p(j∣s,a)p(j \mid s,a)p(j∣s,a) for the reward and transition fields of MMM, veλ(s)=∑n≥0λnrne(s)v^\lambda_e(s) = \sum_{n\ge 0}\lambda^n r^e_n(s)veλ​(s)=∑n≥0​λnrne​(s) for the discounted quantity of a rule eee (an unconditional infinite sum, equal to 000 when the family is not summable), gdg_dgd​ and hdh_dhd​ for the gain and bias of ddd, and

advδ,dλ(s)=r(s,δ(s))+λ∑jp(j∣s,δ(s))vdλ(j)−vdλ(s),\mathrm{adv}^\lambda_{\delta,d}(s) = r\bigl(s,\delta(s)\bigr) + \lambda\sum_j p\bigl(j\mid s,\delta(s)\bigr) v^\lambda_d(j) - v^\lambda_d(s),advδ,dλ​(s)=r(s,δ(s))+λj∑​p(j∣s,δ(s))vdλ​(j)−vdλ​(s), resδ,dλ(s)=advδ,dλ(s)−[∑jp(j∣s,δ(s))gd(j)−gd(s)1−λ+(r(s,δ(s))−gd(s)+∑jp(j∣s,δ(s))hd(j)−hd(s))],\mathrm{res}^\lambda_{\delta,d}(s) = \mathrm{adv}^\lambda_{\delta,d}(s) - \left[\frac{\sum_j p\bigl(j\mid s,\delta(s)\bigr)g_d(j) - g_d(s)}{1-\lambda} + \Bigl(r\bigl(s,\delta(s)\bigr) - g_d(s) + \sum_j p\bigl(j\mid s,\delta(s)\bigr)h_d(j) - h_d(s)\Bigr)\right],resδ,dλ​(s)=advδ,dλ​(s)−[1−λ∑j​p(j∣s,δ(s))gd​(j)−gd​(s)​+(r(s,δ(s))−gd​(s)+j∑​p(j∣s,δ(s))hd​(j)−hd​(s))],

the theorem asserts the conjunction of exactly three claims. No property of the underlying process data is hypothesised — in particular nothing says that p(⋅∣s,a)p(\cdot \mid s,a)p(⋅∣s,a) is a probability distribution — and nothing is hypothesised about δ\deltaδ relative to ddd.

First claim. For every real λ\lambdaλ with 0≤λ0 \le \lambda0≤λ and λ<1\lambda < 1λ<1, the two vectors in RS\mathbb R^SRS

(I−λPδ)−1 advδ,dλandvδλ−vdλ\bigl(I - \lambda P_\delta\bigr)^{-1}\, \mathrm{adv}^\lambda_{\delta,d} \qquad\text{and}\qquad v^\lambda_\delta - v^\lambda_d(I−λPδ​)−1advδ,dλ​andvδλ​−vdλ​

are equal as functions on SSS, i.e. at every state simultaneously. Here PδP_\deltaPδ​ is the matrix obtained by viewing the opaque array transMatrix M δ (whose definition is not in view) as an S×SS \times SS×S real matrix, III is the identity matrix on indices SSS, λPδ\lambda P_\deltaλPδ​ is the entrywise scalar multiple, advδ,dλ\mathrm{adv}^\lambda_{\delta,d}advδ,dλ​ is treated as the vector s↦advδ,dλ(s)s \mapsto \mathrm{adv}^\lambda_{\delta,d}(s)s↦advδ,dλ​(s), the product is matrix–vector multiplication ((I−λPδ)−1u)(s)=∑j(I−λPδ)sj−1 u(j)\bigl((I-\lambda P_\delta)^{-1} u\bigr)(s) = \sum_j (I-\lambda P_\delta)^{-1}_{s j}\,u(j)((I−λPδ​)−1u)(s)=∑j​(I−λPδ​)sj−1​u(j), and the right‑hand side is the pointwise difference of the two discounted‑value vectors. The inverse is Lean's total matrix inverse: it is the genuine inverse when det⁡(I−λPδ)≠0\det(I - \lambda P_\delta) \ne 0det(I−λPδ​)=0, and it is the zero matrix otherwise, in which case the claim asserts that vδλ−vdλv^\lambda_\delta - v^\lambda_dvδλ​−vdλ​ is identically zero. Invertibility is not hypothesised anywhere.

Second claim. For every real λ\lambdaλ and every state sss, if 0≤λ0 \le \lambda0≤λ, λ<1\lambda < 1λ<1 and δ(s)=d(s)\delta(s) = d(s)δ(s)=d(s), then advδ,dλ(s)=0\mathrm{adv}^\lambda_{\delta,d}(s) = 0advδ,dλ​(s)=0.

Third claim. The map λ↦resδ,dλ\lambda \mapsto \mathrm{res}^\lambda_{\delta,d}λ↦resδ,dλ​, from R\mathbb RR to the space of real‑valued functions on SSS, converges to the identically zero function as λ\lambdaλ tends to 111 along the reals strictly below 111; the filter is the neighbourhood filter of 111 intersected with (−∞,1)(-\infty,1)(−∞,1), and convergence is in the product topology on RS\mathbb R^SRS, which for finite SSS means: for every ε>0\varepsilon > 0ε>0 there is a left neighbourhood of 111 on which ∣resδ,dλ(s)∣<ε|\mathrm{res}^\lambda_{\delta,d}(s)| < \varepsilon∣resδ,dλ​(s)∣<ε at all states sss at once. No restriction 0≤λ0 \le \lambda0≤λ appears in this clause, but the filter tests only λ\lambdaλ arbitrarily close to and strictly less than 111.

In the degenerate cases these hypotheses permit: the typeclass assumptions force SSS to be nonempty, so the empty state space is excluded, but AAA may be empty and A(s)\mathcal A(s)A(s) may be empty at some state — in either case the type of admissible rules is uninhabited, so the arguments δ,d\delta, dδ,d can never be supplied and the statement has no instances. If SSS is a one‑element type the matrix equation of the first claim reduces to the single scalar identity (1−λ (Pδ)ss)−1advδ,dλ(s)=vδλ(s)−vdλ(s)(1 - \lambda\,(P_\delta)_{ss})^{-1}\mathrm{adv}^\lambda_{\delta,d}(s) = v^\lambda_\delta(s) - v^\lambda_d(s)(1−λ(Pδ​)ss​)−1advδ,dλ​(s)=vδλ​(s)−vdλ​(s), with the inverse read as 000 when 1−λ(Pδ)ss=01 - \lambda (P_\delta)_{ss} = 01−λ(Pδ​)ss​=0. At λ=0\lambda = 0λ=0 the matrix is III, which is invertible, and the discounted values collapse to the immediate rewards r(s,δ(s))r(s,\delta(s))r(s,δ(s)) and r(s,d(s))r(s,d(s))r(s,d(s)), so the first claim at λ=0\lambda = 0λ=0 says r(s,δ(s))−r(s,d(s))=r(s,δ(s))−r(s,d(s))r(s,\delta(s)) - r(s,d(s)) = r(s,\delta(s)) - r(s,d(s))r(s,δ(s))−r(s,d(s))=r(s,δ(s))−r(s,d(s)) once the advantage is expanded. For any λ∈[0,1)\lambda \in [0,1)λ∈[0,1) at which the family n↦λnrne(s)n \mapsto \lambda^n r^e_n(s)n↦λnrne​(s) fails to be summable, the corresponding veλ(s)v^\lambda_e(s)veλ​(s) is the fallback value 000 rather than a sum, and both the first and third claims are assertions about those fallback values. Whenever det⁡(I−λPδ)=0\det(I - \lambda P_\delta) = 0det(I−λPδ​)=0 for some λ∈[0,1)\lambda \in [0,1)λ∈[0,1) the first claim becomes the assertion vδλ=vdλv^\lambda_\delta = v^\lambda_dvδλ​=vdλ​. The bias entering the residual is a limit inferior of a real sequence, hence always a real number and equal to Lean's junk value 000 when that sequence is unbounded below or tends to +∞+\infty+∞, and the division by 1−λ1-\lambda1−λ inside the residual is well defined at every λ\lambdaλ the filter sees (all strictly below 111), while at λ=1\lambda = 1λ=1 — a point the filter excludes — that fraction would be 000 by the total division convention.

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