Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 5, bound after Theorem 2 (as proved): value bound with learning error L\mathcal LL

Proved
DeepBisimulationControl.value_bound_learning_error

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

bisimulation-metricmarkov-decision-processreinforcement-learningstate-aggregationwasserstein-distance

Let S\mathcal SS be a finite state space, A\mathcal AA a finite nonempty action space, P\mathcal PP a transition kernel, R\mathcal RR a reward function, γ∈[0,1)\gamma\in[0,1)γ∈[0,1) and c<1c<1c<1 with γ≤c\gamma\le cγ≤c, and let d~\tilde dd~ be the bisimulation metric of Definition 2. Let ψ:S→Rm\psi:\mathcal S\to\mathbb R^mψ:S→Rm be an encoder with learning error

L=sup⁡si,sj∈S∣ ∥ψ(si)−ψ(sj)∥1−d~(si,sj)∣.\mathcal L=\sup_{s_i,s_j\in\mathcal S}\big|\,\|\psi(s_i)-\psi(s_j)\|_1-\tilde d(s_i,s_j)\big|.L=si​,sj​∈Ssup​​∥ψ(si​)−ψ(sj​)∥1​−d~(si​,sj​)​.

Let ε>0\varepsilon>0ε>0 and let ϕ:S→C\phi:\mathcal S\to Cϕ:S→C map onto a finite set of clusters, each contained in an ε\varepsilonε-neighborhood of some state for the learned distance ∥ψ(⋅)−ψ(⋅)∥1\|\psi(\cdot)-\psi(\cdot)\|_1∥ψ(⋅)−ψ(⋅)∥1​. Let Vˉ∗\bar V^*Vˉ∗ be the optimal value function of the aggregated MDP. Then for every state sss,

∣V∗(s)−Vˉ∗(ϕ(s))∣≤2ε+2L(1−γ)(1−c).|V^*(s)-\bar V^*(\phi(s))|\le\frac{2\varepsilon+2\mathcal L}{(1-\gamma)(1-c)}.∣V∗(s)−Vˉ∗(ϕ(s))∣≤(1−γ)(1−c)2ε+2L​.

Formalization Note The paper states this bound in one sentence after Theorem 2 and uses ϕ\phiϕ both for the encoder and for the map to clusters. Here the encoder is ψ\psiψ and the clusters are ε\varepsilonε-neighborhoods for the learned distance, which is the reading under which L\mathcal LL enters the bound. The hypothesis γ≤c\gamma\le cγ≤c and the use of the Definition 2 metric are inherited from Theorem 2 (as proved).

Preamble
import Mathlib
import Definitions.Def_DeepBisimulationControl_Basic

open Filter Topology
Formal statement
namespace DeepBisimulationControl

theorem value_bound_learning_error {S A C : Type*} [Fintype S] [DecidableEq S] [Fintype A]
    [Nonempty A] [Fintype C] [DecidableEq C]
    (P : S → A → S → ℝ) (hP : IsKernel P) (R : S → A → ℝ) (gamma c : ℝ)
    (hg0 : 0 ≤ gamma) (hg1 : gamma < 1) (hc1 : c < 1) (hgc : gamma ≤ c)
    {m : ℕ} (psi : S → Fin m → ℝ) (eps : ℝ) (heps : 0 < eps) (phi : S → C)
    (hphi : Function.Surjective phi)
    (hnbhd : IsEpsAggregation (fun u v => l1Dist (psi u) (psi v)) phi eps) (s : S) :
    |optValue P R gamma s - optValue (aggKernel P phi) (aggReward R phi) gamma (phi s)| ≤
      (2 * eps + 2 * learningError (bisimMetric P R c) psi) / ((1 - gamma) * (1 - c)) := by sorry

end DeepBisimulationControl
Source
Zhang, McAllister, Calandra, Gal and Levine, Learning Invariant Representations for Reinforcement Learning without Reconstruction, arXiv:2006.10742v2 (ICLR 2021), Section 5, paragraph after Theorem 2, p. 5
Read-back

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

Setting. Let SSS, AAA, CCC be finite types:

  • SSS is the state space, with decidable equality. It is nonempty, because a state s∈Ss \in Ss∈S is supplied.
  • AAA is the action set, assumed nonempty.
  • CCC is a set of "cluster labels", with decidable equality.

