Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

DeepMDP: MDPs, value functions, latent space models, DeepMDP losses, Wasserstein and bisimulation metrics

Definition
DeepMDP_Basic

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

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

Objects of Sections 2-6 and Appendix A of Gelada, Kumar, Buckman, Nachum and Bellemare (2019).

  1. Wasserstein metric (Definition 1). For measures P,QP,QP,Q on a space XXX and a cost d:X×X→[0,∞]d:X\times X\to[0,\infty]d:X×X→[0,∞], Wd(P,Q)=inf⁡λ∈Γ(P,Q)∫d(x,y) dλ(x,y)W_d(P,Q)=\inf_{\lambda\in\Gamma(P,Q)}\int d(x,y)\,d\lambda(x,y)Wd​(P,Q)=infλ∈Γ(P,Q)​∫d(x,y)dλ(x,y), where Γ(P,Q)\Gamma(P,Q)Γ(P,Q) is the set of couplings (measures on X×XX\times XX×X with marginals PPP and QQQ). On a metric space, W=WdW=W_dW=Wd​ with ddd the metric. Values lie in [0,∞][0,\infty][0,∞].
  2. MDP and value functions (Section 2.1). An MDP ⟨X,A,r,P,γ⟩\langle X,A,r,P,\gamma\rangle⟨X,A,r,P,γ⟩ has a finite action set AAA, Markov transition kernels P(⋅∣x,a)P(\cdot\mid x,a)P(⋅∣x,a), bounded measurable rewards r(x,a)r(x,a)r(x,a) and a discount 0≤γ<10\le\gamma<10≤γ<1. A stationary policy is a Markov kernel π(a∣x)\pi(a\mid x)π(a∣x). With Q0=0Q_0=0Q0​=0 and Qn+1(x,a)=r(x,a)+γ Ey∼P(⋅∣x,a)∑a′π(a′∣y)Qn(y,a′)Q_{n+1}(x,a)=r(x,a)+\gamma\,\mathbb E_{y\sim P(\cdot|x,a)}\sum_{a'}\pi(a'|y)Q_n(y,a')Qn+1​(x,a)=r(x,a)+γEy∼P(⋅∣x,a)​∑a′​π(a′∣y)Qn​(y,a′) (the expected discounted reward of the first n+1n+1n+1 steps), Qπ=lim⁡nQnQ^\pi=\lim_n Q_nQπ=limn​Qn​ and Vπ(x)=∑aπ(a∣x)Qπ(x,a)V^\pi(x)=\sum_a\pi(a|x)Q^\pi(x,a)Vπ(x)=∑a​π(a∣x)Qπ(x,a). A policy is optimal if Vπ′≤VπV^{\pi'}\le V^{\pi}Vπ′≤Vπ pointwise for every policy π′\pi'π′, and V∗(x)=sup⁡πVπ(x)V^*(x)=\sup_\pi V^\pi(x)V∗(x)=supπ​Vπ(x). The policy's reward and transition functions are rπ(x)=∑aπ(a∣x)r(x,a)r_\pi(x)=\sum_a\pi(a|x)r(x,a)rπ​(x)=∑a​π(a∣x)r(x,a) and Pπ(⋅∣x)=∑aπ(a∣x)P(⋅∣x,a)P_\pi(\cdot|x)=\sum_a\pi(a|x)P(\cdot|x,a)Pπ​(⋅∣x)=∑a​π(a∣x)P(⋅∣x,a).
  3. Lipschitz notions (Definitions 2-3). On a metric state space, π\piπ is KKK-Lipschitz-valued if VπV^\piVπ and every Qπ(⋅,a)Q^\pi(\cdot,a)Qπ(⋅,a) are KKK-Lipschitz. The MDP is (KR,KP)(K_R,K_P)(KR​,KP​)-Lipschitz if every r(⋅,a)r(\cdot,a)r(⋅,a) is KRK_RKR​-Lipschitz and W(P(⋅∣x1,a),P(⋅∣x2,a))≤KP d(x1,x2)W(P(\cdot|x_1,a),P(\cdot|x_2,a))\le K_P\,d(x_1,x_2)W(P(⋅∣x1​,a),P(⋅∣x2​,a))≤KP​d(x1​,x2​).
  4. Latent space model (Section 2.2). M=⟨S,A,R,P,γ⟩M=\langle S,A,R,P,\gamma\rangleM=⟨S,A,R,P,γ⟩ has a countable discrete state space SSS; the DeepMDP Mˉ=⟨Sˉ,A,Rˉ,Pˉ,γ⟩\bar M=\langle\bar S,A,\bar R,\bar P,\gamma\rangleMˉ=⟨Sˉ,A,Rˉ,Pˉ,γ⟩ has a metric state space Sˉ\bar SSˉ with its Borel σ\sigmaσ-algebra; ϕ:S→Sˉ\phi:S\to\bar Sϕ:S→Sˉ is the embedding. A latent policy πˉ\bar\piπˉ acts on MMM by πˉ(⋅∣s)=πˉ(⋅∣ϕ(s))\bar\pi(\cdot|s)=\bar\pi(\cdot|\phi(s))πˉ(⋅∣s)=πˉ(⋅∣ϕ(s)), and ϕP(⋅∣s,a)\phi P(\cdot|s,a)ϕP(⋅∣s,a) is the law of ϕ(s′)\phi(s')ϕ(s′), s′∼P(⋅∣s,a)s'\sim P(\cdot|s,a)s′∼P(⋅∣s,a).
  5. DeepMDP losses (eqs. (4)-(7)). Global: LRˉ∞=sup⁡s,a∣R(s,a)−Rˉ(ϕ(s),a)∣L^\infty_{\bar R}=\sup_{s,a}|R(s,a)-\bar R(\phi(s),a)|LRˉ∞​=sups,a​∣R(s,a)−Rˉ(ϕ(s),a)∣ and LPˉ∞=sup⁡s,aW(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a))L^\infty_{\bar P}=\sup_{s,a}W(\phi P(\cdot|s,a),\bar P(\cdot|\phi(s),a))LPˉ∞​=sups,a​W(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a)). Local to a state-action distribution ξ\xiξ: LRˉξ=E(s,a)∼ξ∣R(s,a)−Rˉ(ϕ(s),a)∣L^\xi_{\bar R}=\mathbb E_{(s,a)\sim\xi}|R(s,a)-\bar R(\phi(s),a)|LRˉξ​=E(s,a)∼ξ​∣R(s,a)−Rˉ(ϕ(s),a)∣ and LPˉξ=E(s,a)∼ξW(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a))L^\xi_{\bar P}=\mathbb E_{(s,a)\sim\xi}W(\phi P(\cdot|s,a),\bar P(\cdot|\phi(s),a))LPˉξ​=E(s,a)∼ξ​W(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a)). All take values in [0,∞][0,\infty][0,∞].
  6. Stationary distributions (Section 2.1). ξ\xiξ is a stationary distribution of π\piπ in MMM if it is a probability on SSS with ξ(s)=∑s˙,a˙P(s∣s˙,a˙)π(a˙∣s˙)ξ(s˙)\xi(s)=\sum_{\dot s,\dot a}P(s|\dot s,\dot a)\pi(\dot a|\dot s)\xi(\dot s)ξ(s)=∑s˙,a˙​P(s∣s˙,a˙)π(a˙∣s˙)ξ(s˙); the state-action distribution is ξπ(s,a)=ξ(s)π(a∣s)\xi_\pi(s,a)=\xi(s)\pi(a|s)ξπ​(s,a)=ξ(s)π(a∣s).
  7. Bisimulation metric (Definition 5). For rewards rrr and transitions TTT, d0=0d_0=0d0​=0 and dn+1(x,y)=max⁡a[(1−γ)∣r(x,a)−r(y,a)∣+γWdn(T(⋅∣x,a),T(⋅∣y,a))]d_{n+1}(x,y)=\max_a\big[(1-\gamma)|r(x,a)-r(y,a)|+\gamma W_{d_n}(T(\cdot|x,a),T(\cdot|y,a))\big]dn+1​(x,y)=maxa​[(1−γ)∣r(x,a)−r(y,a)∣+γWdn​​(T(⋅∣x,a),T(⋅∣y,a))]; the bisimulation metric is d~=sup⁡ndn=lim⁡ndn\tilde d=\sup_n d_n=\lim_n d_nd~=supn​dn​=limn​dn​. The joined MDP of MMM and Mˉ\bar MMˉ (Lemma 5) has state space S⊔SˉS\sqcup\bar SS⊔Sˉ, each state moving and being rewarded according to its own MDP.
  8. Norm-MMD (Definitions 6-7). A function seminorm ∥⋅∥D\|\cdot\|_D∥⋅∥D​ on real functions may take the value +∞+\infty+∞. The MMD of a class FFF is D(P,Q)=sup⁡f∈F∣EPf−EQf∣D(P,Q)=\sup_{f\in F}|\mathbb E_Pf-\mathbb E_Qf|D(P,Q)=supf∈F​∣EP​f−EQ​f∣ over the f∈Ff\in Ff∈F integrable under PPP and QQQ; the Norm-MMD uses F={f:∥f∥D≤1}F=\{f:\|f\|_D\le1\}F={f:∥f∥D​≤1}. A policy is KKK-smooth-valued if ∥Vˉπˉ∥D≤K\|\bar V^{\bar\pi}\|_D\le K∥Vˉπˉ∥D​≤K and ∥Qˉπˉ(⋅,a)∥D≤K\|\bar Q^{\bar\pi}(\cdot,a)\|_D\le K∥Qˉ​πˉ(⋅,a)∥D​≤K for all aaa. The global Norm-MMD transition loss is sup⁡s,aD(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a))\sup_{s,a}D(\phi P(\cdot|s,a),\bar P(\cdot|\phi(s),a))sups,a​D(ϕP(⋅∣s,a),Pˉ(⋅∣ϕ(s),a)).

