Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

p. 102: ṽ_* is the unique solution of the Bellman optimality equation with altered transition probabilities

Proved
SuttonBartoRL.EpsSoft.eps_env_bellman_optimality_unique

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamic-programmingp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1reinforcement-learning

Let a finite MDP be given with discount rate 0≤γ<10 \le \gamma < 10≤γ<1 and let 0<ε≤10 < \varepsilon \le 10<ε≤1. Let v~∗\tilde v_*v~∗​ be the optimal state-value function of the new environment with dynamics p~(s′,r∣s,a)=(1−ε)p(s′,r∣s,a)+∑a′ε∣A∣p(s′,r∣s,a′)\tilde p(s', r \mid s, a) = (1-\varepsilon) p(s', r \mid s, a) + \sum_{a'} \frac{\varepsilon}{|\mathcal A|} p(s', r \mid s, a')p~​(s′,r∣s,a)=(1−ε)p(s′,r∣s,a)+∑a′​∣A∣ε​p(s′,r∣s,a′). Then for every state sss

v~∗(s)=max⁡a∑s′,r[(1−ε) p(s′,r∣s,a)+∑a′ε∣A∣ p(s′,r∣s,a′)][r+γv~∗(s′)]\tilde v_*(s) = \max_a \sum_{s', r} \Big[(1 - \varepsilon)\, p(s', r \mid s, a) + \sum_{a'} \frac{\varepsilon}{|\mathcal A|}\, p(s', r \mid s, a')\Big]\big[r + \gamma \tilde v_*(s')\big]v~∗​(s)=amax​s′,r∑​[(1−ε)p(s′,r∣s,a)+a′∑​∣A∣ε​p(s′,r∣s,a′)][r+γv~∗​(s′)] =(1−ε)max⁡a∑s′,rp(s′,r∣s,a)[r+γv~∗(s′)]+ε∣A∣∑a∑s′,rp(s′,r∣s,a)[r+γv~∗(s′)],= (1 - \varepsilon) \max_a \sum_{s', r} p(s', r \mid s, a)\big[r + \gamma \tilde v_*(s')\big] + \frac{\varepsilon}{|\mathcal A|} \sum_a \sum_{s', r} p(s', r \mid s, a)\big[r + \gamma \tilde v_*(s')\big],=(1−ε)amax​s′,r∑​p(s′,r∣s,a)[r+γv~∗​(s′)]+∣A∣ε​a∑​s′,r∑​p(s′,r∣s,a)[r+γv~∗​(s′)],

and v~∗\tilde v_*v~∗​ is the only function w:S→Rw : \mathcal S \to \mathbb Rw:S→R satisfying the first equation with www in place of v~∗\tilde v_*v~∗​.

This is the Bellman optimality equation (3.19) of the new environment; its uniqueness is what identifies the value of an unimproved ε\varepsilonε-soft policy with v~∗\tilde v_*v~∗​.

Formalization Note v~∗\tilde v_*v~∗​ is the supremum of the new environment's policy values over all stochastic policies; for 0≤γ<10 \le \gamma < 10≤γ<1 this family is bounded.

Preamble
import Mathlib
import Definitions.Def_SuttonBartoRL_EpsSoft_ValueFunctions
import Definitions.Def_SuttonBartoRL_EpsSoft_NewEnvironment
Formal statement
namespace SuttonBartoRL.EpsSoft

/-- p. 102: for a finite MDP with `0 ≤ γ < 1` and `0 < ε ≤ 1`, the optimal state-value function
`ṽ_*` of the new environment `epsEnv M ε` is the unique solution of the Bellman optimality
equation (3.19) with altered transition probabilities
`ṽ_*(s) = max_a Σ_{s', r} [(1 - ε) p(s', r | s, a) + Σ_{a'} (ε / |A|) p(s', r | s, a')] [r + γ ṽ_*(s')]`,
and the right-hand side equals
`(1 - ε) max_a Σ_{s', r} p(s', r | s, a) [r + γ ṽ_*(s')] + (ε / |A|) Σ_a Σ_{s', r} p(s', r | s, a) [r + γ ṽ_*(s')]`. -/
theorem eps_env_bellman_optimality_unique {S A : Type} [Fintype S] [DecidableEq S] [Fintype A]
    [Nonempty A] (M : MDP S A) (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1) (ε : ℝ) (hε0 : 0 < ε)
    (hε1 : ε ≤ 1) :
    (∀ s, optimalValue (epsEnv M ε hε0.le hε1) γ s =
        Finset.univ.sup' Finset.univ_nonempty (fun a => ∑ s', ∑ r ∈ M.R,
          ((1 - ε) * M.p s a s' r + ∑ a', ε / (Fintype.card A : ℝ) * M.p s a' s' r) *
            (r + γ * optimalValue (epsEnv M ε hε0.le hε1) γ s'))) ∧
    (∀ s, optimalValue (epsEnv M ε hε0.le hε1) γ s =
        (1 - ε) * Finset.univ.sup' Finset.univ_nonempty (fun a => ∑ s', ∑ r ∈ M.R,
          M.p s a s' r * (r + γ * optimalValue (epsEnv M ε hε0.le hε1) γ s')) +
        ε / (Fintype.card A : ℝ) * ∑ a, ∑ s', ∑ r ∈ M.R,
          M.p s a s' r * (r + γ * optimalValue (epsEnv M ε hε0.le hε1) γ s')) ∧
    (∀ w : S → ℝ, (∀ s, w s =
        Finset.univ.sup' Finset.univ_nonempty (fun a => ∑ s', ∑ r ∈ M.R,
          ((1 - ε) * M.p s a s' r + ∑ a', ε / (Fintype.card A : ℝ) * M.p s a' s' r) *
            (r + γ * w s'))) →
      w = optimalValue (epsEnv M ε hε0.le hε1) γ) := by sorry

end SuttonBartoRL.EpsSoft
Source
Sutton & Barto, Reinforcement Learning: An Introduction, 2nd ed., MIT Press (2018), ISBN 9780262039246, §5.4, p. 102 (displayed equation for ṽ_*, 'the unique solution to the Bellman optimality equation (3.19) with altered transition probabilities')
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me