Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eq. (14), p. 783 — the expected cost of a fixed policy is the value of a linear program

Proved
RobustMDP.FiniteHorizon.expectedCost_lp

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-programmingmarkov-decision-processp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Fix an initial state i0i_0i0​, a controller policy π=(at)t∈T\pi=(\mathbf a_t)_{t\in T}π=(at​)t∈T​ and transition matrices P=(Pta)a∈A, t∈TP=(P_t^a)_{a\in\mathcal A,\,t\in T}P=(Pta​)a∈A,t∈T​ whose rows are probability vectors. Let q=ei0q=e_{i_0}q=ei0​​ (q(i0)=1q(i_0)=1q(i0​)=1, q(i)=0q(i)=0q(i)=0 otherwise). Then the expected total cost CN(π,P)C_N(\pi,P)CN​(π,P) of (2) is the optimal value of the linear program

max⁡v0,…,vN−1 qTv0s.t.vt(i)≤ct(i,at(i))+∑jPtat(i)(i,j) vt+1(j),i∈X, t∈T,(14)\max_{v_0,\dots,v_{N-1}}\ q^{\mathsf T}v_0\quad\text{s.t.}\quad v_t(i)\le c_t(i,\mathbf a_t(i))+\sum_j P_t^{\mathbf a_t(i)}(i,j)\,v_{t+1}(j),\quad i\in\mathcal X,\ t\in T, \tag{14}v0​,…,vN−1​max​ qTv0​s.t.vt​(i)≤ct​(i,at​(i))+j∑​Ptat​(i)​(i,j)vt+1​(j),i∈X, t∈T,(14)

with vN=cNv_N=c_NvN​=cN​, and the maximum is attained.

The linear program links the probabilistic definition (2) of the cost to the backward recursions: letting the matrices vary over nature's admissible set turns (14) into problem (16).

Formalization Note The cost CNC_NCN​ is the forward-distribution expectation of (2). The terminal condition vN=cNv_N=c_NvN​=cN​ is implicit on the page (the paper writes φN(π,τ)\varphi_N(\pi,\tau)φN​(π,τ) for CN(π,τ)C_N(\pi,\tau)CN​(π,τ) here). Since q=ei0q=e_{i_0}q=ei0​​, the objective qTv0q^{\mathsf T}v_0qTv0​ is written v0(i0)v_0(i_0)v0​(i0​). The maximum is stated with IsGreatest.

Preamble
import Mathlib
import Definitions.Def_RobustMDP_FiniteHorizon_Model
import Definitions.Def_RobustMDP_FiniteHorizon_expectedCost
Formal statement
namespace RobustMDP.FiniteHorizon

/-- The linear program (14), p. 783. For a given controller policy `π` and a given collection of
time-varying transition matrices `P = (P_t^a)` (every row a probability vector), the expected
total cost `C_N(π, P)` of (2) is the optimal value of
`max qᵀ v_0` over `v_0, …, v_{N-1}` subject to
`v_t(i) ≤ c_t(i, 𝐚_t(i)) + ∑_j P_t^{𝐚_t(i)}(i, j) v_{t+1}(j)` for all `i`, `t ∈ T`, with
`v_N = c_N` and `q = e_{i₀}` (so `qᵀ v_0 = v_0(i₀)`). -/
theorem expectedCost_lp {n N : ℕ} {A : Type} (M : Model n N A) (i₀ : Fin n)
    (π : ControlPolicy n N A) (P : Fin N → A → Fin n → Fin n → ℝ)
    (hP : ∀ t a i, P t a i ∈ stdSimplex ℝ (Fin n)) :
    IsGreatest
      {x : ℝ | ∃ v : Fin (N + 1) → Fin n → ℝ,
        v (Fin.last N) = M.terminalCost ∧
        (∀ t : Fin N, ∀ i, v t.castSucc i ≤
          M.cost t i (π t i) + ∑ j, P t (π t i) i j * v t.succ j) ∧
        x = v 0 i₀}
      (M.expectedCost i₀ π P) := by sorry

end RobustMDP.FiniteHorizon
Source
Nilim and El Ghaoui, Robust Control of Markov Decision Processes with Uncertain Transition Matrices, Oper. Res. 53 (2005), p. 783, Eq. (14)
Read-back

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

Hypotheses. The statement fixes:

  • a model MMM with nnn states, NNN stages and any action type AAA, with stage costs ctc_tct​ and terminal cost cNc_NcN​;
  • an initial state i0i_0i0​;
  • a control policy π\piπ;
  • a real array Pta(i,j)P_t^a(i,j)Pta​(i,j) whose every row Pta(i,⋅)P_t^a(i,\cdot)Pta​(i,⋅) lies in the standard simplex.

PPP is not required to take its rows from MMM's row sets Pia\mathcal{P}_i^aPia​.

Conclusion. The expected cost CN(π,P)C_N(\pi,P)CN​(π,P) is the greatest element of the set of numbers v0(i0)v_0(i_0)v0​(i0​), taken over all sequences v0,…,vN∈Rnv_0,\dots,v_N \in \mathbb{R}^nv0​,…,vN​∈Rn with vN=cNv_N = c_NvN​=cN​ and

vt(i)≤ct(i,πt(i))+∑jPtπt(i)(i,j) vt+1(j)for all t<N and all states i.v_t(i) \le c_t\big(i,\pi_t(i)\big) + \sum_j P_t^{\pi_t(i)}(i,j)\, v_{t+1}(j) \quad\text{for all } t<N \text{ and all states } i.vt​(i)≤ct​(i,πt​(i))+j∑​Ptπt​(i)​(i,j)vt+1​(j)for all t<N and all states i.

Here CN(π,P)C_N(\pi,P)CN​(π,P) is defined as

CN(π,P)=∑t<N∑iμt(i) ct(i,πt(i))+∑iμN(i) cN(i),C_N(\pi,P) = \sum_{t<N}\sum_i \mu_t(i)\, c_t(i,\pi_t(i)) + \sum_i \mu_N(i)\, c_N(i),CN​(π,P)=t<N∑​i∑​μt​(i)ct​(i,πt​(i))+i∑​μN​(i)cN​(i),

where μ0\mu_0μ0​ is the point mass at i0i_0i0​ and

μt+1(j)=∑iμt(i) Ptπt(i)(i,j).\mu_{t+1}(j) = \sum_i \mu_t(i)\, P_t^{\pi_t(i)}(i,j).μt+1​(j)=i∑​μt​(i)Ptπt​(i)​(i,j).

"Greatest element" means two things: CN(π,P)C_N(\pi,P)CN​(π,P) is attained by some feasible sequence, and it is at least every feasible v0(i0)v_0(i_0)v0​(i0​).

Degenerate cases.

  • N=0N = 0N=0: the set is {cN(i0)}\{c_N(i_0)\}{cN​(i0​)} and the cost is cN(i0)c_N(i_0)cN​(i0​).
  • n=0n = 0n=0: no i0i_0i0​ exists, so the statement has no instances.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me