Formalization Note The value functions are the limits of the finite-horizon expected discounted rewards, which is the paper's infinite sum of expected rewards. The bisimulation metric is the limit of the iterates of FFF from 000, which the proof of Lemma 4 uses; under the paper's assumptions this is the unique fixed point of Definition 5. Losses, Wasserstein distances and bisimulation distances are [0,∞][0,\infty][0,∞]-valued, so an infinite loss is represented as such.

Definition code
import Mathlib

/-!
Gelada, Kumar, Buckman, Nachum and Bellemare, *DeepMDP: Learning Continuous Latent Space Models
for Representation Learning*, arXiv:1906.02736v1 (ICML 2019): Markov decision processes and their
value functions (Section 2.1), latent space models and the DeepMDP losses (Section 2.2, eqs. (1)-(2);
Section 3, eqs. (4)-(5); Section 4, eqs. (6)-(7)), the Wasserstein metric (Section 2.3,
Definition 1), Lipschitz-valued policies and Lipschitz DeepMDPs (Section 2.4, Definitions 2-3),
bisimulation metrics (Section 5.2, Definition 5, and the joined MDP of Lemma 5 in Appendix A.4) and
Norm-MMD metrics with smooth-valued policies (Section 6, Definitions 6-7).
-/

open MeasureTheory ProbabilityTheory Filter
open scoped ENNReal NNReal

noncomputable section

namespace DeepMDP

section General

variable {X A : Type*} [MeasurableSpace X] [MeasurableSpace A] [Fintype A]

/-- Definition 1 (Section 2.3, p. 3): `c` is a coupling of `P` and `Q`, i.e. a measure on `X × X`
whose marginals are `P` and `Q`; the set of these is `Γ(P,Q)`. -/
def IsCoupling (P Q : Measure X) (c : Measure (X × X)) : Prop :=
  c.map Prod.fst = P ∧ c.map Prod.snd = Q

/-- Definition 1 (Section 2.3, p. 3) for an arbitrary cost `d`:
`W_d(P,Q) = inf_{λ ∈ Γ(P,Q)} ∫ d(x,y) dλ(x,y)`. Section 5.2 (p. 6) uses it for pseudometrics `d`. -/
def transportCost (d : X → X → ℝ≥0∞) (P Q : Measure X) : ℝ≥0∞ :=
  ⨅ (c : Measure (X × X)) (_ : IsCoupling P Q c), ∫⁻ z, d z.1 z.2 ∂c

