Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2: local representation quality bound

Proved
DeepMDP.local_representation_quality

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

bisimulation-metricsmarkov-decision-processesreinforcement-learningrepresentation-learningwasserstein-distance

Let MMM, Mˉ\bar MMˉ, ϕ\phiϕ, πˉ\bar\piπˉ, KVˉK_{\bar V}KVˉ​ and the stationary distribution ξ\xiξ of πˉ\bar\piπˉ in MMM be as in Lemma 3, with local losses measured under ξπˉ(s,a)=ξ(s)πˉ(a∣ϕ(s))\xi_{\bar\pi}(s,a)=\xi(s)\bar\pi(a|\phi(s))ξπˉ​(s,a)=ξ(s)πˉ(a∣ϕ(s)). For any two states s1,s2∈Ss_1,s_2\in Ss1​,s2​∈S with ξ(s1)>0\xi(s_1)>0ξ(s1​)>0 and ξ(s2)>0\xi(s_2)>0ξ(s2​)>0,

∣Vπˉ(s1)−Vπˉ(s2)∣≤KVˉ dSˉ(ϕ(s1),ϕ(s2))+LRˉξπˉ+γKVˉLPˉξπˉ1−γ(1ξ(s1)+1ξ(s2)).\big|V^{\bar\pi}(s_1)-V^{\bar\pi}(s_2)\big|\le K_{\bar V}\,d_{\bar S}(\phi(s_1),\phi(s_2))+\frac{L^{\xi_{\bar\pi}}_{\bar R}+\gamma K_{\bar V}L^{\xi_{\bar\pi}}_{\bar P}}{1-\gamma}\left(\frac1{\xi(s_1)}+\frac1{\xi(s_2)}\right).​Vπˉ(s1​)−Vπˉ(s2​)​≤KVˉ​dSˉ​(ϕ(s1​),ϕ(s2​))+1−γLRˉξπˉ​​+γKVˉ​LPˉξπˉ​​​(ξ(s1​)1​+ξ(s2​)1​).

The representation guarantee of Theorem 1 thus holds for states that the policy visits often.

Formalization Note The paper writes dπˉ(s)d_{\bar\pi}(s)dπˉ​(s), which it does not define. The proof uses dπˉ(s)=ξπˉ(s)d_{\bar\pi}(s)=\xi_{\bar\pi}(s)dπˉ​(s)=ξπˉ​(s), the stationary probability of sss, and that is what is formalized. The paper's expression 1/dπˉ(s)1/d_{\bar\pi}(s)1/dπˉ​(s) requires ξ(s)>0\xi(s)>0ξ(s)>0, which is a hypothesis here. Both sides are compared in [0,∞][0,\infty][0,∞].

Preamble
import Mathlib
import Definitions.Def_DeepMDP_Basic

open MeasureTheory ProbabilityTheory Filter
open scoped ENNReal NNReal
Formal statement
namespace DeepMDP

theorem local_representation_quality {S Sb A : Type*} [MeasurableSpace S] [DiscreteMeasurableSpace S] [Countable S]
    [MetricSpace Sb] [MeasurableSpace Sb] [BorelSpace Sb]
    [Fintype A] [Nonempty A] [MeasurableSpace A] [MeasurableSingletonClass A]
    (R : S → A → ℝ) (P : A → Kernel S S) (Rb : Sb → A → ℝ) (Pb : A → Kernel Sb Sb) (γ : ℝ)
    (φ : S → Sb) (hM : IsMDP R P γ) (hMb : IsMDP Rb Pb γ)
    (KRb KPb : ℝ≥0) (hLip : IsLipschitzMDP Rb Pb KRb KPb) (hA1 : γ * (KPb : ℝ) < 1)
    (πb : Kernel Sb A) [IsMarkovKernel πb] (KV : ℝ≥0) (hπ : IsLipschitzValued Rb Pb γ πb KV)
    (ξ : Measure S) (hξ : IsStationary P (liftPolicy πb φ) ξ)
    (s₁ s₂ : S) (h₁ : 0 < ξ {s₁}) (h₂ : 0 < ξ {s₂}) :
    ENNReal.ofReal |vValue R P γ (liftPolicy πb φ) s₁ - vValue R P γ (liftPolicy πb φ) s₂| ≤
      (KV : ℝ≥0∞) * edist (φ s₁) (φ s₂) +
        (rewardLossLocal (stateActionDist ξ (liftPolicy πb φ)) R Rb φ +
          ENNReal.ofReal γ * (KV : ℝ≥0∞) * transLossLocal (stateActionDist ξ (liftPolicy πb φ)) P Pb φ) /
          ENNReal.ofReal (1 - γ) * ((ξ {s₁})⁻¹ + (ξ {s₂})⁻¹) := by sorry

