Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 6.2 — ημ~(π∗)−ημ~(π)≤ε1−γ∥dπ∗,μ~/dπ,μ∥∞\eta_{\tilde\mu}(\pi^*)-\eta_{\tilde\mu}(\pi)\le\frac{\varepsilon}{1-\gamma}\|d_{\pi^*,\tilde\mu}/d_{\pi,\mu}\|_\inftyημ~​​(π∗)−ημ~​​(π)≤1−γε​∥dπ∗,μ~​​/dπ,μ​∥∞​ when OPT(Aπ,μ)<ε\mathrm{OPT}(\mathbb A_{\pi,\mu})<\varepsilonOPT(Aπ,μ​)<ε

Proved
ApproxOptRL.PolicyQuality.policy_quality_bound

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

distribution-mismatchmdpp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1policy-advantagereinforcement-learning

This is the near-optimality guarantee of Kakade and Langford for a policy whose optimal policy advantage is small.

Consider a finite MDP with states SSS, actions 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. Write VπV_\piVπ​ for the normalized value function, dπ,μd_{\pi,\mu}dπ,μ​ for the γ\gammaγ-discounted future state distribution of π\piπ from the start distribution μ\muμ, ημ(π)=Es∼μ[Vπ(s)]\eta_\mu(\pi)=E_{s\sim\mu}[V_\pi(s)]ημ​(π)=Es∼μ​[Vπ​(s)], and OPT(Aπ,μ)=max⁡π′Aπ,μ(π′)\mathrm{OPT}(\mathbb A_{\pi,\mu})=\max_{\pi'}\mathbb A_{\pi,\mu}(\pi')OPT(Aπ,μ​)=maxπ′​Aπ,μ​(π′) for the largest policy advantage over π\piπ under the restart distribution μ\muμ. For a ratio of nonnegative functions, ∥f/g∥∞=max⁡sf(s)/g(s)\|f/g\|_\infty=\max_s f(s)/g(s)∥f/g∥∞​=maxs​f(s)/g(s).

Let μ\muμ be a state distribution and π\piπ a stochastic policy with OPT(Aπ,μ)<ε\mathrm{OPT}(\mathbb A_{\pi,\mu})<\varepsilonOPT(Aπ,μ​)<ε, and let π∗\pi^*π∗ be an optimal policy. Then for every state distribution μ~\tilde\muμ~​,

ημ~(π∗)−ημ~(π)≤ε1−γ∥dπ∗,μ~dπ,μ∥∞≤ε(1−γ)2∥dπ∗,μ~μ∥∞.\eta_{\tilde\mu}(\pi^*)-\eta_{\tilde\mu}(\pi)\le\frac{\varepsilon}{1-\gamma}\left\|\frac{d_{\pi^*,\tilde\mu}}{d_{\pi,\mu}}\right\|_\infty\le\frac{\varepsilon}{(1-\gamma)^2}\left\|\frac{d_{\pi^*,\tilde\mu}}{\mu}\right\|_\infty.ημ~​​(π∗)−ημ~​​(π)≤1−γε​​dπ,μ​dπ∗,μ~​​​​∞​≤(1−γ)2ε​​μdπ∗,μ~​​​​∞​.

Concretely, the statement has three parts:

  1. if dπ∗,μ~(s)≤C dπ,μ(s)d_{\pi^*,\tilde\mu}(s)\le C\,d_{\pi,\mu}(s)dπ∗,μ~​​(s)≤Cdπ,μ​(s) for every sss, then ημ~(π∗)−ημ~(π)≤ε1−γC\eta_{\tilde\mu}(\pi^*)-\eta_{\tilde\mu}(\pi)\le\frac{\varepsilon}{1-\gamma}Cημ~​​(π∗)−ημ~​​(π)≤1−γε​C;
  2. if dπ∗,μ~(s)≤C μ(s)d_{\pi^*,\tilde\mu}(s)\le C\,\mu(s)dπ∗,μ~​​(s)≤Cμ(s) for every sss, then dπ∗,μ~(s)≤C1−γ dπ,μ(s)d_{\pi^*,\tilde\mu}(s)\le\frac{C}{1-\gamma}\,d_{\pi,\mu}(s)dπ∗,μ~​​(s)≤1−γC​dπ,μ​(s) for every sss (the middle inequality, ∥dπ∗,μ~/dπ,μ∥∞≤11−γ∥dπ∗,μ~/μ∥∞\|d_{\pi^*,\tilde\mu}/d_{\pi,\mu}\|_\infty\le\frac1{1-\gamma}\|d_{\pi^*,\tilde\mu}/\mu\|_\infty∥dπ∗,μ~​​/dπ,μ​∥∞​≤1−γ1​∥dπ∗,μ~​​/μ∥∞​);
  3. if dπ∗,μ~(s)≤C μ(s)d_{\pi^*,\tilde\mu}(s)\le C\,\mu(s)dπ∗,μ~​​(s)≤Cμ(s) for every sss, then ημ~(π∗)−ημ~(π)≤ε(1−γ)2C\eta_{\tilde\mu}(\pi^*)-\eta_{\tilde\mu}(\pi)\le\frac{\varepsilon}{(1-\gamma)^2}Cημ~​​(π∗)−ημ~​​(π)≤(1−γ)2ε​C.