/-- Definition 1 (Section 2.3, p. 3): the Wasserstein-1 metric `W(P,Q)` on a metric space, whose
cost is the metric itself. -/
def wasserstein [PseudoEMetricSpace X] (P Q : Measure X) : ℝ≥0∞ :=
  transportCost (fun x y => edist x y) P Q

/-- Section 2.1 (p. 2): the standing conventions of an MDP `⟨X, A, r, P, γ⟩` with a finite action
set: a discount `0 ≤ γ < 1`, Markov transition kernels `P(·|x,a)`, and bounded measurable
rewards `r(x,a)`. -/
def IsMDP (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) : Prop :=
  (0 ≤ γ ∧ γ < 1) ∧ (∀ a, IsMarkovKernel (P a)) ∧ (∀ a, Measurable fun x => r x a) ∧
    ∃ C : ℝ, ∀ x a, |r x a| ≤ C

/-- Section 2.1 (p. 2): the expected discounted reward of the first `n` steps of a stationary
policy `π(a|x)`, started in state `x` with first action `a`:
`Q_0 = 0`, `Q_{n+1}(x,a) = r(x,a) + γ E_{y ∼ P(·|x,a)} ∑_{a'} π(a'|y) Q_n(y,a')`. -/
def evalIter (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) (π : Kernel X A) :
    ℕ → X → A → ℝ
  | 0 => fun _ _ => 0
  | n + 1 => fun x a =>
      r x a + γ * ∫ y, ∑ a', (π y {a'}).toReal * evalIter r P γ π n y a' ∂(P a x)

/-- Section 2.1 (p. 2): the action value function
`Q^π(x,a) = E[∑_{t≥0} γ^t r(x_t,a_t) | x_0 = x, a_0 = a]`, the limit of the expected discounted
rewards of the first `n` steps. -/
def qValue (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) (π : Kernel X A) (x : X) (a : A) : ℝ :=
  limUnder atTop fun n => evalIter r P γ π n x a

/-- Section 2.1 (p. 2): the value function `V^π(x) = E[∑_{t≥0} γ^t r(x_t,a_t) | x_0 = x]`,
`a_t ∼ π(·|x_t)`, i.e. `V^π(x) = ∑_a π(a|x) Q^π(x,a)`. -/
def vValue (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) (π : Kernel X A) (x : X) : ℝ :=
  ∑ a, (π x {a}).toReal * qValue r P γ π x a

/-- Section 2.1 (p. 2): `π` is an optimal policy, a stationary policy which maximizes the expected
future reward from every state. -/
def IsOptimalPolicy (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) (π : Kernel X A) : Prop :=
  IsMarkovKernel π ∧
    ∀ π' : Kernel X A, IsMarkovKernel π' → ∀ x, vValue r P γ π' x ≤ vValue r P γ π x