end DeepMDP
Source
Gelada, Kumar, Buckman, Nachum and Bellemare, DeepMDP: Learning Continuous Latent Space Models for Representation Learning, arXiv:1906.02736v1 (ICML 2019), Section 4.2, Theorem 2, p. 5; proof in Appendix A.3, pp. 17-18
Read-back

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

Setting.

  • SSS is a countable set of "real" states. Every subset of SSS is measurable, so every function out of SSS is measurable.
  • Sˉ\bar SSˉ is a metric space with distance ddd, equipped with its Borel σ\sigmaσ-algebra.
  • AAA is a finite, nonempty set of actions with a σ\sigmaσ-algebra in which singletons are measurable.

Data. The statement is universally quantified over:

  • a reward R:S×A→RR : S \times A \to \mathbb RR:S×A→R;
  • for each action aaa, a kernel P(⋅∣s,a)P(\cdot \mid s, a)P(⋅∣s,a) from SSS to SSS;
  • a latent reward Rˉ:Sˉ×A→R\bar R : \bar S \times A \to \mathbb RRˉ:Sˉ×A→R;
  • for each action aaa, a latent kernel Pˉ(⋅∣x,a)\bar P(\cdot \mid x, a)Pˉ(⋅∣x,a) from Sˉ\bar SSˉ to Sˉ\bar SSˉ;
  • a real number γ\gammaγ;
  • an arbitrary function φ:S→Sˉ\varphi : S \to \bar Sφ:S→Sˉ (the embedding);
  • constants KRˉ,KPˉ,KV≥0K_{\bar R}, K_{\bar P}, K_V \ge 0KRˉ​,KPˉ​,KV​≥0;
  • a Markov kernel πˉ(⋅∣x)\bar\pi(\cdot \mid x)πˉ(⋅∣x) from Sˉ\bar SSˉ to AAA (a latent policy);
  • a measure ξ\xiξ on SSS;
  • two states s1,s2∈Ss_1, s_2 \in Ss1​,s2​∈S.

Hypotheses.

  1. (R,P,γ)(R, P, \gamma)(R,P,γ) is an MDP. 0≤γ<10 \le \gamma < 10≤γ<1, each P(⋅∣⋅,a)P(\cdot\mid\cdot,a)P(⋅∣⋅,a) is a Markov kernel (probability measures), each R(⋅,a)R(\cdot,a)R(⋅,a) is measurable, and RRR is bounded: there is a CCC with ∣R(s,a)∣≤C|R(s,a)| \le C∣R(s,a)∣≤C for all s,as, as,a.
  2. (Rˉ,Pˉ,γ)(\bar R, \bar P, \gamma)(Rˉ,Pˉ,γ) is an MDP in the same sense, with the same γ\gammaγ: each Pˉ(⋅∣⋅,a)\bar P(\cdot\mid\cdot,a)Pˉ(⋅∣⋅,a) is a Markov kernel, each Rˉ(⋅,a)\bar R(\cdot,a)Rˉ(⋅,a) is measurable, and Rˉ\bar RRˉ is bounded.
  3. The latent MDP is (KRˉ,KPˉ)(K_{\bar R}, K_{\bar P})(KRˉ​,KPˉ​)-Lipschitz. For every aaa and all x,y∈Sˉx, y \in \bar Sx,y∈Sˉ:
