Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4 (as proved, part 1): the bisimulation metric ignores factors outside AN(R)AN(R)AN(R)

Proved
DeepBisimulationControl.task_generalization_non_ancestors

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

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

Let the state space be a product S=∏i∈ISi\mathcal S=\prod_{i\in I}\mathcal S^iS=∏i∈I​Si of finitely many finite factors, and let A\mathcal AA be a finite nonempty action space. Suppose the one-step dynamics factorise along a causal graph:

P(s′∣s,a)=∏i∈ITi(s′i∣s,a),\mathcal P(s'\mid s,a)=\prod_{i\in I}T_i(s'^i\mid s,a),P(s′∣s,a)=i∈I∏​Ti​(s′i∣s,a),

where each Ti(⋅∣s,a)T_i(\cdot\mid s,a)Ti​(⋅∣s,a) is a probability distribution on Si\mathcal S^iSi that depends on sss only through the factors in pa(i)\mathrm{pa}(i)pa(i), and the reward R(s,a)\mathcal R(s,a)R(s,a) depends on sss only through the factors in pa(R)\mathrm{pa}(R)pa(R). Let AN(R)AN(R)AN(R) be the causal ancestors of the reward, the factors with a directed path to the reward. Let c∈[0,1)c\in[0,1)c∈[0,1) and let d~\tilde dd~ be the bisimulation metric of Definition 2. If two states s,s′s,s's,s′ agree on every factor in AN(R)AN(R)AN(R), then