/-- Section 2.1 (p. 2): the optimal value function `V^*(x)`, the largest value `V^π(x)` over all
stationary policies `π ∈ Π`. -/
def optValue (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ) (x : X) : ℝ :=
  ⨆ π : {π : Kernel X A // IsMarkovKernel π}, vValue r P γ π.1 x

/-- Section 2.1 (p. 2) and Section 2.4 (p. 4): the reward function of a policy,
`r_π(x) = ∑_a r(x,a) π(a|x)`. -/
def policyReward (r : X → A → ℝ) (π : Kernel X A) (x : X) : ℝ :=
  ∑ a, (π x {a}).toReal * r x a

/-- Section 2.1 (p. 2) and Section 2.4 (p. 4): the transition function of a policy,
`P_π(·|x) = ∑_a P(·|x,a) π(a|x)`. -/
def policyTrans (P : A → Kernel X X) (π : Kernel X A) (x : X) : Measure X :=
  ∑ a, π x {a} • P a x

/-- Definition 2 (Section 2.4, p. 3): the policy `π` is `K`-Lipschitz-valued:
`|V^π(x₁) - V^π(x₂)| ≤ K d(x₁,x₂)` and `|Q^π(x₁,a) - Q^π(x₂,a)| ≤ K d(x₁,x₂)` for every action `a`. -/
def IsLipschitzValued [PseudoEMetricSpace X] (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ)
    (π : Kernel X A) (K : ℝ≥0) : Prop :=
  LipschitzWith K (vValue r P γ π) ∧ ∀ a, LipschitzWith K fun x => qValue r P γ π x a

/-- Definition 3 (Section 2.4, p. 3): the MDP is `(K_R, K_P)`-Lipschitz:
`|r(x₁,a) - r(x₂,a)| ≤ K_R d(x₁,x₂)` and `W(P(·|x₁,a), P(·|x₂,a)) ≤ K_P d(x₁,x₂)`. -/
def IsLipschitzMDP [PseudoEMetricSpace X] (r : X → A → ℝ) (P : A → Kernel X X) (KR KP : ℝ≥0) :
    Prop :=
  ∀ a, LipschitzWith KR (fun x => r x a) ∧
    ∀ x y, wasserstein (P a x) (P a y) ≤ (KP : ℝ≥0∞) * edist x y

/-- Definition 5 (Section 5.2, p. 6): the iterates `d_0 = 0`, `d_{n+1} = F(d_n)` of the operator
`F_d(x,y) = max_a (1-γ)|r(x,a) - r(y,a)| + γ W_d(T(·|x,a), T(·|y,a))`. -/
def bisimIter (r : X → A → ℝ) (T : X → A → Measure X) (γ : ℝ) : ℕ → X → X → ℝ≥0∞
  | 0 => fun _ _ => 0
  | n + 1 => fun x y => ⨆ a, (ENNReal.ofReal ((1 - γ) * |r x a - r y a|) +
      ENNReal.ofReal γ * transportCost (bisimIter r T γ n) (T x a) (T y a))

/-- Definition 5 (Section 5.2, p. 6): the bisimulation metric `d̃`, the fixed point of `F`, obtained
as the limit of the nondecreasing iterates `d_n` started from `d_0 = 0` (as in the proof of Lemma 4,
Appendix A.4). -/
def bisimMetric (r : X → A → ℝ) (T : X → A → Measure X) (γ : ℝ) (x y : X) : ℝ≥0∞ :=
  ⨆ n, bisimIter r T γ n x y

/-- Section 6.1 (p. 7): a function seminorm `‖·‖_D` on real functions on `X`, allowed to take the
value `+∞` (as the Lipschitz seminorm does on non-Lipschitz functions). -/
structure FunSeminorm (X : Type*) where
  /-- The value `‖f‖_D`. -/
  toFun : (X → ℝ) → ℝ≥0∞
  /-- Absolute homogeneity `‖c f‖_D = |c| ‖f‖_D`. -/
  map_smul' : ∀ (c : ℝ) (f : X → ℝ), toFun (c • f) = ENNReal.ofReal |c| * toFun f
  /-- Triangle inequality `‖f + g‖_D ≤ ‖f‖_D + ‖g‖_D`. -/
  add_le' : ∀ f g : X → ℝ, toFun (f + g) ≤ toFun f + toFun g

/-- Definition 6 (Section 6.1, p. 7): the Maximum Mean Discrepancy generated by a class `F`,
`D(P,Q) = sup_{f ∈ F} |E_{x∼P} f(x) - E_{y∼Q} f(y)|`, over the members of `F` for which both
expectations exist. -/
def mmd (F : Set (X → ℝ)) (P Q : Measure X) : ℝ≥0∞ :=
  ⨆ (f : X → ℝ) (_ : f ∈ F ∧ Integrable f P ∧ Integrable f Q),
    ENNReal.ofReal |∫ x, f x ∂P - ∫ x, f x ∂Q|

/-- Section 6.1 (p. 7): the Norm-MMD metric of a function seminorm, generated by the class
`F_D = {f : ‖f‖_D ≤ 1}`. -/
def normMMD (sn : FunSeminorm X) (P Q : Measure X) : ℝ≥0∞ :=
  mmd {f | sn.toFun f ≤ 1} P Q

/-- Definition 7 (Section 6.2, p. 8): the policy `π` is `K`-smooth-valued for the Norm-MMD with
seminorm `‖·‖_D`: `‖V^π‖_D ≤ K` and `‖Q^π(·,a)‖_D ≤ K` for every action `a`. -/
def IsSmoothValued (sn : FunSeminorm X) (r : X → A → ℝ) (P : A → Kernel X X) (γ : ℝ)
    (π : Kernel X A) (K : ℝ≥0) : Prop :=
  sn.toFun (vValue r P γ π) ≤ K ∧ ∀ a, sn.toFun (fun x => qValue r P γ π x a) ≤ K

end General

section Latent

variable {S Sb A : Type*} [MeasurableSpace S] [MeasurableSpace Sb] [MeasurableSpace A] [Fintype A]

/-- Section 2.2 (p. 2): a policy `π̄` on the latent space, run on `M` through the embedding:
`π̄(·|s) := π̄(·|φ(s))`. -/
def liftPolicy [DiscreteMeasurableSpace S] (πb : Kernel Sb A) (φ : S → Sb) : Kernel S A :=
  πb.comap φ Measurable.of_discrete

/-- Section 2.2 (p. 2): `φP(·|s,a)`, the law of `φ(s')` for `s' ∼ P(·|s,a)`. -/
def embedTrans (P : A → Kernel S S) (φ : S → Sb) (s : S) (a : A) : Measure Sb :=
  (P a s).map φ

/-- Section 3, eq. (4) (p. 4): the global reward loss
`L^∞_R̄ = sup_{s,a} |R(s,a) - R̄(φ(s),a)|`. -/
def rewardLossGlobal (R : S → A → ℝ) (Rb : Sb → A → ℝ) (φ : S → Sb) : ℝ≥0∞ :=
  ⨆ s, ⨆ a, ENNReal.ofReal |R s a - Rb (φ s) a|

/-- Section 3, eq. (5) (p. 4): the global transition loss
`L^∞_P̄ = sup_{s,a} W(φP(·|s,a), P̄(·|φ(s),a))`. -/
def transLossGlobal [PseudoEMetricSpace Sb] (P : A → Kernel S S) (Pb : A → Kernel Sb Sb)
    (φ : S → Sb) : ℝ≥0∞ :=
  ⨆ s, ⨆ a, wasserstein (embedTrans P φ s a) (Pb a (φ s))

/-- Section 6.3 (p. 8) and Lemma 7 (Appendix A.6): the global transition loss with a Norm-MMD `D`,
`L^∞_P̄ = sup_{s,a} D(φP(·|s,a), P̄(·|φ(s),a))`. -/
def transLossGlobalMMD (sn : FunSeminorm Sb) (P : A → Kernel S S) (Pb : A → Kernel Sb Sb)
    (φ : S → Sb) : ℝ≥0∞ :=
  ⨆ s, ⨆ a, normMMD sn (embedTrans P φ s a) (Pb a (φ s))

/-- Section 4, eq. (6) (p. 5): the reward loss local to a state-action distribution `ξ`,
`L^ξ_R̄ = E_{(s,a)∼ξ} |R(s,a) - R̄(φ(s),a)|`. -/
def rewardLossLocal (ξ : Measure (S × A)) (R : S → A → ℝ) (Rb : Sb → A → ℝ) (φ : S → Sb) :
    ℝ≥0∞ :=
  ∫⁻ z, ENNReal.ofReal |R z.1 z.2 - Rb (φ z.1) z.2| ∂ξ

/-- Section 4, eq. (7) (p. 5): the transition loss local to a state-action distribution `ξ`,
`L^ξ_P̄ = E_{(s,a)∼ξ} W(φP(·|s,a), P̄(·|φ(s),a))`. -/
def transLossLocal [PseudoEMetricSpace Sb] (ξ : Measure (S × A)) (P : A → Kernel S S)
    (Pb : A → Kernel Sb Sb) (φ : S → Sb) : ℝ≥0∞ :=
  ∫⁻ z, wasserstein (embedTrans P φ z.1 z.2) (Pb z.2 (φ z.1)) ∂ξ

/-- Section 2.1 (p. 2): `ξ` is a stationary distribution of the policy `π` in `M`:
`ξ(s) = ∑_{ṡ,ȧ} P(s|ṡ,ȧ) π(ȧ|ṡ) ξ(ṡ)`. -/
def IsStationary (P : A → Kernel S S) (π : Kernel S A) (ξ : Measure S) : Prop :=
  IsProbabilityMeasure ξ ∧ ∀ s, ξ {s} = ∫⁻ s', ∑ a', π s' {a'} * P a' s' {s} ∂ξ