The data and hypotheses are:

  • Transition kernel. P(s′∣s,a)P(s' \mid s, a)P(s′∣s,a) is a real-valued function. For every s,as, as,a it is a probability distribution on SSS: every value satisfies P(s′∣s,a)≥0P(s'\mid s,a) \ge 0P(s′∣s,a)≥0, and ∑s′P(s′∣s,a)=1\sum_{s'} P(s'\mid s,a) = 1∑s′​P(s′∣s,a)=1.
  • Reward. R:S×A→RR : S \times A \to \mathbb{R}R:S×A→R is an arbitrary real function, with no boundedness or sign condition.
  • Discount and bisimulation weight. γ,c\gamma, cγ,c are reals with
0≤γ<1,γ≤c,c<1.0 \le \gamma < 1, \qquad \gamma \le c, \qquad c < 1.0≤γ<1,γ≤c,c<1.

Hence 0≤γ≤c<10 \le \gamma \le c < 10≤γ≤c<1. The case γ=0\gamma = 0γ=0 is allowed, and so is c=0c = 0c=0 (only when γ=0\gamma = 0γ=0).

  • Encoder. m∈Nm \in \mathbb{N}m∈N is arbitrary, including m=0m = 0m=0. The encoder is a map ψ:S→Rm\psi : S \to \mathbb{R}^mψ:S→Rm, compared with the ℓ1\ell_1ℓ1​ distance ∥x−y∥1=∑i=1m∣xi−yi∣\|x - y\|_1 = \sum_{i=1}^m |x_i - y_i|∥x−y∥1​=∑i=1m​∣xi​−yi​∣. When m=0m = 0m=0, all these distances are 000.
  • Radius. ε>0\varepsilon > 0ε>0 is a real number.
  • Clustering. ϕ:S→C\phi : S \to Cϕ:S→C is a surjective map, so every cluster ϕ−1(k)\phi^{-1}(k)ϕ−1(k), k∈Ck \in Ck∈C, is a nonempty set of states.
  • ε\varepsilonε-aggregation hypothesis. For every label k∈Ck \in Ck∈C there exists some state s0∈Ss_0 \in Ss0​∈S with
∥ψ(s0)−ψ(s)∥1≤εfor all s with ϕ(s)=k.\|\psi(s_0) - \psi(s)\|_1 \le \varepsilon \quad \text{for all } s \text{ with } \phi(s) = k.∥ψ(s0​)−ψ(s)∥1​≤εfor all s with ϕ(s)=k.

The centre s0s_0s0​ need not itself lie in cluster kkk. The closeness is measured in the encoder's ℓ1\ell_1ℓ1​ distance, not in any bisimulation distance.

Values. For a stationary stochastic policy π\piπ (nonnegative weights π(a∣s)\pi(a \mid s)π(a∣s) with ∑aπ(a∣s)=1\sum_a \pi(a\mid s) = 1∑a​π(a∣s)=1), define the on-policy reward and transition matrix:

rπ(s)=∑aπ(a∣s)R(s,a),Pπ(s,s′)=∑aπ(a∣s)P(s′∣s,a).r^\pi(s) = \sum_a \pi(a\mid s) R(s,a), \qquad P^\pi(s, s') = \sum_a \pi(a\mid s) P(s'\mid s,a).rπ(s)=a∑​π(a∣s)R(s,a),Pπ(s,s′)=a∑​π(a∣s)P(s′∣s,a).

The value of π\piπ is the series

Vπ(s)=∑n=0∞γn((Pπ)nrπ)(s),V^\pi(s) = \sum_{n=0}^\infty \gamma^n \big((P^\pi)^n r^\pi\big)(s),Vπ(s)=n=0∑∞​γn((Pπ)nrπ)(s),

with γ0=1\gamma^0 = 1γ0=1. By convention, a non-summable series is assigned the value 000.

The optimal value V∗(s)V^*(s)V∗(s) is the supremum of Vπ(s)V^\pi(s)Vπ(s) over all such policies. By convention, a supremum of a family that is not bounded above is assigned the value 000.

