Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 (as proved): policy iteration reaches π∗\pi^*π∗ and F(⋅,π∗)\mathcal F(\cdot,\pi^*)F(⋅,π∗) has a least fixed point

Proved
DeepBisimulationControl.pi_bisim_metric_fixed_point

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∈[0,1)c\in[0,1)c∈[0,1). Let σ0,σ1,…\sigma_0,\sigma_1,\dotsσ0​,σ1​,… be a run of policy iteration: σk+1(s)∈arg⁡max⁡aQσk(s,a)\sigma_{k+1}(s)\in\arg\max_aQ^{\sigma_k}(s,a)σk+1​(s)∈argmaxa​Qσk​(s,a), with σk+1(s)=σk(s)\sigma_{k+1}(s)=\sigma_k(s)σk+1​(s)=σk​(s) whenever σk(s)\sigma_k(s)σk​(s) is a maximiser. For a policy π\piπ let

F(d,π)(si,sj)=(1−c) ∣rsiπ−rsjπ∣+c W1(Psiπ,Psjπ;d).F(d,\pi)(s_i,s_j)=(1-c)\,|r^\pi_{s_i}-r^\pi_{s_j}|+c\,W_1(\mathcal P^\pi_{s_i},\mathcal P^\pi_{s_j};d).F(d,π)(si​,sj​)=(1−c)∣rsi​π​−rsj​π​∣+cW1​(Psi​π​,Psj​π​;d).

Then there are K∈NK\in\mathbb NK∈N and a deterministic policy π∗\pi^*π∗ such that:

  1. π∗\pi^*π∗ is optimal and σk=π∗\sigma_k=\pi^*σk​=π∗ for all k≥Kk\ge Kk≥K;
  2. d~=sup⁡nF(⋅,π∗)n(0)\tilde d=\sup_nF(\cdot,\pi^*)^n(0)d~=supn​F(⋅,π∗)n(0) is a pseudometric with F(d~,π∗)=d~F(\tilde d,\pi^*)=\tilde dF(d~,π∗)=d~;
  3. d~≤d\tilde d\le dd~≤d pointwise for every pseudometric ddd with F(d,π∗)=dF(d,\pi^*)=dF(d,π∗)=d, so d~\tilde dd~ is the least fixed point of F(⋅,π∗)F(\cdot,\pi^*)F(⋅,π∗) in the space of (bounded) pseudometrics;
  4. the iterates d0=0d_0=0d0​=0, dn+1=F(dn,σn)d_{n+1}=F(d_n,\sigma_n)dn+1​=F(dn​,σn​) computed along policy iteration converge pointwise to d~\tilde dd~.

This is the paper's statement that the π∗\pi^*π∗-bisimulation metric is the fixed point reached while the policy improves.

Formalization Note The printed Theorem 1 speaks of a policy that is "continuously improving" and a "π∗\pi^*π∗-bisimulation metric" without defining either. Its proof argues through policy iteration (eqs. (10)-(11)) and the existence of a fixed point of F(⋅,π)F(\cdot,\pi)F(⋅,π) for a fixed π\piπ. The statement above is what that argument establishes, with "continuously improving" read as policy iteration and the π∗\pi^*π∗-bisimulation metric read as the least fixed point of F(⋅,π∗)F(\cdot,\pi^*)F(⋅,π∗). The tie-breaking rule is the standard one; without it policy iteration can alternate between optimal policies forever. On a finite state space every pseudometric is bounded.

Preamble
import Mathlib
import Definitions.Def_DeepBisimulationControl_Basic

open Filter Topology
Formal statement
namespace DeepBisimulationControl

theorem pi_bisim_metric_fixed_point {S A : Type*} [Fintype S] [DecidableEq S] [Fintype A]
    [DecidableEq A] [Nonempty A]
    (P : S → A → S → ℝ) (hP : IsKernel P) (R : S → A → ℝ) (gamma c : ℝ)
    (hg0 : 0 ≤ gamma) (hg1 : gamma < 1) (hc0 : 0 ≤ c) (hc1 : c < 1)
    (sigma : ℕ → S → A) (hsigma : IsPolicyIteration P R gamma sigma) :
    ∃ (K : ℕ) (sigmaStar : S → A),
      IsOptimalPolicy P R gamma (detPolicy sigmaStar) ∧ (∀ k, K ≤ k → sigma k = sigmaStar) ∧
      IsPseudometric (piBisimMetric P R c (detPolicy sigmaStar)) ∧
      piBisimOperator P R c (detPolicy sigmaStar) (piBisimMetric P R c (detPolicy sigmaStar)) =
        piBisimMetric P R c (detPolicy sigmaStar) ∧
      (∀ d : S → S → ℝ, IsPseudometric d → piBisimOperator P R c (detPolicy sigmaStar) d = d →
        ∀ s t, piBisimMetric P R c (detPolicy sigmaStar) s t ≤ d s t) ∧
      (∀ s t, Tendsto (fun n => policyIterationMetric P R c sigma n s t) atTop
        (𝓝 (piBisimMetric P R c (detPolicy sigmaStar) s t))) := 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, Theorem 1, eq. (5), p. 5; proof in Appendix A, eqs. (9)-(11), p. 12
