Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 1 (first display) — error bound for Algorithm 3 with time-varying evaluation error

Proved
LookaheadAPI.LeastSquares.proposition_1

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

approximate-policy-iterationlookaheadp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1reinforcement-learning

Let (S,A,P,r,α)(\mathcal S,\mathcal A,P,r,\alpha)(S,A,P,r,α) be a finite discounted MDP with rewards in [0,1][0,1][0,1] and 0<α<10<\alpha<10<α<1, let H≥2H\ge2H≥2, and let (Jk,μk)k≥0(J_k,\mu_k)_{k\ge0}(Jk​,μk​)k≥0​ be a run of Algorithm 3 with lookahead accuracy εLA\varepsilon_{LA}εLA​ and evaluation-error bounds δk\delta_kδk​, i.e. ∥THJk−Tμk+1TH−1Jk∥∞≤εLA\|T^HJ_k-T_{\mu_{k+1}}T^{H-1}J_k\|_\infty\le\varepsilon_{LA}∥THJk​−Tμk+1​​TH−1Jk​∥∞​≤εLA​ and ∥Jk−Jμk∥∞≤δk\|J_k-J^{\mu_k}\|_\infty\le\delta_k∥Jk​−Jμk​∥∞​≤δk​ for every kkk. Then for every k≥0k\ge0k≥0,

∥Jμk−J∗∥∞≤αkH1−α+∑ℓ=0k−1α(k−ℓ−1)H 2αHδℓ1−α+εLA(1−α)(1−αH−1).\|J^{\mu_k}-J^*\|_\infty\le\frac{\alpha^{kH}}{1-\alpha}+\sum_{\ell=0}^{k-1}\frac{\alpha^{(k-\ell-1)H}\,2\alpha^H\delta_\ell}{1-\alpha}+\frac{\varepsilon_{LA}}{(1-\alpha)(1-\alpha^{H-1})}.∥Jμk​−J∗∥∞​≤1−ααkH​+ℓ=0∑k−1​1−αα(k−ℓ−1)H2αHδℓ​​+(1−α)(1−αH−1)εLA​​.

The bound separates the effect of the initial policy, the accumulated evaluation errors, and the lookahead error.

Formalization Note The last term divides by 1−αH−11-\alpha^{H-1}1−αH−1, which vanishes at H=1H=1H=1 (the bound is +∞+\infty+∞ there on paper, while Lean's x/0=0x/0=0x/0=0 would make it false), so this item assumes H≥2H\ge2H≥2. μ0\mu_0μ0​ is an arbitrary deterministic policy, and the index of δk\delta_kδk​ is that of (15) and Appendix B (see the Algorithms module).

Preamble
import Mathlib
import Definitions.Def_LookaheadAPI_LeastSquares_MDP
import Definitions.Def_LookaheadAPI_LeastSquares_LSOperator
import Definitions.Def_LookaheadAPI_LeastSquares_Algorithms
Formal statement
namespace LookaheadAPI.LeastSquares

/-- Proposition 1, first display (p. 13): every run of Algorithm 3 with `H ≥ 2` satisfies
`‖J^{μ_k} − J^*‖_∞ ≤ α^{kH}/(1−α) + ∑_{ℓ=0}^{k−1} α^{(k−ℓ−1)H} 2α^H δ_ℓ/(1−α)
  + ε_LA/((1−α)(1−α^{H−1}))` for every `k`. -/
theorem proposition_1 {S A : Type*} [Fintype S] [DecidableEq S] [Nonempty S] [Fintype A]
    [DecidableEq A] [Nonempty A] (M : MDP S A) (H : ℕ) (hH : 2 ≤ H) (εLA : ℝ)
    (δ : ℕ → ℝ) (J : ℕ → S → ℝ) (μ : ℕ → S → A)
    (hrun : IsRunAlg3 M H εLA δ J μ) (k : ℕ) :
    ‖valueOf M (μ k) - optValue M‖ ≤
      M.α ^ (k * H) / (1 - M.α) +
      ∑ ℓ ∈ Finset.range k, M.α ^ ((k - ℓ - 1) * H) * (2 * M.α ^ H * δ ℓ) / (1 - M.α) +
      εLA / ((1 - M.α) * (1 - M.α ^ (H - 1))) := by sorry

end LookaheadAPI.LeastSquares
Source
arXiv:2109.13419v7, p. 13, Proposition 1 (first display); proof in Appendix A, p. 19, eq. (16)
Human review
  • Endorsed by Shuze Chen · Oct 14, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 14, 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