Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 1 (as proved): value equivalence extends to the pointwise span of the policies and the span of the functions

Proved
ValueEquivalence.ve_space_eq_span

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

bellman-operatorlinear-algebramodel-based-rlreinforcement-learningvalue-equivalence

Let S,AS,AS,A be finite, 0≤γ<10\le\gamma<10≤γ<1, m∗=(r∗,p∗)m^*=(r^*,p^*)m∗=(r∗,p∗) the true model, and M\mathcal MM a set of models that all have the true reward r∗r^*r∗. Let Π⊆Π\Pi\subseteq\boldsymbol\PiΠ⊆Π be a finite set of policies and V\mathcal VV a finite set of functions S→RS\to\mathbb RS→R. Then

M(Π,V)=M(p-span(Π)∩Π, span⁡(V)).\mathcal M(\Pi,\mathcal V)=\mathcal M\big(p\text{-span}(\Pi)\cap\boldsymbol\Pi,\ \operatorname{span}(\mathcal V)\big).M(Π,V)=M(p-span(Π)∩Π, span(V)).

So value equivalence with respect to Π\PiΠ and V\mathcal VV already gives value equivalence with respect to every policy that is, state by state, a linear combination of policies in Π\PiΠ, and every linear combination of functions in V\mathcal VV.

Formalization Note The paper states this for models with arbitrary rewards. That version is false: for γ>0\gamma>0γ>0, with two states, one action, p∗=Ip^*=Ip∗=I, r∗=(1,−1)r^*=(1,-1)r∗=(1,−1), V={(1,−1)}\mathcal V=\{(1,-1)\}V={(1,−1)} and m~=((1+2γ)(1,−1),swap)\tilde m=((1+2\gamma)(1,-1),\text{swap})m~=((1+2γ)(1,−1),swap), the two models agree on (1,−1)(1,-1)(1,−1) but not on 0∈span⁡(V)0\in\operatorname{span}(\mathcal V)0∈span(V). The proof's step T~π[∑iβivi]=∑iβiT~π[vi]\tilde T_\pi[\sum_i\beta_iv_i]=\sum_i\beta_i\tilde T_\pi[v_i]T~π​[∑i​βi​vi​]=∑i​βi​T~π​[vi​] treats the Bellman operator as linear although it is affine. It also fails for γ=0\gamma=0γ=0 when V=∅\mathcal V=\emptysetV=∅: then M(Π,∅)=M\mathcal M(\Pi,\emptyset)=\mathcal MM(Π,∅)=M, while span⁡(∅)={0}\operatorname{span}(\emptyset)=\{0\}span(∅)={0} forces r~π=rπ∗\tilde r_\pi=r^*_\pir~π​=rπ∗​. The statement adds the hypothesis that all models in M\mathcal MM have the true reward. This is a repair, not an assumption of the paper for this result: the paper introduces "rrr is known" only later in Section 3.2, for the analysis of Proposition 2. "Discrete" sets are read as finite sets, matching the index range i∈{1,…,∣H∣}i\in\{1,\dots,|\mathcal H|\}i∈{1,…,∣H∣} in eq. (3).

Preamble
import Mathlib
import Definitions.Def_ValueEquivalence_Basic

open Filter Topology
Formal statement
namespace ValueEquivalence

theorem ve_space_eq_span {S A : Type*} [Fintype S] [Fintype A]
    (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1) (M : Set (Model S A)) (mstar : Model S A)
    (hM : ∀ m ∈ M, m.r = mstar.r)
    (Pol : Set (S → A → ℝ)) (V : Set (S → ℝ)) (hPolfin : Pol.Finite) (hVfin : V.Finite)
    (hPol : Pol ⊆ policies) :
    veSpace γ M mstar Pol V =
      veSpace γ M mstar (pspan Pol ∩ policies) (Submodule.span ℝ V : Set (S → ℝ)) := by sorry

end ValueEquivalence
Source
Grimm, Barreto, Singh and Silver, The Value Equivalence Principle for Model-Based Reinforcement Learning, arXiv:2011.03506v1 (2020), Section 3.2, Proposition 1, eq. (3), p. 4; proof in Appendix A.1.1, p. 14
Read-back

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

Let SSS and AAA be arbitrary finite sets of states and actions. Either may be empty.

