Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 6 — on a mixing AMDP the average cost is the stationary mean: ρ^π(s) = ⟨ν^π, c^π⟩ for every s

Proved
AvgRewardPMD.SPMD.avg_cost_eq_stationary

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

average-reward-mdpmarkov-chainp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1stationary-distribution

Let M=(S,A,P,c′)\mathcal M=(\mathcal S,\mathcal A,\mathsf P,c')M=(S,A,P,c′) be a finite AMDP satisfying the mixing Assumption 1, let π\piπ be a feasible policy, and let ν\nuν be a stationary distribution of PπP_\piPπ​. Then for every start state sss the Cesàro means of the expected costs converge, and

ρπ(s)=lim⁡T→∞1T∑t=0T−1(Pπtc′π)(s)=⟨ν,c′π⟩=∑s′ν(s′)∑ac′(s′,a)π(a∣s′).\rho^\pi(s)=\lim_{T\to\infty}\frac1T\sum_{t=0}^{T-1}(P_\pi^t c'^\pi)(s)=\langle\nu,c'^\pi\rangle=\sum_{s'}\nu(s')\sum_a c'(s',a)\pi(a\mid s').ρπ(s)=T→∞lim​T1​t=0∑T−1​(Pπt​c′π)(s)=⟨ν,c′π⟩=s′∑​ν(s′)a∑​c′(s′,a)π(a∣s′).

In particular the average cost does not depend on the start state. Taking c′(s,a)=c(s,a)+hπ(s)c'(s,a)=c(s,a)+h^\pi(s)c′(s,a)=c(s,a)+hπ(s) gives the paper's ρπ=⟨νπ,cπ+hπ⟩\rho^\pi=\langle\nu^\pi,c^\pi+h^\pi\rangleρπ=⟨νπ,cπ+hπ⟩, the scalar every later statement of the mission calls ρ(π)\rho(\pi)ρ(π).

Formalization Note The cost is an arbitrary c′:S×A→Rc':\mathcal S\times\mathcal A\to\mathbb Rc′:S×A→R; a regularizer enters through it. The conclusion states the convergence of the Cesàro means as well as the value of avgCost.

Differences from the source:

  • generalization: the cost c + h^π → any cost c′(s,a); reason: c′(s,a) = c(s,a) + h^π(s) is an instance, and then c′^π = c^π + h^π because π(·|s) sums to one
  • encoding: ν^π, the stationary distribution → any stationary distribution ν of P_π; reason: under Assumption 1 the stationary distribution is unique, so this is the same object
  • encoding: ρ^π(s) := lim_{T→∞} of the Cesàro means, whose existence (2.1) presupposes → the Cesàro means converge to ⟨ν, c′^π⟩, and avgCost (a limUnder) equals that value; reason: limUnder returns a default value when no limit exists, so the existence the source takes for granted is stated explicitly; no instance changes
Preamble
import Mathlib
import Definitions.Def_AvgRewardPMD_SPMD_Setting
Formal statement
namespace AvgRewardPMD.SPMD

open FoundationsML.ReinforcementLearning Filter Topology

theorem avg_cost_eq_stationary {S A : Type*} [Fintype S] [Fintype A] [DecidableEq S]
    [DecidableEq A] (P : S → A → S → ℝ) (hP : IsTransitionKernel P) (hmix : IsMixing P)
    (π : S → A → ℝ) (hπ : IsPolicy π) (ν : S → ℝ)
    (hν : MarkovMixing.IsStationary (stateMatrix P π) ν) (c : S → A → ℝ) :
    ∀ s, Tendsto (fun T : ℕ => (T : ℝ)⁻¹ *
          ∑ t ∈ Finset.range T, (((stateMatrix P π) ^ t).mulVec (InducedReward π c)) s)
        atTop (𝓝 (∑ s', ν s' * InducedReward π c s')) ∧
      avgCost P π c s = ∑ s', ν s' * InducedReward π c s' := by sorry

end AvgRewardPMD.SPMD
Source
Li, Wu, Lan, Stochastic first-order methods for average-reward Markov decision processes, arXiv:2205.05800v6, p. 6, §2.1, display after Assumption 1 (ρ^π(s) = ρ^π := ⟨ν^π, c^π + h^π⟩)
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 24, 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