/-- Section 2.1 (p. 2): the state-action distribution `ξ_π(s,a) = ξ(s) π(a|s)`. -/
def stateActionDist (ξ : Measure S) (π : Kernel S A) : Measure (S × A) :=
  ξ.compProd π

/-- Lemma 5 (Appendix A.4, p. 19): reward of the MDP joining `M` and `M̄` on `S ⊕ S̄`. -/
def joinReward (R : S → A → ℝ) (Rb : Sb → A → ℝ) : S ⊕ Sb → A → ℝ
  | .inl s, a => R s a
  | .inr x, a => Rb x a

/-- Lemma 5 (Appendix A.4, p. 19): transition of the MDP joining `M` and `M̄` on `S ⊕ S̄`; each
state transitions according to the transition function of its own MDP. -/
def joinTrans (P : A → Kernel S S) (Pb : A → Kernel Sb Sb) : S ⊕ Sb → A → Measure (S ⊕ Sb)
  | .inl s, a => (P a s).map Sum.inl
  | .inr x, a => (Pb a x).map Sum.inr

end Latent

end DeepMDP
Source
Gelada, Kumar, Buckman, Nachum and Bellemare, DeepMDP: Learning Continuous Latent Space Models for Representation Learning, arXiv:1906.02736v1 (ICML 2019), Sections 2.1-2.4 (Definitions 1-3), Sections 3-4 (eqs. (4)-(7)), Section 5.2 (Definition 5), Section 6 (Definitions 6-7), Appendix A.4 (Lemma 5)
Read-back

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

Standing conventions (apply to every item below). XXX and AAA are arbitrary types, each with an arbitrary σ\sigmaσ-algebra, and AAA is finite. The σ\sigmaσ-algebra on AAA is not assumed discrete, so singletons {a}\{a\}{a} need not be measurable. For a kernel π\piπ from XXX to AAA, π(a∣x)\pi(a\mid x)π(a∣x) denotes the value πx({a})∈[0,∞]\pi_x(\{a\})\in[0,\infty]πx​({a})∈[0,∞] that the measure πx\pi_xπx​ assigns to the singleton {a}\{a\}{a}; if {a}\{a\}{a} is not measurable, this is the outer-measure value. Where a real number is needed, π(a∣x)R\pi(a\mid x)^{\mathbb R}π(a∣x)R denotes this value converted to a real number, with ∞↦0\infty\mapsto 0∞↦0. For a family of kernels P=(Pa)a∈AP=(P_a)_{a\in A}P=(Pa​)a∈A​ from XXX to XXX, P(⋅∣x,a)P(\cdot\mid x,a)P(⋅∣x,a) denotes the measure Pa(x)P_a(x)Pa​(x). In the latent section, SSS, Sˉ\bar SSˉ and AAA are arbitrary measurable spaces, with AAA finite.

IsCoupling. Given measures P,QP,QP,Q on XXX and a measure ccc on X×XX\times XX×X, this is the proposition that the push-forward of ccc under the first projection equals PPP and the push-forward under the second projection equals QQQ. PPP and QQQ are arbitrary measures, not necessarily probability measures. If PPP and QQQ have different total masses, no coupling exists. The set of such ccc is written Γ(P,Q)\Gamma(P,Q)Γ(P,Q).

transportCost. Given an arbitrary function d:X×X→[0,∞]d:X\times X\to[0,\infty]d:X×X→[0,∞] and measures P,QP,QP,Q on XXX, define

Wd(P,Q)=inf⁡c∈Γ(P,Q)∫−d(x,y) dc(x,y)∈[0,∞].W_d(P,Q)=\inf_{c\in\Gamma(P,Q)}\int^{-} d(x,y)\,dc(x,y)\in[0,\infty].Wd​(P,Q)=c∈Γ(P,Q)inf​∫−d(x,y)dc(x,y)∈[0,∞].
  • ddd is not assumed to be a metric, symmetric, or measurable.
  • The integral is the lower Lebesgue integral: the supremum of integrals of measurable simple functions below ddd.
  • The infimum over an empty set is +∞+\infty+∞, so Wd(P,Q)=∞W_d(P,Q)=\inftyWd​(P,Q)=∞ whenever no coupling exists, for example when PPP and QQQ have different total masses.

wasserstein. Assume XXX also carries an extended pseudometric eee. Distinct points may have distance 000, and distances may be ∞\infty∞. No compatibility is assumed between eee and the σ\sigmaσ-algebra of XXX. Then

W(P,Q)=We(P,Q)=inf⁡c∈Γ(P,Q)∫−e(x,y) dc(x,y)∈[0,∞],W(P,Q)=W_e(P,Q)=\inf_{c\in\Gamma(P,Q)}\int^{-} e(x,y)\,dc(x,y)\in[0,\infty],W(P,Q)=We​(P,Q)=c∈Γ(P,Q)inf​∫−e(x,y)dc(x,y)∈[0,∞],

which equals +∞+\infty+∞ when Γ(P,Q)=∅\Gamma(P,Q)=\varnothingΓ(P,Q)=∅.

IsMDP. For a reward r:X×A→Rr:X\times A\to\mathbb Rr:X×A→R, kernels PaP_aPa​ (a∈Aa\in Aa∈A) from XXX to XXX, and a real γ\gammaγ, this is the conjunction of four conditions:

  1. 0≤γ<10\le\gamma<10≤γ<1;
  2. every PaP_aPa​ is a Markov kernel, i.e. each P(⋅∣x,a)P(\cdot\mid x,a)P(⋅∣x,a) is a probability measure;
  3. for every aaa, the map x↦r(x,a)x\mapsto r(x,a)x↦r(x,a) is measurable;
  4. there is a real CCC with ∣r(x,a)∣≤C|r(x,a)|\le C∣r(x,a)∣≤C for all x,ax,ax,a.