Models and Bellman operators. A model m=(rm,pm)m = (r_m, p_m)m=(rm​,pm​) consists of:

  • a reward function rm:S×A→Rr_m : S \times A \to \mathbb{R}rm​:S×A→R, which is arbitrary;
  • a transition kernel pm(s′∣s,a)p_m(s' \mid s, a)pm​(s′∣s,a), meaning pm(s′∣s,a)≥0p_m(s' \mid s,a) \ge 0pm​(s′∣s,a)≥0 for all s,a,s′s, a, s's,a,s′ and ∑s′pm(s′∣s,a)=1\sum_{s'} p_m(s' \mid s,a) = 1∑s′​pm​(s′∣s,a)=1 for every (s,a)(s,a)(s,a).

A policy is a function π:S×A→R\pi : S \times A \to \mathbb{R}π:S×A→R with π(a∣s)≥0\pi(a \mid s) \ge 0π(a∣s)≥0 and ∑aπ(a∣s)=1\sum_a \pi(a \mid s) = 1∑a​π(a∣s)=1 for every sss. Let Π\PiΠ denote the set of all policies.

For a discount γ\gammaγ, a model mmm, any function π:S×A→R\pi : S \times A \to \mathbb{R}π:S×A→R (not necessarily a policy) and any v:S→Rv : S \to \mathbb{R}v:S→R, the Bellman operator is

Tπm[v](s)  =  ∑a∈Aπ(a∣s)(rm(s,a)+γ∑s′∈Spm(s′∣s,a) v(s′)).T^{m}_{\pi}[v](s) \;=\; \sum_{a \in A} \pi(a \mid s)\Big( r_m(s,a) + \gamma \sum_{s' \in S} p_m(s' \mid s,a)\, v(s') \Big).Tπm​[v](s)=a∈A∑​π(a∣s)(rm​(s,a)+γs′∈S∑​pm​(s′∣s,a)v(s′)).

Value-equivalent spaces. For a set of models MMM, a reference model mmm, a set PPP of functions S×A→RS \times A \to \mathbb{R}S×A→R and a set UUU of functions S→RS \to \mathbb{R}S→R, define

Mm(P,U)  =  { m′∈M  :  Tπm[v]=Tπm′[v] for all π∈P, v∈U }.\mathcal{M}_{m}(P, U) \;=\; \{\, m' \in M \;:\; T^{m}_{\pi}[v] = T^{m'}_{\pi}[v] \text{ for all } \pi \in P,\ v \in U \,\}.Mm​(P,U)={m′∈M:Tπm​[v]=Tπm′​[v] for all π∈P, v∈U}.

Here equality means equality of functions on SSS, i.e. at every state.

Pointwise span. For a set PPP of such functions, the pointwise span p-span⁡(P)\operatorname{p\text{-}span}(P)p-span(P) is the set of all g:S×A→Rg : S \times A \to \mathbb{R}g:S×A→R such that, for every state sss, the vector g(⋅∣s)∈RAg(\cdot \mid s) \in \mathbb{R}^Ag(⋅∣s)∈RA lies in the real linear span of {π(⋅∣s):π∈P}\{\pi(\cdot \mid s) : \pi \in P\}{π(⋅∣s):π∈P}. The span of the empty set is {0}\{0\}{0}.

The statement. Fix the following data:

  • a real γ\gammaγ with 0≤γ<10 \le \gamma < 10≤γ<1;
  • an arbitrary set MMM of models;
  • a model m∗m^*m∗, which is not required to belong to MMM;
  • the hypothesis that every m∈Mm \in Mm∈M has the same reward as m∗m^*m∗, i.e. rm=rm∗r_m = r_{m^*}rm​=rm∗​;
  • a finite set Pol\mathrm{Pol}Pol of functions S×A→RS \times A \to \mathbb{R}S×A→R, all of which are policies (Pol⊆Π\mathrm{Pol} \subseteq \PiPol⊆Π);
  • a finite set VVV of functions S→RS \to \mathbb{R}S→R.

The theorem asserts the set equality

Mm∗(Pol,V)  =  Mm∗(p-span⁡(Pol)∩Π, span⁡R(V)).\mathcal{M}_{m^*}(\mathrm{Pol}, V) \;=\; \mathcal{M}_{m^*}\big(\operatorname{p\text{-}span}(\mathrm{Pol}) \cap \Pi,\ \operatorname{span}_{\mathbb{R}}(V)\big).Mm∗​(Pol,V)=Mm∗​(p-span(Pol)∩Π, spanR​(V)).

Here span⁡R(V)\operatorname{span}_{\mathbb{R}}(V)spanR​(V) is the real linear span of VVV inside RS\mathbb{R}^SRS, which always contains the zero function. The equality says two things:

  • a model in MMM agrees with m∗m^*m∗ on all Bellman updates Tπ[v]T_\pi[v]Tπ​[v] with π∈Pol\pi \in \mathrm{Pol}π∈Pol, v∈Vv \in Vv∈V;
  • this happens if and only if it agrees with m∗m^*m∗ on all Tπ[v]T_\pi[v]Tπ​[v] where π\piπ ranges over the policies lying in the pointwise span of Pol\mathrm{Pol}Pol, and vvv ranges over all real linear combinations of elements of VVV.

Edge cases included by the quantifiers.

  • Pol\mathrm{Pol}Pol or VVV may be empty.
    • If Pol=∅\mathrm{Pol} = \emptysetPol=∅, the left side is all of MMM. Also, p-span⁡(∅)∩Π\operatorname{p\text{-}span}(\emptyset) \cap \Pip-span(∅)∩Π is empty when S≠∅S \neq \emptysetS=∅, since its members must vanish yet sum to 1 at each state.
    • If V=∅V = \emptysetV=∅, then span⁡(V)={0}\operatorname{span}(V) = \{0\}span(V)={0}.
  • If S=∅S = \emptysetS=∅, all functions on SSS coincide, so every condition is trivially satisfied.
  • If A=∅A = \emptysetA=∅ and S≠∅S \neq \emptysetS=∅, then no policies exist.
  • The constraint 0≤γ<10 \le \gamma < 10≤γ<1 enters only as a hypothesis; γ\gammaγ is otherwise used only inside the Bellman operator.
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