Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2, p. 7 — performance difference: ρ(π′) − ρ(π) = E_{s∼ν^{π′}}[⟨Q̄^π(s,·), π′(·|s) − π(·|s)⟩ + h^{π′}(s) − h^π(s)]

Proved
AvgRewardPMD.SPMD.lemma_2

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

average-reward-mdpp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1performance-difference-lemmareinforcement-learning

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 and let h:S×Δ∣A∣→Rh:\mathcal S\times\Delta_{|\mathcal A|}\to\mathbb Rh:S×Δ∣A∣​→R be a regularizer, hπ(s)=hs(π(⋅∣s))h^\pi(s)=h_s(\pi(\cdot\mid s))hπ(s)=hs​(π(⋅∣s)). For a policy π\piπ write ρ(π)\rho(\pi)ρ(π) and Qˉπ\bar Q^\piQˉ​π for the average cost and the basic differential Q-function of the regularized cost c(s,a)+hπ(s)c(s,a)+h^\pi(s)c(s,a)+hπ(s). Then for any two feasible policies π,π′\pi,\pi'π,π′, with νπ′\nu^{\pi'}νπ′ the stationary distribution of Pπ′P_{\pi'}Pπ′​,

ρ(π′)−ρ(π)=Es∼νπ′[⟨Qˉπ(s,⋅),π′(⋅∣s)−π(⋅∣s)⟩+hπ′(s)−hπ(s)].(3.2)\rho(\pi')-\rho(\pi)=\mathbb E_{s\sim\nu^{\pi'}}\Big[\big\langle\bar Q^\pi(s,\cdot),\pi'(\cdot\mid s)-\pi(\cdot\mid s)\big\rangle+h^{\pi'}(s)-h^\pi(s)\Big].\qquad(3.2)ρ(π′)−ρ(π)=Es∼νπ′​[⟨Qˉ​π(s,⋅),π′(⋅∣s)−π(⋅∣s)⟩+hπ′(s)−hπ(s)].(3.2)

This is the average-reward performance difference lemma. It turns the optimality gap ρ(π)−ρ(π∗)\rho(\pi)-\rho(\pi^*)ρ(π)−ρ(π∗) into an expectation over the comparator's stationary distribution of a linear term in the policy, which is what the policy mirror descent analysis (Lemma 4) controls step by step.

Formalization Note ρ\rhoρ is evaluated at an arbitrary start state s0s_0s0​; it does not depend on it under Assumption 1. νπ′\nu^{\pi'}νπ′ is any stationary distribution of Pπ′P_{\pi'}Pπ′​ (unique under Assumption 1).

Differences from the source:

  • generalization: h^π a closed convex function of the policy satisfying (2.2) → any real function h_s(π(·|s)) of the state and of the policy at that state; reason: the identity uses no convexity; a regularizer satisfying (2.2) is an instance
  • encoding: ρ(π), a scalar → ρ^π(s_0) for an arbitrary start state s_0; reason: ρ^π(s) does not depend on s under Assumption 1 (milestone 1)
  • encoding: ν^{π′}, the stationary distribution → any stationary distribution ν′ of P_{π′}; reason: unique under Assumption 1
  • reading: Q̄^π as the expectation of the series of c(s_t,a_t) + h^π(s_t) − ρ^π → the series of the expectations; reason: the pathwise series need not converge, the series of expectations converges absolutely under Assumption 1
Preamble
import Mathlib
import Definitions.Def_AvgRewardPMD_SPMD_Setting
Formal statement
namespace AvgRewardPMD.SPMD

open FoundationsML.ReinforcementLearning

theorem lemma_2 {S A : Type*} [Fintype S] [Fintype A] [DecidableEq S] [DecidableEq A]
    (P : S → A → S → ℝ) (hP : IsTransitionKernel P) (hmix : IsMixing P)
    (c : S → A → ℝ) (h : S → (A → ℝ) → ℝ)
    (π π' : S → A → ℝ) (hπ : IsPolicy π) (hπ' : IsPolicy π') (ν' : S → ℝ)
    (hν' : MarkovMixing.IsStationary (stateMatrix P π') ν') (s₀ : S) :
    avgCost P π' (fun s a => c s a + h s (π' s)) s₀ - avgCost P π (fun s a => c s a + h s (π s)) s₀
      = ∑ s, ν' s * (∑ a, diffQ P π (fun s a => c s a + h s (π s)) (s, a) * (π' s a - π s a)
          + h s (π' s) - h s (π s)) := by sorry

end AvgRewardPMD.SPMD
Source
Li, Wu, Lan, Stochastic first-order methods for average-reward Markov decision processes, arXiv:2205.05800v6, p. 7, Lemma 2 (3.2)
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