Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(4): the expected cost of a cycle from i is (1/πi)∑jπjf(j)(1/\pi_i)\sum_j \pi_j f(j)(1/πi​)∑j​πj​f(j)

Proved
DermanSeqDecisions.LinProg.taboo_identity

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

markov-chainp2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1stationary-distributiontaboo-probability

Let {pij}\{p_{ij}\}{pij​} be the transition probabilities of a Markov chain with finite state set III, all states belonging to the same class, and let π\piπ be its stationary distribution (the unique solution of πj≥0\pi_j \ge 0πj​≥0, πj=∑iπipij\pi_j = \sum_i \pi_i p_{ij}πj​=∑i​πi​pij​, ∑jπj=1\sum_j \pi_j = 1∑j​πj​=1). Let ipij(t){}_i p^{(t)}_{ij}i​pij(t)​ be the taboo probability that Xt=jX_t = jXt​=j and Xs≠iX_s \ne iXs​=i for 0<s<t0 < s < t0<s<t, given X0=iX_0 = iX0​=i, with ipij(0)=0{}_i p^{(0)}_{ij} = 0i​pij(0)​=0. Then for every function fff on III and every i∈Ii \in Ii∈I, each series ∑tipij(t)\sum_t {}_i p^{(t)}_{ij}∑t​i​pij(t)​ converges and

∑t=0∞∑j∈Iipij(t)f(j)=∑j∈I∑t=0∞ipij(t)f(j)=1πi∑j∈Iπjf(j).\sum_{t=0}^{\infty} \sum_{j \in I} {}_i p^{(t)}_{ij} f(j) = \sum_{j \in I} \sum_{t=0}^{\infty} {}_i p^{(t)}_{ij} f(j) = \frac{1}{\pi_i} \sum_{j \in I} \pi_j f(j).t=0∑∞​j∈I∑​i​pij(t)​f(j)=j∈I∑​t=0∑∞​i​pij(t)​f(j)=πi​1​j∈I∑​πj​f(j).

The left side is the expected total of fff collected over one excursion from iii back to iii. Derman uses the identity on the chain with the adjoined state −1-1−1 to express the expected total cost of Problem 2 through the stationary distribution.

Formalization Note. "All states in one class" is JewellMRP.InfiniteStep.IsErgodic: row-stochastic and irreducible (periodic chains allowed). The summability of the series is part of the conclusion.

Preamble
import Mathlib
import Definitions.Def_JewellMRP_InfiniteStep_Model
import Definitions.Def_DermanSeqDecisions_LinProg_Model

open Matrix
Formal statement
namespace DermanSeqDecisions.LinProg

/-- (4), p. 20 (Derman, *On Sequential Decisions and Markov Chains*, Management Science 9(1):16–24 (1962), DOI 10.1287/mnsc.9.1.16, §3, display (4), unnumbered result quoted from Chung).

Let `P` be the transition matrix of a Markov chain with finite state set `I`, all states belonging
to the same class (`P` row-stochastic and irreducible), let `π` be its stationary vector (5), let
`f : I → ℝ` and `i ∈ I`. Then for every `j` the taboo probabilities `_i p^{(t)}_{ij}` are summable
in `t`, the series `∑_t ∑_j _i p^{(t)}_{ij} f(j)` converges to `∑_j ∑_t _i p^{(t)}_{ij} f(j)`, and that
value equals `(1/π_i) ∑_j π_j f(j)`.

**Formalization Note.** "All states belonging to the same class" is
`JewellMRP.InfiniteStep.IsErgodic P` (row-stochastic and `Matrix.IsIrreducible`; periodic chains
are allowed). The summability of the taboo series is part of the conclusion, so no `tsum` takes a
junk value. -/
theorem taboo_identity {I : Type*} [Fintype I] [DecidableEq I]
    (P : Matrix I I ℝ) (hP : JewellMRP.InfiniteStep.IsErgodic P)
    (π : I → ℝ) (hπ : JewellMRP.InfiniteStep.IsStationary P π) (f : I → ℝ) (i : I) :
    (∀ j, Summable (fun t : ℕ => tabooProb P i t j)) ∧
    HasSum (fun t : ℕ => ∑ j, tabooProb P i t j * f j) (∑ j, ∑' t : ℕ, tabooProb P i t j * f j) ∧
    ∑ j, ∑' t : ℕ, tabooProb P i t j * f j = (1 / π i) * ∑ j, π j * f j := 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, display (4)
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