Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 7.3.1 — advantages at most ε/H under ν give Vπ(s0)≥Vπ′(s0)−ε−H∥dπ′,s0−ν∥1V_\pi(s_0)\ge V_{\pi'}(s_0)-\varepsilon-H\|d_{\pi',s_0}-\nu\|_1Vπ​(s0​)≥Vπ′​(s0​)−ε−H∥dπ′,s0​​−ν∥1​

Proved
SampleComplexityRL.CPI.mu_optimality

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

dynamic-programmingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1reinforcement-learning

Consider a finite MDP with nonempty state set SSS, nonempty action set AAA, transition kernel PPP, rewards r(s,a)∈[0,1]r(s,a)\in[0,1]r(s,a)∈[0,1] and discount 0≤γ<10\le\gamma<10≤γ<1, with normalized values VπV_\piVπ​ and advantages AπA_\piAπ​. Let H=1/(1−γ)H=1/(1-\gamma)H=1/(1−γ) and let Π\PiΠ be a class of stationary policies. For a state distribution ν\nuν and a policy hhh write Aπ(ν,h)=Es∼νEa∼h(⋅∣s)[Aπ(s,a)]A_\pi(\nu,h)=\mathbb E_{s\sim\nu}\mathbb E_{a\sim h(\cdot\mid s)}[A_\pi(s,a)]Aπ​(ν,h)=Es∼ν​Ea∼h(⋅∣s)​[Aπ​(s,a)], and let dπ′,s0d_{\pi',s_0}dπ′,s0​​ be the discounted future state distribution of π′\pi'π′ started at s0s_0s0​.

Let π\piπ be a stationary policy and ν\nuν a distribution such that

Aπ(ν,h)≤εHfor all h∈Π.A_\pi(\nu,h)\le\frac{\varepsilon}{H}\qquad\text{for all }h\in\Pi.Aπ​(ν,h)≤Hε​for all h∈Π.

Then for every policy π′∈Π\pi'\in\Piπ′∈Π and every state s0s_0s0​,

Vπ(s0) ≥ Vπ′(s0)−ε−H ∥dπ′,s0−ν∥1,∥p−q∥1=∑s∣p(s)−q(s)∣.V_\pi(s_0)\ \ge\ V_{\pi'}(s_0)-\varepsilon-H\,\|d_{\pi',s_0}-\nu\|_1,\qquad \|p-q\|_1=\sum_s|p(s)-q(s)|.Vπ​(s0​) ≥ Vπ′​(s0​)−ε−H∥dπ′,s0​​−ν∥1​,∥p−q∥1​=s∑​∣p(s)−q(s)∣.

A policy whose average advantages under ν\nuν are small competes with every policy of the class whose future state distribution is close to ν\nuν. With ν=dπ,μ\nu=d_{\pi,\mu}ν=dπ,μ​ this is the guarantee that motivates the output condition of conservative policy iteration.

Formalization Note The hypothesis is on the advantage Aπ(ν,h)A_\pi(\nu,h)Aπ​(ν,h) of Definition 7.1.1, weighted by ν\nuν, and not on the future advantage. The policy π\piπ need not belong to Π\PiΠ, and ε\varepsilonε is any real number.

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

/-- **Theorem 7.3.1** (Kakade 2003, p. 89). Let `Pi` be a class of stationary policies. If `π`
is a policy such that, for the distribution `ν` and every `h ∈ Pi`, `A_π(ν, h) ≤ ε/H`, then for
every `π' ∈ Pi` and every start state `s₀`,
`V_π(s₀) ≥ V_{π'}(s₀) − ε − H ‖d_{π',s₀} − ν‖₁`.
Normalized discounted values; `H = 1/(1 − γ)`; `A_π(ν, h)` is the advantage of Definition 7.1.1
(state weights `ν`, not the future distribution). -/
theorem mu_optimality {S A : Type} [Fintype S] [DecidableEq S] [Fintype A]
    [Nonempty S] [Nonempty A]
    (P : S → A → S → ℝ) (hP : IsTransitionKernel P)
    (r : S → A → ℝ) (hr : ∀ s a, 0 ≤ r s a ∧ r s a ≤ 1)
    (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1)
    (Pi : Set (S → A → ℝ)) (hPi : ∀ h ∈ Pi, IsPolicy h)
    (π : S → A → ℝ) (hπ : IsPolicy π)
    (ν : S → ℝ) (hν : IsStateDist ν) (ε : ℝ)
    (hadv : ∀ h ∈ Pi, distAdvantage P r γ π ν h ≤ ε / horizon γ) :
    ∀ π' ∈ Pi, ∀ s₀ : S,
      value P r γ π' s₀ - ε - horizon γ * l1Dist (futureStateDist P γ π' (pointMass s₀)) ν ≤
        value P r γ π s₀ := by sorry

end SampleComplexityRL.CPI
Source
Kakade, On the Sample Complexity of Reinforcement Learning, PhD thesis, University College London, 2003, p. 89, Theorem 7.3.1
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

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