∣Rˉ(x,a)−Rˉ(y,a)∣≤KRˉ d(x,y),W(Pˉ(⋅∣x,a),Pˉ(⋅∣y,a))≤KPˉ d(x,y).|\bar R(x,a) - \bar R(y,a)| \le K_{\bar R}\, d(x,y), \qquad W\big(\bar P(\cdot\mid x,a), \bar P(\cdot\mid y,a)\big) \le K_{\bar P}\, d(x,y).∣Rˉ(x,a)−Rˉ(y,a)∣≤KRˉ​d(x,y),W(Pˉ(⋅∣x,a),Pˉ(⋅∣y,a))≤KPˉ​d(x,y).

Here W(μ,ν)W(\mu,\nu)W(μ,ν) is the infimum, over all measures λ\lambdaλ on Sˉ×Sˉ\bar S \times \bar SSˉ×Sˉ whose two marginals are exactly μ\muμ and ν\nuν, of ∫d(u,v) dλ(u,v)\int d(u,v)\,d\lambda(u,v)∫d(u,v)dλ(u,v). It takes values in [0,∞][0,\infty][0,∞]. The constant KRˉK_{\bar R}KRˉ​ appears nowhere else. 4. γ KPˉ<1\gamma\, K_{\bar P} < 1γKPˉ​<1. 5. πˉ\bar\piπˉ is KVK_VKV​-Lipschitz-valued in the latent MDP. For all x,y∈Sˉx, y \in \bar Sx,y∈Sˉ and every action aaa:

∣Vˉπˉ(x)−Vˉπˉ(y)∣≤KV d(x,y),∣Qˉπˉ(x,a)−Qˉπˉ(y,a)∣≤KV d(x,y).|\bar V^{\bar\pi}(x) - \bar V^{\bar\pi}(y)| \le K_V\, d(x,y), \qquad |\bar Q^{\bar\pi}(x,a) - \bar Q^{\bar\pi}(y,a)| \le K_V\, d(x,y).∣Vˉπˉ(x)−Vˉπˉ(y)∣≤KV​d(x,y),∣Qˉ​πˉ(x,a)−Qˉ​πˉ(y,a)∣≤KV​d(x,y).
  1. ξ\xiξ is stationary for the lifted policy. Let π(⋅∣s):=πˉ(⋅∣φ(s))\pi(\cdot\mid s) := \bar\pi(\cdot\mid\varphi(s))π(⋅∣s):=πˉ(⋅∣φ(s)) be the policy on SSS. Then ξ\xiξ is a probability measure on SSS, and for every s∈Ss \in Ss∈S:
ξ({s})=∫S∑a′∈Aπ(a′∣s′) P({s}∣s′,a′) dξ(s′).\xi(\{s\}) = \int_S \sum_{a' \in A} \pi(a'\mid s')\, P(\{s\}\mid s', a')\, d\xi(s').ξ({s})=∫S​a′∈A∑​π(a′∣s′)P({s}∣s′,a′)dξ(s′).
  1. ξ({s1})>0\xi(\{s_1\}) > 0ξ({s1​})>0 and ξ({s2})>0\xi(\{s_2\}) > 0ξ({s2​})>0.

Value functions. For an MDP (r,T,γ)(r, T, \gamma)(r,T,γ) and a policy π\piπ, value functions are defined by iterates:

