Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 6.1 — performance difference: ημ(π~)−ημ(π)=11−γE(a,s)∼π~dπ~,μ[Aπ(s,a)]\eta_\mu(\tilde\pi)-\eta_\mu(\pi)=\frac1{1-\gamma}E_{(a,s)\sim\tilde\pi d_{\tilde\pi,\mu}}[A_\pi(s,a)]ημ​(π~)−ημ​(π)=1−γ1​E(a,s)∼π~dπ~,μ​​[Aπ​(s,a)]

Proved
ApproxOptRL.CPI.performance_difference

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

mdpp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1performance-differencereinforcement-learning

Consider a finite MDP with nonempty state set SSS, nonempty action set AAA, transition probabilities P(s′;s,a)P(s';s,a)P(s′;s,a), rewards R(s,a)∈[0,R]\mathcal R(s,a)\in[0,R]R(s,a)∈[0,R] with R>0R>0R>0, and discount factor 0≤γ<10\le\gamma<10≤γ<1. Let VπV_\piVπ​, AπA_\piAπ​, dπ,μd_{\pi,\mu}dπ,μ​ and ημ(π)=Es∼μ[Vπ(s)]\eta_\mu(\pi)=E_{s\sim\mu}[V_\pi(s)]ημ​(π)=Es∼μ​[Vπ​(s)] be the normalized value function, the advantage, the discounted future state distribution and the performance measure.

For any policies π~\tilde\piπ~ and π\piπ and any starting state distribution μ\muμ,

ημ(π~)−ημ(π)=11−γ E(a,s)∼π~dπ~,μ[Aπ(s,a)]=11−γ∑sdπ~,μ(s)∑aπ~(a;s) Aπ(s,a).\eta_\mu(\tilde\pi) - \eta_\mu(\pi) = \frac{1}{1-\gamma}\,E_{(a,s)\sim\tilde\pi d_{\tilde\pi,\mu}}\big[A_\pi(s,a)\big] = \frac{1}{1-\gamma}\sum_s d_{\tilde\pi,\mu}(s)\sum_a\tilde\pi(a;s)\,A_\pi(s,a).ημ​(π~)−ημ​(π)=1−γ1​E(a,s)∼π~dπ~,μ​​[Aπ​(s,a)]=1−γ1​s∑​dπ~,μ​(s)a∑​π~(a;s)Aπ​(s,a).

The states are weighted by dπ~,μd_{\tilde\pi,\mu}dπ~,μ​, the discounted future state distribution of the new policy π~\tilde\piπ~, while the advantage is that of the old policy π\piπ. The identity expresses the change of performance exactly through the advantages of the old policy, and it is the basic tool behind the improvement bound for the conservative update (Theorem 4.1) and the quality bound for policies with small policy advantage.

Formalization Note The Lean variable πt stands for π~\tilde\piπ~. The hypotheses (transition kernel, rewards in [0,R][0,R][0,R], 0≤γ<10\le\gamma<10≤γ<1, policies, state distribution) are the paper's standing assumptions of §2.

Preamble
import Mathlib
import Definitions.Def_FoundationsML_ReinforcementLearning_IsTransitionKernel
import Definitions.Def_FoundationsML_ReinforcementLearning_IsPolicy
import Definitions.Def_ApproxOptRL_Shared_Model
open ApproxOptRL.Shared
open FoundationsML.ReinforcementLearning
Formal statement
namespace ApproxOptRL.CPI

/-- **Lemma 6.1** (Kakade–Langford, ICML 2002, p. 6). For any policies `π̃` and `π` and any
starting state distribution `μ`,
`η_μ(π̃) - η_μ(π) = (1/(1-γ)) E_{(a,s) ∼ π̃ d_{π̃,μ}}[A_π(s, a)]`.
The states are weighted by `d_{π̃,μ}`, the discounted future state distribution of the **new**
policy `π̃`, and the actions by `π̃`; the advantage is that of the old policy `π`.
In Lean, `πt` stands for the paper's `π̃`.
Standing assumptions of the paper's §2: finite nonempty `S`, `A`; transition kernel `P`;
rewards in `[0, R]`; `0 ≤ γ < 1`. -/
theorem performance_difference {S A : Type} [Fintype S] [Fintype A] [DecidableEq S]
    [Nonempty S] [Nonempty A]
    (P : S → A → S → ℝ) (hP : IsTransitionKernel P)
    (r : S → A → ℝ) (R : ℝ) (hR : 0 < R) (hr : ∀ s a, 0 ≤ r s a ∧ r s a ≤ R)
    (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1)
    (μ : S → ℝ) (hμ : IsStateDist μ)
    (πt π : S → A → ℝ) (hπt : IsPolicy πt) (hπ : IsPolicy π) :
    eta P r γ πt μ - eta P r γ π μ =
      1 / (1 - γ) * ∑ s, futureStateDist P γ πt μ s * ∑ a, πt s a * advantage P r γ π s a := by sorry

end ApproxOptRL.CPI
Source
Kakade, Langford, Approximately Optimal Approximate Reinforcement Learning, ICML 2002, p. 6, Lemma 6.1
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

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