Optimality condition (Prop. 7.2.1(d))
ProvedBertsekasDP.ssp_optimality_conditionProposition 7.2.1(d) (optimality condition). Under Assumption 7.2.1, let solve Bellman's equation and let be an admissible stationary policy with evaluated cost . Then is optimal if and only if it attains the minimum in Bellman's equation at every state:
In words: the optimal policies are exactly the policies that are greedy with respect to the optimal cost vector. This is what turns the solution of Bellman's equation into a controller — one reads off an optimal policy by minimizing state by state — and it is the criterion by which policy iteration recognizes that it has finished.
Formalization Note and enter as given fixed points of and respectively; their uniqueness is not assumed here, being supplied by Prop. 7.2.1(b),(c). Both directions of the equivalence are asserted.
import Mathlib import Definitions.Def_BertsekasSSPModel
namespace BertsekasDP
theorem ssp_optimality_condition {n : ℕ} {C : Type} [Fintype C]
(M : BertsekasSSPModel n C)
(hA : ∃ m : ℕ, 0 < m ∧ ∀ π, BertsekasSSPAdmissible M π →
∀ i, BertsekasSSPSurvival M π m i < 1)
(Jstar : Fin n → ℝ) (hbell : BertsekasSSPBellmanOp M Jstar = Jstar)
(μ : Fin n → C) (hμ : ∀ i, μ i ∈ M.U i)
(Jμ : Fin n → ℝ) (heval : BertsekasSSPPolicyOp M μ Jμ = Jμ) :
Jμ = Jstar ↔
∀ i, M.g i (μ i) + ∑ j, M.p i (μ i) j * Jstar j =
BertsekasSSPBellmanOp M Jstar i := 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 . Assume:
- : there is an such that for every admissible policy sequence and every state , (the -step survival mass, as defined in this bundle);
- is a function given as a hypothesis together with the assumption , where is the SSP Bellman operator (no uniqueness or optimality of is assumed — only that it is some fixed point of );
- is a stage policy with for every ;
- is a function given with the assumption (again only some fixed point of the policy operator; uniqueness is not assumed).
The conclusion is a genuine if and only if:
i.e. equals (as functions) exactly when, at every state , the control attains the minimum in the Bellman operator applied to (the left side of the displayed equality is the -value at , the right side is the minimum over ). Both directions of the equivalence are asserted. The proof is a placeholder.
Confirmed by the mission captain (proposal self-audit).