d~(s,s′)=0,\tilde d(s,s')=0,d~(s,s′)=0,

and every encoder ϕ:S→Rm\phi:\mathcal S\to\mathbb R^mϕ:S→Rm with ∥ϕ(si)−ϕ(sj)∥1=d~(si,sj)\|\phi(s_i)-\phi(s_j)\|_1=\tilde d(s_i,s_j)∥ϕ(si​)−ϕ(sj​)∥1​=d~(si​,sj​) for all si,sjs_i,s_jsi​,sj​ satisfies ϕ(s)=ϕ(s′)\phi(s)=\phi(s')ϕ(s)=ϕ(s′).

So a bisimulation representation does not change when only factors outside AN(R)AN(R)AN(R) change.

Formalization Note The printed Theorem 4 says informally that Z\mathcal ZZ "encodes information about all the causal ancestors of the reward". Its proof has two parts. This statement is part 1, which is the precise claim the proof makes. Part 2 only says that a change of an ancestor "can" give a positive distance and is not included. The proof uses the maximum over actions of eq. (3), so d~\tilde dd~ is the metric of Definition 2.

Preamble
import Mathlib
import Definitions.Def_DeepBisimulationControl_Basic

open Filter Topology
Formal statement
namespace DeepBisimulationControl

theorem task_generalization_non_ancestors {I A : Type*} [Fintype I] [DecidableEq I]
    {X : I → Type*} [∀ i, Fintype (X i)] [∀ i, DecidableEq (X i)] [Fintype A] [Nonempty A]
    (T : ∀ i, (∀ j, X j) → A → X i → ℝ)
    (hT0 : ∀ i s a x, 0 ≤ T i s a x) (hT1 : ∀ i s a, ∑ x, T i s a x = 1)
    (pa : I → Set I) (hpa : ∀ i a x, DependsOnlyOn (fun s => T i s a x) (pa i))
    (R : (∀ j, X j) → A → ℝ) (paR : Set I) (hR : ∀ a, DependsOnlyOn (fun s => R s a) paR)
    (c : ℝ) (hc0 : 0 ≤ c) (hc1 : c < 1)
    (s s' : ∀ j, X j) (hss' : ∀ j ∈ causalAncestors pa paR, s j = s' j) :
    bisimMetric (factoredKernel T) R c s s' = 0 ∧
    ∀ (m : ℕ) (phi : (∀ j, X j) → Fin m → ℝ),
      (∀ u v, l1Dist (phi u) (phi v) = bisimMetric (factoredKernel T) R c u v) → phi s = phi s' := 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, Definition 3 and Theorem 4, pp. 5-6; proof in Appendix A, part 1), p. 12
Read-back

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

Let III be a finite index set of factors. For each i∈Ii \in Ii∈I, let XiX_iXi​ be a finite set (with decidable equality). The state space is the finite product

S=∏j∈IXj,S = \prod_{j \in I} X_j ,S=j∈I∏​Xj​,

and a state s∈Ss \in Ss∈S has components sj∈Xjs_j \in X_jsj​∈Xj​. Let AAA be a finite, nonempty set of actions.

The data and hypotheses.

  • Factor transitions. For each factor iii, state sss, action aaa and value x∈Xix \in X_ix∈Xi​, a real number Ti(x∣s,a)T_i(x \mid s, a)Ti​(x∣s,a) is given, with:
    • Ti(x∣s,a)≥0T_i(x \mid s,a) \ge 0Ti​(x∣s,a)≥0 for all i,s,a,xi, s, a, xi,s,a,x;
    • ∑x∈XiTi(x∣s,a)=1\sum_{x \in X_i} T_i(x \mid s,a) = 1∑x∈Xi​​Ti​(x∣s,a)=1 for all i,s,ai, s, ai,s,a.
  • Parent sets of factors. For each factor iii there is an arbitrary set pa(i)⊆I\mathrm{pa}(i) \subseteq Ipa(i)⊆I. For every i,a,xi, a, xi,a,x, the map s↦Ti(x∣s,a)s \mapsto T_i(x \mid s,a)s↦Ti​(x∣s,a) depends only on the components sjs_jsj​ with j∈pa(i)j \in \mathrm{pa}(i)j∈pa(i): if two states agree on every j∈pa(i)j \in \mathrm{pa}(i)j∈pa(i), they give the same value.
  • Reward and its parents. There is a real-valued reward R:S×A→RR : S \times A \to \mathbb{R}R:S×A→R, with no boundedness or sign assumption, and an arbitrary set paR⊆I\mathrm{pa}_R \subseteq IpaR​⊆I. For every action aaa, the map s↦R(s,a)s \mapsto R(s,a)s↦R(s,a) depends only on the components sjs_jsj​ with j∈paRj \in \mathrm{pa}_Rj∈paR​.
  • Weight. There is a real number ccc with 0≤c<10 \le c < 10≤c<1.
  • Two states. There are states s,s′∈Ss, s' \in Ss,s′∈S with sj=sj′s_j = s'_jsj​=sj′​ for every j∈AN(R)j \in \mathrm{AN}(R)j∈AN(R).

Causal ancestors. The set AN(R)\mathrm{AN}(R)AN(R) consists of the factors jjj for which some i∈paRi \in \mathrm{pa}_Ri∈paR​ and some chain j=j0,j1,…,jk=ij = j_0, j_1, \dots, j_k = ij=j0​,j1​,…,jk​=i exist, with k≥0k \ge 0k≥0 and jl∈pa(jl+1)j_{l} \in \mathrm{pa}(j_{l+1})jl​∈pa(jl+1​) for each lll. Because k=0k = 0k=0 is allowed, paR⊆AN(R)\mathrm{pa}_R \subseteq \mathrm{AN}(R)paR​⊆AN(R). If AN(R)=I\mathrm{AN}(R) = IAN(R)=I, the hypothesis forces s=s′s = s's=s′. If AN(R)=∅\mathrm{AN}(R) = \varnothingAN(R)=∅, for example when paR=∅\mathrm{pa}_R = \varnothingpaR​=∅, the hypothesis is automatically satisfied by any pair of states.

Objects in the conclusion.

  • Factored kernel. The transition kernel is
P(s′′∣t,a)=∏i∈ITi(si′′∣t,a).P(s'' \mid t, a) = \prod_{i \in I} T_i(s''_i \mid t, a).P(s′′∣t,a)=i∈I∏​Ti​(si′′​∣t,a).
  • Couplings. For real vectors μ,ν\mu, \nuμ,ν on SSS, a coupling is a function g:S×S→Rg : S \times S \to \mathbb{R}g:S×S→R with:
    • g≥0g \ge 0g≥0;
    • row sums ∑yg(x,y)=μ(x)\sum_y g(x,y) = \mu(x)∑y​g(x,y)=μ(x);
    • column sums ∑xg(x,y)=ν(y)\sum_x g(x,y) = \nu(y)∑x​g(x,y)=ν(y).
  • Wasserstein distance. For a cost ddd on S×SS \times SS×S,
W1(μ,ν;d)=inf⁡{∑x,yg(x,y) d(x,y)  :  g a coupling of μ,ν}.W_1(\mu,\nu; d) = \inf\Big\{ \textstyle\sum_{x,y} g(x,y)\, d(x,y) \;:\; g \text{ a coupling of } \mu,\nu \Big\}.W1​(μ,ν;d)=inf{∑x,y​g(x,y)d(x,y):g a coupling of μ,ν}.

This is the real-number infimum. By convention it equals 000 if the set is empty or unbounded below.

  • Bisimulation operator. For a function d:S×S→Rd : S \times S \to \mathbb{R}d:S×S→R, the operator is
F(d)(t,u)=max⁡a∈A[(1−c) ∣R(t,a)−R(u,a)∣+c W1(P(⋅∣t,a),P(⋅∣u,a);d)].F(d)(t,u) = \max_{a \in A} \Big[ (1-c)\,|R(t,a) - R(u,a)| + c\, W_1\big(P(\cdot \mid t,a), P(\cdot \mid u,a); d\big) \Big].F(d)(t,u)=a∈Amax​[(1−c)∣R(t,a)−R(u,a)∣+cW1​(P(⋅∣t,a),P(⋅∣u,a);d)].
  • Bisimulation metric. It is defined as
d~(t,u)=sup⁡n∈NFn(0)(t,u),\tilde d(t,u) = \sup_{n \in \mathbb{N}} F^n(0)(t,u),d~(t,u)=n∈Nsup​Fn(0)(t,u),

where FnF^nFn is the nnn-fold iterate of FFF applied to the zero function, and F0(0)=0F^0(0) = 0F0(0)=0. This is a real-number supremum. By convention it equals 000 if the sequence Fn(0)(t,u)F^n(0)(t,u)Fn(0)(t,u) is unbounded above.

  • ℓ1\ell_1ℓ1​ distance. For x,y∈Rmx, y \in \mathbb{R}^mx,y∈Rm,
∥x−y∥1=∑i=1m∣xi−yi∣.\|x - y\|_1 = \sum_{i=1}^m |x_i - y_i| .∥x−y∥1​=i=1∑m​∣xi​−yi​∣.

Conclusion. Both of the following hold:

  1. d~(s,s′)=0\tilde d(s, s') = 0d~(s,s′)=0.
  2. For every m∈Nm \in \mathbb{N}m∈N, including m=0m = 0m=0, and every map φ:S→Rm\varphi : S \to \mathbb{R}^mφ:S→Rm with
∥φ(u)−φ(v)∥1=d~(u,v)for all u,v∈S,\|\varphi(u) - \varphi(v)\|_1 = \tilde d(u,v) \quad \text{for all } u, v \in S,∥φ(u)−φ(v)∥1​=d~(u,v)for all u,v∈S,

we have φ(s)=φ(s′)\varphi(s) = \varphi(s')φ(s)=φ(s′).

The second claim says nothing for any mmm for which no such exact isometric φ\varphiφ exists. For m=0m = 0m=0, for example, such a φ\varphiφ exists only if d~\tilde dd~ is identically 000.

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