evalIter. For rrr, PPP, γ\gammaγ as above and any kernel π\piπ from XXX to AAA, define real numbers Qn(x,a)Q_n(x,a)Qn​(x,a) by

Q0(x,a)=0,Qn+1(x,a)=r(x,a)+γ∫X∑a′∈Aπ(a′∣y)R Qn(y,a′) dP(y∣x,a).Q_0(x,a)=0,\qquad Q_{n+1}(x,a)=r(x,a)+\gamma\int_X\sum_{a'\in A}\pi(a'\mid y)^{\mathbb R}\,Q_n(y,a')\,dP(y\mid x,a).Q0​(x,a)=0,Qn+1​(x,a)=r(x,a)+γ∫X​a′∈A∑​π(a′∣y)RQn​(y,a′)dP(y∣x,a).
  • No hypotheses are imposed: γ\gammaγ is any real, π\piπ need not be Markov, PaP_aPa​ need not be Markov, and rrr need not be bounded or measurable.
  • The integral is the Bochner integral, which is defined to be 000 when the integrand is not integrable with respect to P(⋅∣x,a)P(\cdot\mid x,a)P(⋅∣x,a).

qValue. Qπ(x,a)Q^\pi(x,a)Qπ(x,a) is defined as the limit of the real sequence n↦Qn(x,a)n\mapsto Q_n(x,a)n↦Qn​(x,a) from evalIter, if that limit exists. If the sequence does not converge, Qπ(x,a)Q^\pi(x,a)Qπ(x,a) is an unspecified real number. No hypotheses on r,P,γ,πr,P,\gamma,\pir,P,γ,π are made.

vValue. The value is

Vπ(x)=∑a∈Aπ(a∣x)R Qπ(x,a),V^\pi(x)=\sum_{a\in A}\pi(a\mid x)^{\mathbb R}\,Q^\pi(x,a),Vπ(x)=a∈A∑​π(a∣x)RQπ(x,a),

with QπQ^\piQπ as in qValue. This includes its junk value when the defining sequence diverges.

IsOptimalPolicy. This asserts two things:

  • π\piπ is a Markov kernel from XXX to AAA;
  • for every Markov kernel π′\pi'π′ from XXX to AAA and every x∈Xx\in Xx∈X, Vπ′(x)≤Vπ(x)V^{\pi'}(x)\le V^\pi(x)Vπ′(x)≤Vπ(x).

VVV is as in vValue. No assumption that (r,P,γ)(r,P,\gamma)(r,P,γ) satisfies IsMDP is included.

optValue. The value is

V∗(x)=sup⁡{Vπ(x):π a Markov kernel from X to A},V^*(x)=\sup\{V^\pi(x):\pi\text{ a Markov kernel from }X\text{ to }A\},V∗(x)=sup{Vπ(x):π a Markov kernel from X to A},

taken as a supremum of real numbers. By the real-valued convention, it equals 000 if this set is empty or not bounded above. For example, the set is empty when A=∅A=\varnothingA=∅ and X≠∅X\ne\varnothingX=∅. No IsMDP assumption is included.

policyReward. The policy reward is

rπ(x)=∑a∈Aπ(a∣x)R r(x,a).r_\pi(x)=\sum_{a\in A}\pi(a\mid x)^{\mathbb R}\,r(x,a).rπ​(x)=a∈A∑​π(a∣x)Rr(x,a).

policyTrans. Pπ(⋅∣x)P_\pi(\cdot\mid x)Pπ​(⋅∣x) is the measure on XXX

Pπ(⋅∣x)=∑a∈Aπ(a∣x)⋅P(⋅∣x,a).P_\pi(\cdot\mid x)=\sum_{a\in A}\pi(a\mid x)\cdot P(\cdot\mid x,a).Pπ​(⋅∣x)=a∈A∑​π(a∣x)⋅P(⋅∣x,a).

The weights π(a∣x)∈[0,∞]\pi(a\mid x)\in[0,\infty]π(a∣x)∈[0,∞] are used unconverted, so a weight of ∞\infty∞ produces an infinite multiple of the measure.

IsLipschitzValued. Assume XXX carries an extended pseudometric eee. For K≥0K\ge0K≥0, π\piπ is KKK-Lipschitz-valued when:

  • ∣Vπ(x1)−Vπ(x2)∣≤K e(x1,x2)|V^\pi(x_1)-V^\pi(x_2)|\le K\,e(x_1,x_2)∣Vπ(x1​)−Vπ(x2​)∣≤Ke(x1​,x2​) for all x1,x2x_1,x_2x1​,x2​;
  • for every a∈Aa\in Aa∈A, ∣Qπ(x1,a)−Qπ(x2,a)∣≤K e(x1,x2)|Q^\pi(x_1,a)-Q^\pi(x_2,a)|\le K\,e(x_1,x_2)∣Qπ(x1​,a)−Qπ(x2​,a)∣≤Ke(x1​,x2​) for all x1,x2x_1,x_2x1​,x2​.

VπV^\piVπ and QπQ^\piQπ are as above, including junk values. The inequalities are read in [0,∞][0,\infty][0,∞]: they are automatic when e(x1,x2)=∞e(x_1,x_2)=\inftye(x1​,x2​)=∞ and K>0K>0K>0. When e(x1,x2)=0e(x_1,x_2)=0e(x1​,x2​)=0, they force equal values. π\piπ is not required to be Markov, and no IsMDP assumption is included.

IsLipschitzMDP. Assume XXX carries an extended pseudometric eee. For KR,KP≥0K_R,K_P\ge0KR​,KP​≥0, the condition is that for every a∈Aa\in Aa∈A:

  • ∣r(x,a)−r(y,a)∣≤KR e(x,y)|r(x,a)-r(y,a)|\le K_R\,e(x,y)∣r(x,a)−r(y,a)∣≤KR​e(x,y) for all x,yx,yx,y;
  • W(P(⋅∣x,a),P(⋅∣y,a))≤KP e(x,y)W\big(P(\cdot\mid x,a),P(\cdot\mid y,a)\big)\le K_P\,e(x,y)W(P(⋅∣x,a),P(⋅∣y,a))≤KP​e(x,y) for all x,yx,yx,y, in [0,∞][0,\infty][0,∞] with 0⋅∞=00\cdot\infty=00⋅∞=0.

