Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary E.7 (as proved, with Pinsker's constant): discounted state distributions of nearby policies

Proved
MBRLGuarantees.occ_lOneDist_le_sqrt_two_kappa_dKL

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

chi-square-divergencediscrepancy-boundsmarkov-decision-processesmodel-based-rlreinforcement-learning

Let γ∈[0,1)\gamma\in[0,1)γ∈[0,1), S0∼μ0S_0\sim\mu_0S0​∼μ0​, let MMM be a dynamical model and π,π′\pi,\pi'π,π′ two policies with s↦KL(π(⋅∣s),π′(⋅∣s))s\mapsto\mathrm{KL}(\pi(\cdot\mid s),\pi'(\cdot\mid s))s↦KL(π(⋅∣s),π′(⋅∣s)) measurable. Then the discounted state distributions of π\piπ and π′\pi'π′ on MMM satisfy

∣ρπ−ρπ′∣1≤2 γ1−γ ES∼ρπ[KL(π(⋅∣S),π′(⋅∣S))1/2]=2 κ dKL(π,π′).|\rho^{\pi}-\rho^{\pi'}|_1\le\sqrt2\,\frac{\gamma}{1-\gamma}\,\mathbb E_{S\sim\rho^{\pi}}\Big[\mathrm{KL}\big(\pi(\cdot\mid S),\pi'(\cdot\mid S)\big)^{1/2}\Big]=\sqrt2\,\kappa\,d^{\mathrm{KL}}(\pi,\pi').∣ρπ−ρπ′∣1​≤2​1−γγ​ES∼ρπ​[KL(π(⋅∣S),π′(⋅∣S))1/2]=2​κdKL(π,π′).

This is the step that lets the bounds of Section 4 replace the state distribution of π\piπ by that of a nearby reference policy.

Formalization Note The paper prints the bound without the factor 2\sqrt22​. Its proof applies Pinsker's inequality as ∣p−q∣1≤KL(p,q)1/2|p-q|_1\le\mathrm{KL}(p,q)^{1/2}∣p−q∣1​≤KL(p,q)1/2, but Pinsker's inequality is ∣p−q∣1≤2 KL(p,q)|p-q|_1\le\sqrt{2\,\mathrm{KL}(p,q)}∣p−q∣1​≤2KL(p,q)​, and the printed bound fails for two states with γ=0.1\gamma=0.1γ=0.1 (see the mission report). The model MMM is arbitrary; the paper uses M⋆M^\starM⋆.

Preamble
import Mathlib
import Definitions.Def_MBRLGuarantees_Basic

open MeasureTheory ProbabilityTheory InformationTheory
open scoped ENNReal
Formal statement
namespace MBRLGuarantees

theorem occ_lOneDist_le_sqrt_two_kappa_dKL {S A : Type*} [MeasurableSpace S] [MeasurableSpace A]
    (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1) (μ₀ : Measure S) [IsProbabilityMeasure μ₀]
    (M : Kernel (S × A) S) [IsMarkovKernel M] (pi pi' : Kernel S A) [IsMarkovKernel pi]
    [IsMarkovKernel pi'] (hKL : Measurable fun s => klDiv (pi s) (pi' s)) :
    lOneDist (occ γ μ₀ pi M) (occ γ μ₀ pi' M) ≤
      ENNReal.ofReal (Real.sqrt 2 * kappa γ) * dKL γ μ₀ M pi pi' := by sorry

end MBRLGuarantees
Source
Luo, Xu, Li, Tian, Darrell and Ma, Algorithmic Framework for Model-based Deep Reinforcement Learning with Theoretical Guarantees, arXiv:1807.03858v5 (ICLR 2019), Appendix E, Corollary E.7, p. 23 (with Claim E.6, p. 23)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let SSS and AAA be arbitrary measurable spaces of states and actions. Let γ\gammaγ be a real number with 0≤γ<10 \le \gamma < 10≤γ<1. Let μ0\mu_0μ0​ be a probability measure on SSS, the initial-state distribution. Let M(⋅∣s,a)M(\cdot \mid s, a)M(⋅∣s,a) be a Markov kernel from S×AS \times AS×A to SSS, the dynamics model. Let π(⋅∣s)\pi(\cdot \mid s)π(⋅∣s) and π′(⋅∣s)\pi'(\cdot \mid s)π′(⋅∣s) be two Markov kernels from SSS to AAA, the policies. The only further hypothesis is that the map

s↦KL(π(⋅∣s) ∥ π′(⋅∣s))∈[0,∞]s \mapsto \mathrm{KL}\big(\pi(\cdot\mid s)\,\|\,\pi'(\cdot\mid s)\big) \in [0,\infty]s↦KL(π(⋅∣s)∥π′(⋅∣s))∈[0,∞]

is measurable. Here KL(p∥q)\mathrm{KL}(p\|q)KL(p∥q) is the Kullback–Leibler divergence. It equals +∞+\infty+∞ when ppp is not absolutely continuous with respect to qqq, or when the log-likelihood ratio is not integrable.

Objects involved.

  • For a policy σ\sigmaσ, the state transition kernel on MMM is
Pσ(B∣s)=∫AM(B∣s,a) σ(da∣s).P_\sigma(B \mid s) = \int_A M(B \mid s, a)\, \sigma(da \mid s).Pσ​(B∣s)=∫A​M(B∣s,a)σ(da∣s).
  • PσtP_\sigma^tPσt​ is its ttt-step iterate, with Pσ0P_\sigma^0Pσ0​ the identity kernel and Pσt+1=Pσ∘PσtP_\sigma^{t+1} = P_\sigma \circ P_\sigma^tPσt+1​=Pσ​∘Pσt​.
  • The discounted state distribution of σ\sigmaσ on MMM from μ0\mu_0μ0​ is the measure
ρσ=(1−γ)∑t=0∞γt μ0Pσt,\rho^{\sigma} = (1-\gamma)\sum_{t=0}^{\infty} \gamma^t\, \mu_0 P_\sigma^t ,ρσ=(1−γ)t=0∑∞​γtμ0​Pσt​,

where μ0Pσt\mu_0 P_\sigma^tμ0​Pσt​ is the law of the state at time ttt. Under the stated assumptions, ρσ\rho^\sigmaρσ has total mass 111.

  • The "ℓ1\ell_1ℓ1​ distance" between two measures ρ,ρ′\rho, \rho'ρ,ρ′ on SSS is defined in its dual form as the [0,∞][0,\infty][0,∞]-valued quantity
∣ρ−ρ′∣1=sup⁡{max⁡(0, ∫f dρ−∫f dρ′)  :  f:S→R measurable, ∣f(x)∣≤1 ∀x}.|\rho - \rho'|_1 = \sup\Big\{ \max\Big(0,\ \int f\, d\rho - \int f\, d\rho'\Big) \;:\; f : S \to \mathbb{R} \text{ measurable},\ |f(x)| \le 1 \ \forall x \Big\}.∣ρ−ρ′∣1​=sup{max(0, ∫fdρ−∫fdρ′):f:S→R measurable, ∣f(x)∣≤1 ∀x}.
  • The policy distance is the [0,∞][0,\infty][0,∞]-valued lower Lebesgue integral
dKL(π,π′)=∫SKL(π(⋅∣s) ∥ π′(⋅∣s))1/2 dρπ(s).d^{\mathrm{KL}}(\pi, \pi') = \int_S \mathrm{KL}\big(\pi(\cdot\mid s)\,\|\,\pi'(\cdot\mid s)\big)^{1/2}\, d\rho^{\pi}(s).dKL(π,π′)=∫S​KL(π(⋅∣s)∥π′(⋅∣s))1/2dρπ(s).

Note that it is averaged over ρπ\rho^{\pi}ρπ, the discounted state distribution of the first policy π\piπ, not π′\pi'π′. It is taken with ∞1/2=∞\infty^{1/2} = \infty∞1/2=∞.

  • The constant is κ=γ/(1−γ)\kappa = \gamma/(1-\gamma)κ=γ/(1−γ).

Conclusion. The theorem asserts, as an inequality in [0,∞][0,\infty][0,∞],

∣ρπ−ρπ′∣1  ≤  2 κ⋅dKL(π,π′)=2 γ1−γ ∫SKL(π(⋅∣s) ∥ π′(⋅∣s))1/2 dρπ(s),|\rho^{\pi} - \rho^{\pi'}|_1 \;\le\; \sqrt{2}\,\kappa \cdot d^{\mathrm{KL}}(\pi, \pi') = \sqrt{2}\,\frac{\gamma}{1-\gamma}\, \int_S \mathrm{KL}\big(\pi(\cdot\mid s)\,\|\,\pi'(\cdot\mid s)\big)^{1/2}\, d\rho^{\pi}(s),∣ρπ−ρπ′∣1​≤2​κ⋅dKL(π,π′)=2​1−γγ​∫S​KL(π(⋅∣s)∥π′(⋅∣s))1/2dρπ(s),

where the left side uses ρπ\rho^\piρπ as the first argument and ρπ′\rho^{\pi'}ρπ′ as the second. Both distributions are computed on the same model MMM from the same μ0\mu_0μ0​.

Edge cases.

  • The product follows the extended-real convention 0⋅∞=00 \cdot \infty = 00⋅∞=0.
  • When γ=0\gamma = 0γ=0, both sides reduce to the case ρπ=ρπ′=μ0\rho^\pi = \rho^{\pi'} = \mu_0ρπ=ρπ′=μ0​, and the right-hand side is 000 even if dKL=∞d^{\mathrm{KL}} = \inftydKL=∞.
  • When γ>0\gamma > 0γ>0 and the KL divergence is infinite on a set of positive ρπ\rho^\piρπ-measure, the right-hand side is +∞+\infty+∞.
Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 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