Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5: bisimulation distance between a state and its embedding

Proved
DeepMDP.bisimulation_metric_embedding_bound

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

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

Let MMM, Mˉ\bar MMˉ and ϕ\phiϕ be as in Theorem 3. Consider the MDP on S⊔SˉS\sqcup\bar SS⊔Sˉ obtained by joining MMM and Mˉ\bar MMˉ: when an action is taken, each state is rewarded and transitions according to its own MDP. Let d~\tilde dd~ be its bisimulation metric. Then for every s∈Ss\in Ss∈S,

d~(s,ϕ(s))≤LRˉ∞+γLPˉ∞ KRˉ1−γKPˉ.\tilde d(s,\phi(s))\le L^\infty_{\bar R}+\gamma L^\infty_{\bar P}\,\frac{K_{\bar R}}{1-\gamma K_{\bar P}}.d~(s,ϕ(s))≤LRˉ∞​+γLPˉ∞​1−γKPˉ​KRˉ​​.

Formalization Note The joined MDP is built explicitly on the disjoint union S⊕SˉS\oplus\bar SS⊕Sˉ, with the transitions of MMM and Mˉ\bar MMˉ pushed forward by the two inclusions. Its bisimulation metric is the limit of the iterates of Definition 5. The comparison is made in [0,∞][0,\infty][0,∞], with 0⋅∞=00\cdot\infty=00⋅∞=0. This is harmless: if KRˉ=0K_{\bar R}=0KRˉ​=0, all latent states are bisimilar and the bound reduces to LRˉ∞L^\infty_{\bar R}LRˉ∞​, which still holds.

Preamble
import Mathlib
import Definitions.Def_DeepMDP_Basic

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

theorem bisimulation_metric_embedding_bound {S Sb A : Type*} [MeasurableSpace S] [DiscreteMeasurableSpace S] [Countable S]
    [MetricSpace Sb] [MeasurableSpace Sb] [BorelSpace Sb] [SecondCountableTopology Sb]
    [CompleteSpace 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) (s : S) :
    bisimMetric (joinReward R Rb) (joinTrans P Pb) γ (.inl s) (.inr (φ s)) ≤
      rewardLossGlobal R Rb φ +
        ENNReal.ofReal γ * transLossGlobal P Pb φ * ENNReal.ofReal (KRb / (1 - γ * KPb)) := 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), Appendix A.4, Lemma 5, p. 19; Definition 5, Section 5.2, p. 6
Read-back

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

Setting. Fix the following data:

  • Original state space SSS. A countable set in which every subset is measurable.
  • Latent state space Sˉ\bar SSˉ. A complete, separable metric space with metric ddd, carrying its Borel σ\sigmaσ-algebra.
  • Action set AAA. A finite, nonempty set whose singletons are measurable, so every subset is measurable.
  • Original MDP data. A reward R:S×A→RR : S \times A \to \mathbb RR:S×A→R, and for each action aaa a transition kernel P(⋅∣s,a)P(\cdot \mid s, a)P(⋅∣s,a) on SSS.
  • Latent MDP data. A reward Rˉ:Sˉ×A→R\bar R : \bar S \times A \to \mathbb RRˉ:Sˉ×A→R, and for each action aaa a transition kernel Pˉ(⋅∣x,a)\bar P(\cdot \mid x, a)Pˉ(⋅∣x,a) on Sˉ\bar SSˉ.
  • Discount and embedding. A real number γ\gammaγ, and an arbitrary function φ:S→Sˉ\varphi : S \to \bar Sφ:S→Sˉ. Since every subset of SSS is measurable, φ\varphiφ is automatically measurable.
  • Constants. Two nonnegative real numbers KRˉK_{\bar R}KRˉ​ and KPˉK_{\bar P}KPˉ​.
  • Base point. A state s∈Ss \in Ss∈S.

Hypotheses.

  1. (R,P,γ)(R, P, \gamma)(R,P,γ) is an MDP.
    • 0≤γ<10 \le \gamma < 10≤γ<1.
    • Every P(⋅∣⋅,a)P(\cdot \mid \cdot, a)P(⋅∣⋅,a) is a Markov kernel, so each P(⋅∣s,a)P(\cdot \mid s, a)P(⋅∣s,a) is a probability measure.
    • Each map s↦R(s,a)s \mapsto R(s,a)s↦R(s,a) is measurable.
    • There is a real 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γ.
  3. Lipschitz condition on the latent MDP. 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 WWW is the Wasserstein-1 distance on Sˉ\bar SSˉ, 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 ranges over all measures λ\lambdaλ on Sˉ×Sˉ\bar S \times \bar SSˉ×Sˉ whose first marginal is μ\muμ and whose second marginal is ν\nuν.
  • In particular, these latent Wasserstein distances must be finite.
  • No Lipschitz condition is imposed on the original MDP (R,P)(R, P)(R,P).
  1. Contraction-type condition. γKPˉ<1\gamma K_{\bar P} < 1γKPˉ​<1.