Read-back

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

Setting. Let SSS be a finite set of states (possibly empty) and AAA a finite, nonempty set of actions. Let P(s′∣s,a)P(s' \mid s,a)P(s′∣s,a) be a transition kernel: P(s′∣s,a)≥0P(s'\mid s,a) \ge 0P(s′∣s,a)≥0 for all s,a,s′s,a,s's,a,s′ and ∑s′P(s′∣s,a)=1\sum_{s'} P(s'\mid s,a) = 1∑s′​P(s′∣s,a)=1 for all s,as,as,a. Let R:S×A→RR : S \times A \to \mathbb{R}R:S×A→R be an arbitrary reward function (no boundedness or sign assumption). Let γ,c\gamma, cγ,c be reals with

0≤γ<1,0≤c<1.0 \le \gamma < 1, \qquad 0 \le c < 1.0≤γ<1,0≤c<1.

Policies and values. A stochastic policy is a function π(a∣s)≥0\pi(a \mid s) \ge 0π(a∣s)≥0 with ∑aπ(a∣s)=1\sum_a \pi(a\mid s) = 1∑a​π(a∣s)=1 for every sss. For a map σ:S→A\sigma : S \to Aσ:S→A, the deterministic policy δσ\delta_\sigmaδσ​ puts mass 111 on σ(s)\sigma(s)σ(s) and 000 elsewhere. For a policy π\piπ:

  • the on-policy reward is rπ(s)=∑aπ(a∣s) R(s,a)r^\pi(s) = \sum_a \pi(a\mid s)\,R(s,a)rπ(s)=∑a​π(a∣s)R(s,a);
  • the on-policy transition is Pπ(s′∣s)=∑aπ(a∣s) P(s′∣s,a)P^\pi(s' \mid s) = \sum_a \pi(a\mid s)\,P(s'\mid s,a)Pπ(s′∣s)=∑a​π(a∣s)P(s′∣s,a), viewed as an S×SS\times SS×S matrix;
  • the value is the infinite sum
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 the convention that a non-summable series is assigned the value 000;

  • the optimal value is V∗(s)=sup⁡πVπ(s)V^*(s) = \sup_\pi V^\pi(s)V∗(s)=supπ​Vπ(s), the supremum over all stochastic policies, with the convention that a set not bounded above has "supremum" 000;
  • the action value is Qπ(s,a)=R(s,a)+γ∑s′P(s′∣s,a) Vπ(s′)Q^\pi(s,a) = R(s,a) + \gamma \sum_{s'} P(s'\mid s,a)\,V^\pi(s')Qπ(s,a)=R(s,a)+γ∑s′​P(s′∣s,a)Vπ(s′).

A policy π\piπ is called optimal if it is a stochastic policy and Vπ(s)=V∗(s)V^\pi(s) = V^*(s)Vπ(s)=V∗(s) for every sss.

Policy-iteration hypothesis. The sequence σ0,σ1,⋯:S→A\sigma_0, \sigma_1, \dots : S \to Aσ0​,σ1​,⋯:S→A is assumed to satisfy the following for every k∈Nk \in \mathbb{N}k∈N and every state sss:

  • σk+1(s)\sigma_{k+1}(s)σk+1​(s) maximizes a↦Qδσk(s,a)a \mapsto Q^{\delta_{\sigma_k}}(s,a)a↦Qδσk​​(s,a), that is, Qδσk(s,a)≤Qδσk(s,σk+1(s))Q^{\delta_{\sigma_k}}(s,a) \le Q^{\delta_{\sigma_k}}(s,\sigma_{k+1}(s))Qδσk​​(s,a)≤Qδσk​​(s,σk+1​(s)) for all aaa;
  • if σk(s)\sigma_k(s)σk​(s) is itself such a maximizer, then σk+1(s)=σk(s)\sigma_{k+1}(s) = \sigma_k(s)σk+1​(s)=σk​(s).

The initial map σ0\sigma_0σ0​ is unconstrained.

Metric objects. A pseudometric on SSS is a function ddd with:

  • d(s,s)=0d(s,s)=0d(s,s)=0;
  • d≥0d \ge 0d≥0;
  • d(s,t)=d(t,s)d(s,t)=d(t,s)d(s,t)=d(t,s);
  • d(s,u)≤d(s,t)+d(t,u)d(s,u) \le d(s,t)+d(t,u)d(s,u)≤d(s,t)+d(t,u).

For distributions μ,ν\mu, \nuμ,ν on SSS and a cost function ddd, the 1-Wasserstein distance is

W1(μ,ν;d)=inf⁡{∑x,yg(x,y) d(x,y)  :  g≥0, ∑yg(x,y)=μ(x), ∑xg(x,y)=ν(y)}.W_1(\mu,\nu;d) = \inf\Big\{ \sum_{x,y} g(x,y)\,d(x,y) \;:\; g \ge 0,\ \textstyle\sum_y g(x,y) = \mu(x),\ \sum_x g(x,y) = \nu(y) \Big\}.W1​(μ,ν;d)=inf{x,y∑​g(x,y)d(x,y):g≥0, ∑y​g(x,y)=μ(x), ∑x​g(x,y)=ν(y)}.

Here the infimum of an empty set, or of a set not bounded below, is taken to be 000.

The on-policy bisimulation operator for a policy π\piπ sends a function ddd to

Fπ(d)(s,t)=(1−c) ∣rπ(s)−rπ(t)∣+c W1(Pπ(⋅∣s),Pπ(⋅∣t);d).F_\pi(d)(s,t) = (1-c)\,\big|r^\pi(s) - r^\pi(t)\big| + c\, W_1\big(P^\pi(\cdot\mid s), P^\pi(\cdot\mid t); d\big).Fπ​(d)(s,t)=(1−c)​rπ(s)−rπ(t)​+cW1​(Pπ(⋅∣s),Pπ(⋅∣t);d).

The π\piπ-bisimulation metric is defined by

dπ(s,t)=sup⁡n∈NFπ n(0)(s,t),d_\pi(s,t) = \sup_{n \in \mathbb{N}} F_\pi^{\,n}(0)(s,t),dπ​(s,t)=n∈Nsup​Fπn​(0)(s,t),

where Fπ nF_\pi^{\,n}Fπn​ is the nnn-fold iterate starting from the zero function. The supremum is taken pointwise, and a set not bounded above again gets the value 000.

The policy-iteration metric sequence is defined by

d0=0,dn+1=Fδσn(dn).d_0 = 0, \qquad d_{n+1} = F_{\delta_{\sigma_n}}(d_n).d0​=0,dn+1​=Fδσn​​​(dn​).

Claim. Under these hypotheses, there exist a natural number KKK and a map σ∗:S→A\sigma^* : S \to Aσ∗:S→A such that all of the following hold, writing d∗=dδσ∗d^* = d_{\delta_{\sigma^*}}d∗=dδσ∗​​ and F∗=Fδσ∗F^* = F_{\delta_{\sigma^*}}F∗=Fδσ∗​​:

  1. δσ∗\delta_{\sigma^*}δσ∗​ is an optimal policy: Vδσ∗(s)=V∗(s)V^{\delta_{\sigma^*}}(s) = V^*(s)Vδσ∗​(s)=V∗(s) for all sss.
  2. σk=σ∗\sigma_k = \sigma^*σk​=σ∗ for every k≥Kk \ge Kk≥K, so policy iteration is eventually constant at σ∗\sigma^*σ∗.
  3. d∗d^*d∗ is a pseudometric on SSS.
  4. d∗d^*d∗ is a fixed point: F∗(d∗)=d∗F^*(d^*) = d^*F∗(d∗)=d∗.
  5. d∗d^*d∗ is the least fixed point among pseudometrics: for every pseudometric ddd with F∗(d)=dF^*(d) = dF∗(d)=d, we have d∗(s,t)≤d(s,t)d^*(s,t) \le d(s,t)d∗(s,t)≤d(s,t) for all s,ts,ts,t. Fixed points of F∗F^*F∗ that are not pseudometrics are not compared.
  6. For every pair s,ts,ts,t, the policy-iteration metric converges to d∗d^*d∗:
lim⁡n→∞dn(s,t)=d∗(s,t).\lim_{n\to\infty} d_n(s,t) = d^*(s,t).n→∞lim​dn​(s,t)=d∗(s,t).

The discount γ\gammaγ enters only through the values and the policy-iteration hypothesis. The metric weights use the separate constant ccc.

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