Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(6): under Assumption A, QR(i)=∑jπj∑kDjkwjkQ_R(i) = \sum_j \pi_j \sum_k D_{jk} w_{jk}QR​(i)=∑j​πj​∑k​Djk​wjk​ for every R∈C′R \in C'R∈C′

Proved
DermanSeqDecisions.LinProg.avg_cost_eq_stationary

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

average-costmarkov-decision-processp2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1stationary-distribution

Consider Problem 1: stochastic chance laws qij(k)q_{ij}(k)qij​(k) on the finite state set {0,…,L}\{0, \dots, L\}{0,…,L}, positive costs wik>0w_{ik} > 0wik​>0, and Assumption A: for every procedure of C′C'C′ the states 0,…,L0, \dots, L0,…,L belong to the same class. Let D∈C′D \in C'D∈C′ and let π\piπ be the stationary distribution of its chain pij=∑kqij(k)Dikp_{ij} = \sum_k q_{ij}(k) D_{ik}pij​=∑k​qij​(k)Dik​. Then for every initial state iii,

QR(i)=∑j=0Lπj∑k=1KDjkwjk,Q_R(i) = \sum_{j=0}^{L} \pi_j \sum_{k=1}^{K} D_{jk} w_{jk},QR​(i)=j=0∑L​πj​k=1∑K​Djk​wjk​,

where QR(i)=lim sup⁡T→∞1T∑t=0TWtQ_R(i) = \limsup_{T\to\infty} \frac{1}{T}\sum_{t=0}^{T} W_tQR​(i)=limsupT→∞​T1​∑t=0T​Wt​.

This is the first step of the proof of Theorem 2: the average cost of a stationary procedure is a linear function of its state-action frequencies πjDjk\pi_j D_{jk}πj​Djk​.

Formalization Note. Assumption A is irreducibility of the chain matrix of every procedure of C′C'C′ (the matrices are row-stochastic, so this is "one class").

Preamble
import Mathlib
import Definitions.Def_JewellMRP_InfiniteStep_Model
import Definitions.Def_DermanSeqDecisions_LinProg_Model

open Matrix
Formal statement
namespace DermanSeqDecisions.LinProg

/-- (6), p. 20 (Derman, *On Sequential Decisions and Markov Chains*, Management Science 9(1):16–24 (1962), DOI 10.1287/mnsc.9.1.16, §3, proof of Theorem 2, display (6)).

Problem 1 under Assumption A: the chance laws `q_{ij}(k)` are stochastic, the costs `w_{ik}` are
positive, and for every procedure of `C′` the states form one class. Then for every `D ∈ C′` and
its stationary vector `π` (the unique solution of (5) for `p_{ij} = ∑_k q_{ij}(k) D_{ik}`),
`Q_R(i) = ∑_j π_j ∑_k D_{jk} w_{jk}` for every initial state `i`.

**Formalization Note.** Assumption A is `∀ D ∈ C′, (chainMatrix q D).IsIrreducible`; with stochastic
`q` and `D` the chain matrix is row-stochastic, so this is Derman's "the states `0, ⋯, L` belong
to the same class". `Q_R(i)` is `avgCost`, the real `limsup` of `(1/T) ∑_{t=0}^T W_t`
(a bounded sequence). -/
theorem avg_cost_eq_stationary {S Act : Type*} [Fintype S] [DecidableEq S] [Fintype Act]
    (q : S → Act → S → ℝ) (w : S → Act → ℝ) (hq : IsTransitionLaw q)
    (hw : ∀ i a, 0 < w i a)
    (hA : ∀ D : S → Act → ℝ, IsStationaryRandomized D → (chainMatrix q D).IsIrreducible)
    (D : S → Act → ℝ) (hD : IsStationaryRandomized D)
    (π : S → ℝ) (hπ : JewellMRP.InfiniteStep.IsStationary (chainMatrix q D) π) :
    ∀ i, avgCost q w D i = ∑ j, π j * ∑ a, D j a * w j a := by sorry

end DermanSeqDecisions.LinProg
Source
Derman, On Sequential Decisions and Markov Chains, Management Science 9(1):16–24 (1962), DOI 10.1287/mnsc.9.1.16, p. 20, §3, proof of Theorem 2, display (6)
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me