Aggregated MDP. The aggregated MDP Mˉ\bar MMˉ has state space CCC and action set AAA. Write ∣k∣|k|∣k∣ for the number of states in cluster kkk; it is positive by surjectivity. The transitions and rewards are cluster averages:

Pˉ(k′∣k,a)=1∣k∣∑ϕ(s)=k  ∑ϕ(s′)=k′P(s′∣s,a),Rˉ(k,a)=1∣k∣∑ϕ(s)=kR(s,a).\bar P(k' \mid k, a) = \frac{1}{|k|} \sum_{\phi(s) = k} \; \sum_{\phi(s') = k'} P(s' \mid s, a), \qquad \bar R(k, a) = \frac{1}{|k|} \sum_{\phi(s) = k} R(s, a).Pˉ(k′∣k,a)=∣k∣1​ϕ(s)=k∑​ϕ(s′)=k′∑​P(s′∣s,a),Rˉ(k,a)=∣k∣1​ϕ(s)=k∑​R(s,a).

Vˉ∗\bar V^*Vˉ∗ denotes the optimal value of Mˉ\bar MMˉ, defined by the same supremum-of-series construction, with the same discount γ\gammaγ.

Bisimulation metric. For a cost function ddd on S×SS \times SS×S and distributions μ,ν\mu, \nuμ,ν on SSS, the quantity W1(μ,ν;d)W_1(\mu, \nu; d)W1​(μ,ν;d) is defined as an infimum over couplings:

  • A coupling is a nonnegative ggg on S×SS \times SS×S with marginals ∑yg(x,y)=μ(x)\sum_y g(x,y) = \mu(x)∑y​g(x,y)=μ(x) and ∑xg(x,y)=ν(y)\sum_x g(x,y) = \nu(y)∑x​g(x,y)=ν(y).
  • W1(μ,ν;d)W_1(\mu, \nu; d)W1​(μ,ν;d) is the infimum of ∑x,yg(x,y) d(x,y)\sum_{x,y} g(x,y)\, d(x,y)∑x,y​g(x,y)d(x,y) over all couplings.
  • By convention, the infimum is 000 if the set of costs is empty or not bounded below.

The operator FFF acts on cost functions by

F(d)(s,t)=max⁡a∈A[(1−c) ∣R(s,a)−R(t,a)∣+c W1(P(⋅∣s,a),P(⋅∣t,a);d)].F(d)(s,t) = \max_{a \in A} \Big[ (1-c)\,|R(s,a) - R(t,a)| + c\, W_1\big(P(\cdot\mid s,a), P(\cdot \mid t,a); d\big) \Big].F(d)(s,t)=a∈Amax​[(1−c)∣R(s,a)−R(t,a)∣+cW1​(P(⋅∣s,a),P(⋅∣t,a);d)].

The bisimulation metric is the pointwise supremum of the iterates of FFF started from the zero function:

d~(s,t)=sup⁡n∈NFn(0)(s,t).\tilde d(s,t) = \sup_{n \in \mathbb{N}} F^n(0)(s,t).d~(s,t)=n∈Nsup​Fn(0)(s,t).

Here F0(0)=0F^0(0) = 0F0(0)=0, and the supremum is assigned the value 000 if it is unbounded.

Learning error. The learning error of ψ\psiψ is

L=max⁡(si,sj)∈S×S∣∥ψ(si)−ψ(sj)∥1−d~(si,sj)∣.L = \max_{(s_i, s_j) \in S \times S} \Big| \|\psi(s_i) - \psi(s_j)\|_1 - \tilde d(s_i, s_j) \Big|.L=(si​,sj​)∈S×Smax​​∥ψ(si​)−ψ(sj​)∥1​−d~(si​,sj​)​.

Conclusion. For the given state sss:

∣V∗(s)−Vˉ∗(ϕ(s))∣  ≤  2ε+2L(1−γ)(1−c).\big| V^*(s) - \bar V^*(\phi(s)) \big| \;\le\; \frac{2\varepsilon + 2L}{(1-\gamma)(1-c)}.​V∗(s)−Vˉ∗(ϕ(s))​≤(1−γ)(1−c)2ε+2L​.
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