Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1: global representation quality bound

Proved
DeepMDP.global_representation_quality

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

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

Let M=⟨S,A,R,P,γ⟩M=\langle S,A,R,P,\gamma\rangleM=⟨S,A,R,P,γ⟩ be an MDP with countable discrete state space, and let Mˉ=⟨Sˉ,A,Rˉ,Pˉ,γ⟩\bar M=\langle\bar S,A,\bar R,\bar P,\gamma\rangleMˉ=⟨Sˉ,A,Rˉ,Pˉ,γ⟩ be a DeepMDP on a metric space (Sˉ,dSˉ)(\bar S,d_{\bar S})(Sˉ,dSˉ​), both with finite action set AAA, discount 0≤γ<10\le\gamma<10≤γ<1 and bounded measurable rewards, with an embedding ϕ:S→Sˉ\phi:S\to\bar Sϕ:S→Sˉ and global losses LRˉ∞,LPˉ∞L^\infty_{\bar R},L^\infty_{\bar P}LRˉ∞​,LPˉ∞​. Assume Mˉ\bar MMˉ is (KRˉ,KPˉ)(K_{\bar R},K_{\bar P})(KRˉ​,KPˉ​)-Lipschitz with γKPˉ<1\gamma K_{\bar P}<1γKPˉ​<1 (Assumption 1). For every KVˉK_{\bar V}KVˉ​-Lipschitz-valued policy πˉ\bar\piπˉ, all s1,s2∈Ss_1,s_2\in Ss1​,s2​∈S and all a∈Aa\in Aa∈A,

∣Qπˉ(s1,a)−Qπˉ(s2,a)∣≤KVˉ dSˉ(ϕ(s1),ϕ(s2))+2 LRˉ∞+γKVˉLPˉ∞1−γ,\big|Q^{\bar\pi}(s_1,a)-Q^{\bar\pi}(s_2,a)\big|\le K_{\bar V}\,d_{\bar S}(\phi(s_1),\phi(s_2))+2\,\frac{L^\infty_{\bar R}+\gamma K_{\bar V}L^\infty_{\bar P}}{1-\gamma},​Qπˉ(s1​,a)−Qπˉ(s2​,a)​≤KVˉ​dSˉ​(ϕ(s1​),ϕ(s2​))+21−γLRˉ∞​+γKVˉ​LPˉ∞​​,

where QπˉQ^{\bar\pi}Qπˉ is the action value in MMM of the policy s↦πˉ(⋅∣ϕ(s))s\mapsto\bar\pi(\cdot|\phi(s))s↦πˉ(⋅∣ϕ(s)).

When both global losses vanish, states with different values for such a policy are never mapped to the same latent point, which justifies using ϕ\phiϕ as a representation for value prediction.

Formalization Note Both sides are compared in [0,∞][0,\infty][0,∞], with 0⋅∞=00\cdot\infty=00⋅∞=0. This is harmless, as in Lemma 2: KVˉ=0K_{\bar V}=0KVˉ​=0 makes Vˉπˉ\bar V^{\bar\pi}Vˉπˉ constant. Assumption 1 is a standing assumption of the paper from Section 2.4 onwards and is included though the proof does not use it.

Preamble
import Mathlib
import Definitions.Def_DeepMDP_Basic

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

theorem global_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)
    (s₁ s₂ : S) (a : A) :
    ENNReal.ofReal |qValue R P γ (liftPolicy πb φ) s₁ a - qValue R P γ (liftPolicy πb φ) s₂ a| ≤
      (KV : ℝ≥0∞) * edist (φ s₁) (φ s₂) +
        2 * ((rewardLossGlobal R Rb φ + ENNReal.ofReal γ * (KV : ℝ≥0∞) * transLossGlobal P Pb φ) /
          ENNReal.ofReal (1 - γ)) := 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 3.2, Theorem 1, p. 4; proof in Appendix A.2, p. 17
Read-back

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

Setting. Fix the following data.

  • Original state space SSS. It is countable, and every subset of SSS is measurable. No metric is placed on SSS.
  • Latent state space Sˉ\bar SSˉ. It is a metric space with distance ddd, equipped with its Borel σ-algebra.
  • Action set AAA. It is finite and nonempty, with a σ-algebra in which every singleton is measurable.
  • Original MDP. A reward R:S×A→RR : S \times A \to \mathbb{R}R:S×A→R and transition kernels P(⋅∣s,a)P(\cdot \mid s, a)P(⋅∣s,a) on SSS, one for each action aaa.
  • Latent MDP. A reward Rˉ:Sˉ×A→R\bar R : \bar S \times A \to \mathbb{R}Rˉ:Sˉ×A→R and transition kernels Pˉ(⋅∣x,a)\bar P(\cdot \mid x, a)Pˉ(⋅∣x,a) on Sˉ\bar SSˉ.
  • Discount and embedding. A real number γ\gammaγ, shared by both MDPs, and an arbitrary map ϕ:S→Sˉ\phi : S \to \bar Sϕ:S→Sˉ.
  • Constants. Nonnegative reals KRˉK_{\bar R}KRˉ​, KPˉK_{\bar P}KPˉ​ and KVK_VKV​.
  • Latent policy. A Markov kernel πˉ\bar\piπˉ from Sˉ\bar SSˉ to AAA. Each πˉ(⋅∣x)\bar\pi(\cdot \mid x)πˉ(⋅∣x) is a probability measure on AAA.
  • Free variables of the conclusion. States s1,s2∈Ss_1, s_2 \in Ss1​,s2​∈S and an action a∈Aa \in Aa∈A.