WWW is the Wasserstein cost defined above, which is ∞\infty∞ for measures without a coupling. The kernels are not required to be Markov.

bisimIter. Here TTT assigns to each (x,a)(x,a)(x,a) an arbitrary measure T(x,a)T(x,a)T(x,a) on XXX; it is not required to be a kernel, measurable in xxx, or a probability measure. rrr and γ\gammaγ are arbitrary. Define dn:X×X→[0,∞]d_n:X\times X\to[0,\infty]dn​:X×X→[0,∞] by d0≡0d_0\equiv0d0​≡0 and

dn+1(x,y)=sup⁡a∈A([(1−γ) ∣r(x,a)−r(y,a)∣]++γ+⋅Wdn(T(x,a),T(y,a))).d_{n+1}(x,y)=\sup_{a\in A}\Big(\big[(1-\gamma)\,|r(x,a)-r(y,a)|\big]^+ + \gamma^+\cdot W_{d_n}\big(T(x,a),T(y,a)\big)\Big).dn+1​(x,y)=a∈Asup​([(1−γ)∣r(x,a)−r(y,a)∣]++γ+⋅Wdn​​(T(x,a),T(y,a))).
  • t+=max⁡(t,0)t^+=\max(t,0)t+=max(t,0), so negative quantities are truncated to 000: the first term vanishes if γ>1\gamma>1γ>1, and the second vanishes if γ≤0\gamma\le0γ≤0.
  • WdnW_{d_n}Wdn​​ is transportCost with cost dnd_ndn​.
  • If A=∅A=\varnothingA=∅, the supremum is 000.

bisimMetric. The value is

d~(x,y)=sup⁡n≥0dn(x,y)∈[0,∞],\tilde d(x,y)=\sup_{n\ge0}d_n(x,y)\in[0,\infty],d~(x,y)=n≥0sup​dn​(x,y)∈[0,∞],

with dnd_ndn​ from bisimIter. It is defined as this supremum; nothing in the definition asserts that it is a fixed point, a metric, or finite.

FunSeminorm. A function seminorm on XXX is a map ∥⋅∥D\|\cdot\|_D∥⋅∥D​ from all functions f:X→Rf:X\to\mathbb Rf:X→R (no measurability required) to [0,∞][0,\infty][0,∞] satisfying:

  • ∥cf∥D=∣c∣ ∥f∥D\|c f\|_D=|c|\,\|f\|_D∥cf∥D​=∣c∣∥f∥D​ for every real ccc and every fff, with 0⋅∞=00\cdot\infty=00⋅∞=0, so ∥0∥D=0\|0\|_D=0∥0∥D​=0;
  • ∥f+g∥D≤∥f∥D+∥g∥D\|f+g\|_D\le\|f\|_D+\|g\|_D∥f+g∥D​≤∥f∥D​+∥g∥D​ for all f,gf,gf,g.

Nonzero functions may have seminorm 000.

mmd. For a set FFF of real functions on XXX and measures P,QP,QP,Q on XXX, define

DF(P,Q)=sup⁡{∣∫f dP−∫f dQ∣:f∈F, f integrable w.r.t. both P and Q}∈[0,∞].D_F(P,Q)=\sup\Big\{\Big|\int f\,dP-\int f\,dQ\Big| : f\in F,\ f\text{ integrable w.r.t. both }P\text{ and }Q\Big\}\in[0,\infty].DF​(P,Q)=sup{​∫fdP−∫fdQ​:f∈F, f integrable w.r.t. both P and Q}∈[0,∞].

Members of FFF that are not integrable with respect to both measures are ignored. The supremum of the empty set is 000.

normMMD. Given a function seminorm ∥⋅∥D\|\cdot\|_D∥⋅∥D​ (as in FunSeminorm), the value is DFD(P,Q)D_{F_D}(P,Q)DFD​​(P,Q) as in mmd, with

FD={f:X→R: ∥f∥D≤1}.F_D=\{f:X\to\mathbb R:\ \|f\|_D\le1\}.FD​={f:X→R: ∥f∥D​≤1}.

IsSmoothValued. Given a function seminorm ∥⋅∥D\|\cdot\|_D∥⋅∥D​ on XXX and K≥0K\ge0K≥0, the condition is:

  • ∥Vπ∥D≤K\|V^\pi\|_D\le K∥Vπ∥D​≤K;
  • ∥Qπ(⋅,a)∥D≤K\|Q^\pi(\cdot,a)\|_D\le K∥Qπ(⋅,a)∥D​≤K for every a∈Aa\in Aa∈A.

VπV^\piVπ and QπQ^\piQπ are as above, including junk values. No Markov or IsMDP assumptions are included.

liftPolicy. Assume every subset of SSS is measurable. Given a kernel πˉ\bar\piπˉ from Sˉ\bar SSˉ to AAA and an arbitrary map φ:S→Sˉ\varphi:S\to\bar Sφ:S→Sˉ, the lifted kernel from SSS to AAA sends sss to the measure πˉ(⋅∣φ(s))\bar\pi(\cdot\mid\varphi(s))πˉ(⋅∣φ(s)).

embedTrans. Given kernels PaP_aPa​ from SSS to SSS and an arbitrary map φ:S→Sˉ\varphi:S\to\bar Sφ:S→Sˉ, φP(⋅∣s,a)\varphi P(\cdot\mid s,a)φP(⋅∣s,a) is the push-forward of P(⋅∣s,a)P(\cdot\mid s,a)P(⋅∣s,a) under φ\varphiφ. φ\varphiφ is not assumed measurable. If φ\varphiφ is not almost-everywhere measurable with respect to P(⋅∣s,a)P(\cdot\mid s,a)P(⋅∣s,a), the push-forward is by convention the zero measure.

rewardLossGlobal. For R:S×A→RR:S\times A\to\mathbb RR:S×A→R, Rˉ:Sˉ×A→R\bar R:\bar S\times A\to\mathbb RRˉ:Sˉ×A→R and φ:S→Sˉ\varphi:S\to\bar Sφ:S→Sˉ, define

