Discounted problems (Prop. 7.3.1)
ProvedBertsekasDP.discounted_main_theoremProposition 7.3.1 (discounted problems). Consider the finite-state -discounted problem, , with stochastic transition rows at admissible controls. Then there is a cost vector for which all of the following hold:
- Value iteration converges to from every initial vector;
- Bellman's equation holds and determines uniquely:
- is optimal: every admissible policy has a well-defined cost , and some stationary policy attains it;
- policy evaluation: each admissible stationary has a unique cost vector with , reached by value iteration under ;
- optimality condition: if and only if attains the minimum in Bellman's equation at every state;
- policy iteration generates an improving sequence of policies and terminates with an optimal one.
The discounted model is the workhorse of reinforcement learning, and its theory is entirely inherited: the source derives it by attaching to the discounted problem an associated stochastic shortest path problem in which the state terminates with probability at each stage, so that costs and value iterates coincide and Assumption 7.2.1 holds automatically.
Formalization Note The six parts are packaged as one statement so that they share the single existential witness , mirroring how the source states parts (a)–(e). Convergence is in the product topology on , equivalently in any norm since is finite. Discounting appears only in the operators; the underlying model is the one of §7.2, with stochastic rows imposed as a hypothesis.
import Mathlib import Definitions.Def_BertsekasSSPModel
namespace BertsekasDP
theorem discounted_main_theorem {n : ℕ} {C : Type} [Fintype C]
(M : BertsekasSSPModel n C) (α : ℝ) (hα : 0 < α ∧ α < 1)
(hp1 : ∀ i, ∀ u ∈ M.U i, ∑ j, M.p i u j = 1) :
∃ Jstar : Fin n → ℝ,
(∀ J₀ : Fin n → ℝ,
Filter.Tendsto (fun k => (BertsekasDiscountedBellmanOp M α)^[k] J₀)
Filter.atTop (nhds Jstar)) ∧
BertsekasDiscountedBellmanOp M α Jstar = Jstar ∧
(∀ J : Fin n → ℝ, BertsekasDiscountedBellmanOp M α J = J → J = Jstar) ∧
(∀ π, BertsekasSSPAdmissible M π → ∀ i, ∃ Jπ : ℝ,
Filter.Tendsto (fun N => BertsekasDiscountedNCost M α π N i)
Filter.atTop (nhds Jπ) ∧ Jstar i ≤ Jπ) ∧
(∃ μ : Fin n → C, (∀ i, μ i ∈ M.U i) ∧ ∀ i,
Filter.Tendsto (fun N => BertsekasDiscountedNCost M α (fun _ => μ) N i)
Filter.atTop (nhds (Jstar i))) ∧
(∀ μ : Fin n → C, (∀ i, μ i ∈ M.U i) →
∃ Jμ : Fin n → ℝ,
BertsekasDiscountedPolicyOp M α μ Jμ = Jμ ∧
(∀ J : Fin n → ℝ,
BertsekasDiscountedPolicyOp M α μ J = J → J = Jμ) ∧
(∀ J₀ : Fin n → ℝ,
Filter.Tendsto (fun k => (BertsekasDiscountedPolicyOp M α μ)^[k] J₀)
Filter.atTop (nhds Jμ)) ∧
(Jμ = Jstar ↔
∀ i, M.g i (μ i) + α * ∑ j, M.p i (μ i) j * Jstar j =
BertsekasDiscountedBellmanOp M α Jstar i)) ∧
(∀ (μ : ℕ → Fin n → C) (J : ℕ → Fin n → ℝ),
(∀ k i, μ k i ∈ M.U i) →
(∀ k, BertsekasDiscountedPolicyOp M α (μ k) (J k) = J k) →
(∀ k i, M.g i (μ (k + 1) i) +
α * ∑ j, M.p i (μ (k + 1) i) j * J k j =
BertsekasDiscountedBellmanOp M α (J k) i) →
(∀ k i, J (k + 1) i ≤ J k i) ∧
∃ k, BertsekasDiscountedBellmanOp M α (J k) = J k) := by sorry
end BertsekasDPRead-back
What the Lean code literally says, in plain math · claude-fable-5
Let be a BertsekasSSPModel on states with finite control type , let be a real number with and , and assume : for every state and every control , exactly (rows are genuinely stochastic on admissible controls; controls outside remain unconstrained beyond nonnegativity). No survival/termination hypothesis is assumed. Write for the discounted Bellman operator, for the discounted policy operator, and for the discounted -stage cost, all as defined in this bundle. The theorem asserts the existence of a function satisfying the conjunction of the following seven clauses:
- Value iteration: for every , the iterates converge to as (product/pointwise topology on , equivalently uniform).
- Fixed point: .
- Uniqueness: every with equals .
- Bound over admissible policy sequences, with convergence: for every policy sequence with for all , and every state , there exists a real with as and . (Existence of the limit for every admissible is part of the claim.)
- Attainment by a stationary policy: there exists with for all such that for every state , as .
- Policy evaluation and optimality condition for every stationary admissible : for every with for all , there exists such that: (a) ; (b) every with equals ; (c) for every the iterates converge to ; and (d) the if and only if
i.e. equals exactly when attains the discounted Bellman minimum at for every state. 7. Policy iteration: for every sequence of stage policies with for all , and every sequence of functions such that for every (each assumed to be a fixed point of its policy operator) and such that the improvement condition
holds, the conjunction follows: for all , and there exists with .
The outer existence is , not (clause 3 pins the fixed point down among fixed points). When everything is vacuous or trivially witnessed. The proof is a placeholder.
Confirmed by the mission captain (proposal self-audit).