The joined MDP. On the disjoint union S⊔SˉS \sqcup \bar SS⊔Sˉ, with its disjoint-union σ\sigmaσ-algebra, define the following.

  • Joined reward rrr.
    • r(s′,a)=R(s′,a)r(s', a) = R(s', a)r(s′,a)=R(s′,a) for s′∈Ss' \in Ss′∈S.
    • r(x,a)=Rˉ(x,a)r(x, a) = \bar R(x, a)r(x,a)=Rˉ(x,a) for x∈Sˉx \in \bar Sx∈Sˉ.
  • Joined transition TTT.
    • For s′∈Ss' \in Ss′∈S, T(⋅∣s′,a)T(\cdot \mid s', a)T(⋅∣s′,a) is P(⋅∣s′,a)P(\cdot \mid s', a)P(⋅∣s′,a) placed on the copy of SSS.
    • For x∈Sˉx \in \bar Sx∈Sˉ, T(⋅∣x,a)T(\cdot \mid x, a)T(⋅∣x,a) is Pˉ(⋅∣x,a)\bar P(\cdot \mid x, a)Pˉ(⋅∣x,a) placed on the copy of Sˉ\bar SSˉ.

Bisimulation iterates. These are [0,∞][0,\infty][0,∞]-valued functions on pairs of points of S⊔SˉS \sqcup \bar SS⊔Sˉ, including mixed pairs with one point from each part. Set d0≡0d_0 \equiv 0d0​≡0 and

dn+1(u,v)=max⁡a∈A[(1−γ) ∣r(u,a)−r(v,a)∣+γ Wdn(T(⋅∣u,a), T(⋅∣v,a))].d_{n+1}(u,v) = \max_{a \in A} \Big[ (1-\gamma)\,|r(u,a) - r(v,a)| + \gamma\, W_{d_n}\big(T(\cdot \mid u,a),\, T(\cdot \mid v,a)\big) \Big].dn+1​(u,v)=a∈Amax​[(1−γ)∣r(u,a)−r(v,a)∣+γWdn​​(T(⋅∣u,a),T(⋅∣v,a))].
  • Wdn(μ,ν)W_{d_n}(\mu,\nu)Wdn​​(μ,ν) is the infimum, over all measures λ\lambdaλ on (S⊔Sˉ)2(S \sqcup \bar S)^2(S⊔Sˉ)2 with marginals μ\muμ and ν\nuν, of the lower Lebesgue integral ∫dn dλ\int d_n\, d\lambda∫dn​dλ.
  • The bisimulation metric is
d~(u,v)=sup⁡n≥0dn(u,v)∈[0,∞].\tilde d(u,v) = \sup_{n \ge 0} d_n(u,v) \in [0,\infty].d~(u,v)=n≥0sup​dn​(u,v)∈[0,∞].

Losses. Both are suprema in [0,∞][0,\infty][0,∞].

  • Global reward loss:
LR=sup⁡s′∈S, a∈A∣R(s′,a)−Rˉ(φ(s′),a)∣.L_R = \sup_{s' \in S,\, a \in A} |R(s',a) - \bar R(\varphi(s'),a)|.LR​=s′∈S,a∈Asup​∣R(s′,a)−Rˉ(φ(s′),a)∣.
  • Global transition loss:
LP=sup⁡s′∈S, a∈AW(φ∗P(⋅∣s′,a), Pˉ(⋅∣φ(s′),a)).L_P = \sup_{s' \in S,\, a \in A} W\big(\varphi_* P(\cdot \mid s',a),\ \bar P(\cdot \mid \varphi(s'),a)\big).LP​=s′∈S,a∈Asup​W(φ∗​P(⋅∣s′,a), Pˉ(⋅∣φ(s′),a)).
  • φ∗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).
  • WWW is the Wasserstein-1 distance on Sˉ\bar SSˉ defined above.

Conclusion. For the given state sss, regarded as a point of the SSS-part, and the point φ(s)\varphi(s)φ(s), regarded as a point of the Sˉ\bar SSˉ-part:

d~(s, φ(s))  ≤  LR+γ⋅LP⋅KRˉ1−γKPˉ.\tilde d\big(s,\ \varphi(s)\big) \;\le\; L_R + \gamma \cdot L_P \cdot \frac{K_{\bar R}}{1 - \gamma K_{\bar P}}.d~(s, φ(s))≤LR​+γ⋅LP​⋅1−γKPˉ​KRˉ​​.

Edge cases.

  • The inequality is in [0,∞][0,\infty][0,∞], with the convention 0⋅∞=00 \cdot \infty = 00⋅∞=0. If γ=0\gamma = 0γ=0 or KRˉ=0K_{\bar R} = 0KRˉ​=0, the second term is 000 even when LP=∞L_P = \inftyLP​=∞.
  • If LP=∞L_P = \inftyLP​=∞ while γ>0\gamma > 0γ>0 and KRˉ>0K_{\bar R} > 0KRˉ​>0, the right-hand side is ∞\infty∞ and the claim holds trivially.
  • LRL_RLR​ is always finite, because both rewards are bounded.
  • The denominator 1−γKPˉ1 - \gamma K_{\bar P}1−γKPˉ​ is strictly positive by hypothesis 4, so the fraction is an ordinary nonnegative real number.
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