Q0=0,Qn+1(x,a)=r(x,a)+γ∫∑a′π(a′∣y) Qn(y,a′) T(dy∣x,a).Q_0 = 0, \qquad Q_{n+1}(x,a) = r(x,a) + \gamma \int \sum_{a'} \pi(a'\mid y)\, Q_n(y,a')\, T(dy\mid x,a).Q0​=0,Qn+1​(x,a)=r(x,a)+γ∫a′∑​π(a′∣y)Qn​(y,a′)T(dy∣x,a).
  • The integral is a Bochner integral, which is taken to be 000 when the integrand is not integrable.
  • Qπ(x,a)Q^\pi(x,a)Qπ(x,a) is the limit of Qn(x,a)Q_n(x,a)Qn​(x,a) as n→∞n \to \inftyn→∞. If no limit exists, it is an unspecified default value.
  • Vπ(x)=∑aπ(a∣x) Qπ(x,a)V^\pi(x) = \sum_a \pi(a\mid x)\, Q^\pi(x,a)Vπ(x)=∑a​π(a∣x)Qπ(x,a).
  • VπV^\piVπ denotes this construction in (R,P,γ)(R, P, \gamma)(R,P,γ); Vˉπˉ\bar V^{\bar\pi}Vˉπˉ and Qˉπˉ\bar Q^{\bar\pi}Qˉ​πˉ denote it in (Rˉ,Pˉ,γ)(\bar R, \bar P, \gamma)(Rˉ,Pˉ,γ).

Local losses. Let ξπ\xi_\piξπ​ be the measure on S×AS \times AS×A given by ξπ(s,a)=ξ(s) π(a∣s)=ξ(s) πˉ(a∣φ(s))\xi_\pi(s,a) = \xi(s)\,\pi(a\mid s) = \xi(s)\,\bar\pi(a\mid\varphi(s))ξπ​(s,a)=ξ(s)π(a∣s)=ξ(s)πˉ(a∣φ(s)). Define:

LRˉξ=∫S×A∣R(s,a)−Rˉ(φ(s),a)∣ dξπ(s,a),L_{\bar R}^{\xi} = \int_{S\times A} \big|R(s,a) - \bar R(\varphi(s),a)\big|\, d\xi_\pi(s,a),LRˉξ​=∫S×A​​R(s,a)−Rˉ(φ(s),a)​dξπ​(s,a), LPˉξ=∫S×AW(φ#P(⋅∣s,a), Pˉ(⋅∣φ(s),a)) dξπ(s,a).L_{\bar P}^{\xi} = \int_{S\times A} W\big(\varphi_\# P(\cdot\mid s,a),\ \bar P(\cdot\mid\varphi(s),a)\big)\, d\xi_\pi(s,a).LPˉξ​=∫S×A​W(φ#​P(⋅∣s,a), Pˉ(⋅∣φ(s),a))dξπ​(s,a).

Here φ#P(⋅∣s,a)\varphi_\# P(\cdot\mid s,a)φ#​P(⋅∣s,a) is the law of φ(s′)\varphi(s')φ(s′) for s′∼P(⋅∣s,a)s' \sim P(\cdot\mid s,a)s′∼P(⋅∣s,a). Both losses are nonnegative extended reals and may be +∞+\infty+∞.

Conclusion. In [0,∞][0,\infty][0,∞]:

∣Vπ(s1)−Vπ(s2)∣  ≤  KV d(φ(s1),φ(s2))  +  LRˉξ+γ KV LPˉξ1−γ(1ξ({s1})+1ξ({s2})).\big|V^{\pi}(s_1) - V^{\pi}(s_2)\big| \;\le\; K_V\, d\big(\varphi(s_1), \varphi(s_2)\big) \;+\; \frac{L_{\bar R}^{\xi} + \gamma\, K_V\, L_{\bar P}^{\xi}}{1-\gamma}\left(\frac{1}{\xi(\{s_1\})} + \frac{1}{\xi(\{s_2\})}\right).​Vπ(s1​)−Vπ(s2​)​≤KV​d(φ(s1​),φ(s2​))+1−γLRˉξ​+γKV​LPˉξ​​(ξ({s1​})1​+ξ({s2​})1​).

Edge cases.

  • The bound is in extended arithmetic. If either loss is +∞+\infty+∞ with γKV>0\gamma K_V > 0γKV​>0 (or LRˉξ=∞L_{\bar R}^\xi = \inftyLRˉξ​=∞), the right-hand side is +∞+\infty+∞ and the inequality is trivial. The convention 0⋅∞=00 \cdot \infty = 00⋅∞=0 applies when γ=0\gamma = 0γ=0 or KV=0K_V = 0KV​=0.
  • Since γ<1\gamma < 1γ<1, the factor 1−γ1-\gamma1−γ is strictly positive.
  • Since ξ\xiξ is a probability measure, each ξ({si})\xi(\{s_i\})ξ({si​}) lies in (0,1](0,1](0,1].
  • γ=0\gamma = 0γ=0, KV=0K_V = 0KV​=0, KPˉ=0K_{\bar P} = 0KPˉ​=0 and s1=s2s_1 = s_2s1​=s2​ are all permitted.
  • φ\varphiφ is unrestricted: it need not be injective, Lipschitz, or related to the latent model beyond what appears in the losses.
Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

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