Hypotheses.

  1. The original MDP is an MDP.
    • 0≤γ<10 \le \gamma < 10≤γ<1.
    • Each P(⋅∣⋅,a)P(\cdot \mid \cdot, a)P(⋅∣⋅,a) is a Markov kernel, so every P(⋅∣s,a)P(\cdot \mid s, a)P(⋅∣s,a) is a probability measure.
    • Each R(⋅,a)R(\cdot, a)R(⋅,a) is measurable.
    • There is a constant CCC with ∣R(s,a)∣≤C|R(s,a)| \le C∣R(s,a)∣≤C for all s,as, as,a.
  2. The latent MDP is an MDP. The same four conditions hold for (Rˉ,Pˉ,γ)(\bar R, \bar P, \gamma)(Rˉ,Pˉ,γ).
  3. The latent MDP is (KRˉ,KPˉ)(K_{\bar R}, K_{\bar P})(KRˉ​,KPˉ​)-Lipschitz. For every action 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 Wasserstein-1 distance, valued in [0,∞][0,\infty][0,∞]:

W(μ,ν)=inf⁡λ∫d(u,v) dλ(u,v).W(\mu,\nu) = \inf_{\lambda} \int d(u,v)\, d\lambda(u,v).W(μ,ν)=λinf​∫d(u,v)dλ(u,v).

The infimum runs over all measures λ\lambdaλ on Sˉ×Sˉ\bar S \times \bar SSˉ×Sˉ whose first marginal is μ\muμ and whose second marginal is ν\nuν. 4. Contraction-type condition. γ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).

The constant KRˉK_{\bar R}KRˉ​ and hypotheses 2 and 4 do not appear in the conclusion.

Value functions. For an MDP (r,T,γ)(r, T, \gamma)(r,T,γ) and a kernel π\piπ, the action value is built from iterates:

Q0≡0,Qn+1(x,a)=r(x,a)+γ∫∑a′π({a′}∣y) Qn(y,a′)  T(dy∣x,a).Q_0 \equiv 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 the Bochner integral, which by convention equals 000 when the integrand is not integrable.
  • Qπ(x,a)Q^\pi(x,a)Qπ(x,a) is defined as lim⁡n→∞Qn(x,a)\lim_{n\to\infty} Q_n(x,a)limn→∞​Qn​(x,a). If this limit does not exist, Qπ(x,a)Q^\pi(x,a)Qπ(x,a) is an unspecified real number.
  • The state value is
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).
  • Qˉπˉ\bar Q^{\bar\pi}Qˉ​πˉ and Vˉπˉ\bar V^{\bar\pi}Vˉπˉ denote these quantities for the latent MDP (Rˉ,Pˉ,γ)(\bar R, \bar P, \gamma)(Rˉ,Pˉ,γ) with policy πˉ\bar\piπˉ.
  • QπQ^{\pi}Qπ in the conclusion denotes the action value of the original MDP (R,P,γ)(R, P, \gamma)(R,P,γ) under the lifted policy
π(⋅∣s):=πˉ(⋅∣ϕ(s)).\pi(\cdot \mid s) := \bar\pi(\cdot \mid \phi(s)).π(⋅∣s):=πˉ(⋅∣ϕ(s)).

Losses. The global reward loss and global transition loss are both valued in [0,∞][0,\infty][0,∞]:

LR∞=sup⁡s∈S, a∈A∣R(s,a)−Rˉ(ϕ(s),a)∣,LP∞=sup⁡s∈S, a∈AW(ϕ#P(⋅∣s,a), Pˉ(⋅∣ϕ(s),a)).L_R^\infty = \sup_{s \in S,\, a \in A} |R(s,a) - \bar R(\phi(s),a)|, \qquad L_P^\infty = \sup_{s \in S,\, a \in A} W\big(\phi_\# P(\cdot \mid s,a),\, \bar P(\cdot \mid \phi(s),a)\big).LR∞​=s∈S,a∈Asup​∣R(s,a)−Rˉ(ϕ(s),a)∣,LP∞​=s∈S,a∈Asup​W(ϕ#​P(⋅∣s,a),Pˉ(⋅∣ϕ(s),a)).

Here ϕ#P(⋅∣s,a)\phi_\# P(\cdot \mid s,a)ϕ#​P(⋅∣s,a) is the law of ϕ(s′)\phi(s')ϕ(s′) for s′∼P(⋅∣s,a)s' \sim P(\cdot \mid s,a)s′∼P(⋅∣s,a).

Conclusion. For all s1,s2∈Ss_1, s_2 \in Ss1​,s2​∈S and every a∈Aa \in Aa∈A:

∣Qπ(s1,a)−Qπ(s2,a)∣  ≤  KV d(ϕ(s1),ϕ(s2))  +  2⋅LR∞+γ KV LP∞1−γ.\big|Q^{\pi}(s_1,a) - Q^{\pi}(s_2,a)\big| \;\le\; K_V\, d\big(\phi(s_1),\phi(s_2)\big) \;+\; 2\cdot\frac{L_R^\infty + \gamma\, K_V\, L_P^\infty}{1-\gamma}.​Qπ(s1​,a)−Qπ(s2​,a)​≤KV​d(ϕ(s1​),ϕ(s2​))+2⋅1−γLR∞​+γKV​LP∞​​.

This inequality is stated in the extended nonnegative reals [0,∞][0,\infty][0,∞], with these consequences:

  • Since γ<1\gamma < 1γ<1, the denominator 1−γ1-\gamma1−γ is strictly positive.
  • If either loss is +∞+\infty+∞ and its coefficient is nonzero, the right-hand side is +∞+\infty+∞ and the inequality holds trivially.
  • The convention 0⋅∞=00 \cdot \infty = 00⋅∞=0 applies. For example, if γ=0\gamma = 0γ=0 or KV=0K_V = 0KV​=0, the transition-loss term vanishes even when LP∞=∞L_P^\infty = \inftyLP∞​=∞.
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