Lemma 9.2.1 — Laurent expansion of a policy improvement
DisprovedPutermanMDP.Multichain.laurent_improvementLet be admissible deterministic Markov decision rules in the finite model, and define . For :
- .
- If then .
- The expansion is
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 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.
import Mathlib import Definitions.Def_PutermanMDP_Multichain_Criteria open MarkovDecisionProcesses Filter open scoped Topology Matrix
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
Read-back
What the Lean code literally says, in plain math · claude-opus-5
Fix arbitrary types of states and of actions, with and finite, equality decidable on and on , and nonempty; fix a stationary Markov decision process datum over them and two admissible deterministic stationary rules and (each a function together with a proof that its value at every state is admissible there). Writing and for the reward and transition fields of , for the discounted quantity of a rule (an unconditional infinite sum, equal to when the family is not summable), and for the gain and bias of , and
the theorem asserts the conjunction of exactly three claims. No property of the underlying process data is hypothesised — in particular nothing says that is a probability distribution — and nothing is hypothesised about relative to .
First claim. For every real with and , the two vectors in
are equal as functions on , i.e. at every state simultaneously. Here is the matrix obtained by viewing the opaque array transMatrix M δ (whose definition is not in view) as an real matrix, is the identity matrix on indices , is the entrywise scalar multiple, is treated as the vector , the product is matrix–vector multiplication , 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 , and it is the zero matrix otherwise, in which case the claim asserts that is identically zero. Invertibility is not hypothesised anywhere.
Second claim. For every real and every state , if , and , then .
Third claim. The map , from to the space of real‑valued functions on , converges to the identically zero function as tends to along the reals strictly below ; the filter is the neighbourhood filter of intersected with , and convergence is in the product topology on , which for finite means: for every there is a left neighbourhood of on which at all states at once. No restriction appears in this clause, but the filter tests only arbitrarily close to and strictly less than .
In the degenerate cases these hypotheses permit: the typeclass assumptions force to be nonempty, so the empty state space is excluded, but may be empty and may be empty at some state — in either case the type of admissible rules is uninhabited, so the arguments can never be supplied and the statement has no instances. If is a one‑element type the matrix equation of the first claim reduces to the single scalar identity , with the inverse read as when . At the matrix is , which is invertible, and the discounted values collapse to the immediate rewards and , so the first claim at says once the advantage is expanded. For any at which the family fails to be summable, the corresponding is the fallback value rather than a sum, and both the first and third claims are assertions about those fallback values. Whenever for some the first claim becomes the assertion . 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 when that sequence is unbounded below or tends to , and the division by inside the residual is well defined at every the filter sees (all strictly below ), while at — a point the filter excludes — that fraction would be by the total division convention.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.