LRˉ∞=sup⁡s∈Ssup⁡a∈A∣R(s,a)−Rˉ(φ(s),a)∣∈[0,∞].L^\infty_{\bar R}=\sup_{s\in S}\sup_{a\in A}\big|R(s,a)-\bar R(\varphi(s),a)\big|\in[0,\infty].LRˉ∞​=s∈Ssup​a∈Asup​​R(s,a)−Rˉ(φ(s),a)​∈[0,∞].

It equals 000 if SSS or AAA is empty.

transLossGlobal. Assume Sˉ\bar SSˉ carries an extended pseudometric. For kernels PaP_aPa​ on SSS, kernels Pˉa\bar P_aPˉa​ on Sˉ\bar SSˉ, and an arbitrary φ\varphiφ, define

LPˉ∞=sup⁡s∈Ssup⁡a∈AW(φP(⋅∣s,a), Pˉ(⋅∣φ(s),a))∈[0,∞].L^\infty_{\bar P}=\sup_{s\in S}\sup_{a\in A}W\big(\varphi P(\cdot\mid s,a),\ \bar P(\cdot\mid\varphi(s),a)\big)\in[0,\infty].LPˉ∞​=s∈Ssup​a∈Asup​W(φP(⋅∣s,a), Pˉ(⋅∣φ(s),a))∈[0,∞].
  • WWW is the Wasserstein cost on Sˉ\bar SSˉ, which is ∞\infty∞ when the two measures admit no coupling. This happens, for instance, when their total masses differ, including when the push-forward is the junk zero measure.
  • The value is 000 if SSS or AAA is empty.

transLossGlobalMMD. This is the same as transLossGlobal, except that WWW is replaced by the Norm-MMD DDD of a given function seminorm on Sˉ\bar SSˉ:

sup⁡ssup⁡aD(φP(⋅∣s,a),Pˉ(⋅∣φ(s),a)).\sup_{s}\sup_{a}D\big(\varphi P(\cdot\mid s,a),\bar P(\cdot\mid\varphi(s),a)\big).ssup​asup​D(φP(⋅∣s,a),Pˉ(⋅∣φ(s),a)).

rewardLossLocal. For an arbitrary measure ξ\xiξ on S×AS\times AS×A (not required to be a probability measure), define

LRˉξ=∫−∣R(s,a)−Rˉ(φ(s),a)∣ dξ(s,a)∈[0,∞].L^\xi_{\bar R}=\int^{-}\big|R(s,a)-\bar R(\varphi(s),a)\big|\,d\xi(s,a)\in[0,\infty].LRˉξ​=∫−​R(s,a)−Rˉ(φ(s),a)​dξ(s,a)∈[0,∞].

The integral is the lower Lebesgue integral; no measurability is assumed.

transLossLocal. Assume Sˉ\bar SSˉ carries an extended pseudometric. For an arbitrary measure ξ\xiξ on S×AS\times AS×A, define

LPˉξ=∫−W(φP(⋅∣s,a), Pˉ(⋅∣φ(s),a)) dξ(s,a)∈[0,∞].L^\xi_{\bar P}=\int^{-}W\big(\varphi P(\cdot\mid s,a),\ \bar P(\cdot\mid\varphi(s),a)\big)\,d\xi(s,a)\in[0,\infty].LPˉξ​=∫−W(φP(⋅∣s,a), Pˉ(⋅∣φ(s),a))dξ(s,a)∈[0,∞].

The integral is the lower Lebesgue integral, and WWW is as in transLossGlobal, with the same zero-measure and no-coupling conventions.

IsStationary. For kernels PaP_aPa​ on SSS, a kernel π\piπ from SSS to AAA, and a measure ξ\xiξ on SSS, the conditions are:

  • ξ\xiξ is a probability measure;
  • for every single point s∈Ss\in Ss∈S,
ξ({s})=∫−∑a′∈Aπ(a′∣s′) P({s}∣s′,a′) dξ(s′).\xi(\{s\})=\int^{-}\sum_{a'\in A}\pi(a'\mid s')\,P(\{s\}\mid s',a')\,d\xi(s').ξ({s})=∫−a′∈A∑​π(a′∣s′)P({s}∣s′,a′)dξ(s′).

Only the masses of singletons are constrained; general measurable sets are not. If all relevant singleton masses are 000, as for atomless measures, the condition reduces to 0=00=00=0. Neither π\piπ nor the PaP_aPa​ are required to be Markov.

stateActionDist. ξπ\xi_\piξπ​ is the composition-product measure on S×AS\times AS×A:

ξπ(B)=∫π({a:(s,a)∈B}∣s) dξ(s).\xi_\pi(B)=\int\pi\big(\{a:(s,a)\in B\}\mid s\big)\,d\xi(s).ξπ​(B)=∫π({a:(s,a)∈B}∣s)dξ(s).

This holds when ξ\xiξ is sss-finite and π\piπ is an sss-finite kernel. Otherwise, ξπ\xi_\piξπ​ is by convention the zero measure.

joinReward. On the disjoint union S⊔SˉS\sqcup\bar SS⊔Sˉ, the joined reward is R(s,a)R(s,a)R(s,a) at a point sss from SSS and Rˉ(x,a)\bar R(x,a)Rˉ(x,a) at a point xxx from Sˉ\bar SSˉ.

joinTrans. On S⊔SˉS\sqcup\bar SS⊔Sˉ, the transition measures are:

  • at a point sss from SSS with action aaa: the push-forward of P(⋅∣s,a)P(\cdot\mid s,a)P(⋅∣s,a) under the inclusion S↪S⊔SˉS\hookrightarrow S\sqcup\bar SS↪S⊔Sˉ;
  • at a point xxx from Sˉ\bar SSˉ: the push-forward of Pˉ(⋅∣x,a)\bar P(\cdot\mid x,a)Pˉ(⋅∣x,a) under the inclusion Sˉ↪S⊔Sˉ\bar S\hookrightarrow S\sqcup\bar SSˉ↪S⊔Sˉ.

Hence the two components never transition into each other.

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