The theorem quantifies how good the policy returned by conservative policy iteration is: a small policy advantage with respect to the restart distribution μ\muμ gives near-optimal performance with respect to any other distribution μ~\tilde\muμ~​, at a cost measured by the mismatch between μ~\tilde\muμ~​'s optimal future state distribution and μ\muμ.

Formalization Note The ratio norms are encoded multiplicatively: "X≤K∥f/g∥∞X\le K\|f/g\|_\inftyX≤K∥f/g∥∞​" becomes "X≤K CX\le K\,CX≤KC for every CCC with f≤Cgf\le C gf≤Cg pointwise". The least such CCC is max⁡sf(s)/g(s)\max_s f(s)/g(s)maxs​f(s)/g(s) when g>0g>0g>0; if g(s)=0<f(s)g(s)=0<f(s)g(s)=0<f(s) for some sss, no CCC exists, matching ∥f/g∥∞=+∞\|f/g\|_\infty=+\infty∥f/g∥∞​=+∞; a state with f(s)=g(s)=0f(s)=g(s)=0f(s)=g(s)=0 imposes nothing. No full-support assumption on μ\muμ or μ~\tilde\muμ~​ is made. OPT\mathrm{OPT}OPT is the supremum over stochastic policies. The standing assumptions of the paper's §2 (finite nonempty SSS, AAA; PPP a kernel; rewards in [0,R][0,R][0,R]; 0≤γ<10\le\gamma<10≤γ<1; π\piπ stochastic; μ\muμ, μ~\tilde\muμ~​ distributions) are explicit hypotheses. In Lean, πstar is π∗\pi^*π∗ and μ' is μ~\tilde\muμ~​.

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_PolicyQuality_PolicyAdvantage
open ApproxOptRL.Shared
open FoundationsML.ReinforcementLearning
Formal statement
namespace ApproxOptRL.PolicyQuality

/-- **Theorem 6.2** (Kakade–Langford, ICML 2002, p. 6). Assume that for a policy `π`,
`OPT(𝔸_{π,μ}) < ε`. Let `π*` (`πstar`) be an optimal policy. Then for any state distribution
`μ̃` (`μ'`),
`η_μ̃(π*) - η_μ̃(π) ≤ ε/(1-γ) ‖d_{π*,μ̃}/d_{π,μ}‖_∞ ≤ ε/(1-γ)² ‖d_{π*,μ̃}/μ‖_∞`.

The `l_∞`-norm of a ratio, `‖f/g‖_∞ = max_s f(s)/g(s)` (p. 5), is encoded multiplicatively:
a bound `X ≤ K ‖f/g‖_∞` is stated as `X ≤ K * C` for every `C` with `f s ≤ C * g s` for all
`s`. When some `g s = 0 < f s` no such `C` exists (the norm is `+∞` and the bound is empty);
a state with `f s = g s = 0` imposes nothing. The three conjuncts are the first inequality, the
middle comparison `‖d_{π*,μ̃}/d_{π,μ}‖_∞ ≤ (1/(1-γ)) ‖d_{π*,μ̃}/μ‖_∞`, and the outer bound.
Standing assumptions of the paper's §2: finite nonempty `S`, `A`; transition kernel `P`;
rewards in `[0, R]`; `0 ≤ γ < 1`. -/
theorem policy_quality_bound {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 μ)
    (π : S → A → ℝ) (hπ : IsPolicy π)
    (ε : ℝ) (h : optPolicyAdvantage P r γ π μ < ε)
    (πstar : S → A → ℝ) (hπstar : IsOptimalPolicy P r γ πstar)
    (μ' : S → ℝ) (hμ' : IsStateDist μ') :
    (∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * futureStateDist P γ π μ s) →
        eta P r γ πstar μ' - eta P r γ π μ' ≤ ε / (1 - γ) * C) ∧
    (∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * μ s) →
        ∀ s, futureStateDist P γ πstar μ' s ≤ C / (1 - γ) * futureStateDist P γ π μ s) ∧
    (∀ C : ℝ, (∀ s, futureStateDist P γ πstar μ' s ≤ C * μ s) →
        eta P r γ πstar μ' - eta P r γ π μ' ≤ ε / (1 - γ) ^ 2 * C) := by sorry

end ApproxOptRL.PolicyQuality
Source
Kakade, Langford, Approximately Optimal Approximate Reinforcement Learning, ICML 2002, p. 6, Theorem 6.2 (proof p. 7); l_∞-norm of ratios as defined on p. 5
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