Existence of a Bellman optimality solution for a finite MDP
ProvedBanditAlgorithm.mdp_exists_bellman_optimality_solutionLet be a finite MDP with states, actions, rewards and finite diameter . Then there exist a gain , a value function , and a deterministic memoryless policy such that
and is the optimal gain of . The last two displays together say that solves the average-reward Bellman optimality equation
with a greedy — hence gain-optimal — policy; since the span bound gives .
This is Theorem 38.2 of Lattimore and Szepesvári, whose proof is left to their Exercise 38.10. It is what makes UCRL2 well defined: the algorithm computes an optimistic solution of the optimality equation of the extended MDP and plays greedily, and both the optimism step (Eq. 38.17) and the span bound of Eq. (38.19) are read off the equation.
The proof is the vanishing-discount argument. For each let be the -discounted value function and put . Splitting as and bounding the second term by shows that solves the average-reward Bellman inequality; hence , uniformly in . The recentred functions therefore range in the compact cube while ranges in , and the greedy policies range over a finite set; so along a subsequence the greedy policy is a fixed and the pair converges. In the limit the inequality persists, and the defect in the greedy equality — which equals and so lies between and — vanishes. That is the optimal gain is then the two halves of the verification argument: the inequality gives and the equality along gives .
The uniform span bound is exactly the point at which the finiteness of the diameter enters; without it the recentred discounted value functions need not be bounded and the limit may fail to exist.
import Definitions.Def_FiniteMDPLearning import Mathlib.Probability.Kernel.Composition.IntegralCompProd open MeasureTheory ProbabilityTheory
theorem BanditAlgorithm.mdp_exists_bellman_optimality_solution {S A : ℕ} (hS : 0 < S)
(hA : 0 < A) (M : FiniteMDP S A) (hD : mdpDiameterENN M ≠ ⊤) :
∃ (ρ : ℝ) (v : Fin S → ℝ) (f : Fin S → Fin A),
0 ≤ ρ ∧ ρ ≤ 1 ∧
(∀ s s', v s - v s' ≤ ρ * mdpDiameter M) ∧
(∀ s a, M.r s a + ∑ s', (M.P s a s' : ℝ) * v s' ≤ ρ + v s) ∧
(∀ s, ρ + v s = M.r s (f s) + ∑ s', (M.P s (f s) s' : ℝ) * v s') ∧
mdpOptimalGain M = ρ := by
sorry