Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 — error bound for least-squares approximate policy iteration with lookahead

Proved
LookaheadAPI.LeastSquares.theorem_1

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

approximate-policy-iterationlinear-function-approximationlookaheadp2o-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. Run Algorithm 2 with lookahead H≥1H\ge1H≥1, rollout length mmm, lookahead accuracy εLA\varepsilon_{LA}εLA​, feature matrix Φ∈R∣S∣×d\Phi\in\mathbb R^{|\mathcal S|\times d}Φ∈R∣S∣×d and evaluation sets Dk\mathcal D_kDk​, and suppose Assumption 1 holds: rank⁡{ϕ(i)}i∈Dk=d\operatorname{rank}\{\phi(i)\}_{i\in\mathcal D_k}=drank{ϕ(i)}i∈Dk​​=d for every kkk, and ∥wk∥∞≤εPE\|w_k\|_\infty\le\varepsilon_{PE}∥wk​∥∞​≤εPE​ for all kkk, for some εPE>0\varepsilon_{PE}>0εPE​>0. Let

δFV=sup⁡k∥Mk∥∞=sup⁡k∥Φ(ΦDk⊤ΦDk)−1ΦDk⊤Pk∥∞,δapp=sup⁡k,μ∥MkJμ−Jμ∥∞,\delta_{FV}=\sup_k\|\mathcal M_k\|_\infty=\sup_k\big\|\Phi(\Phi_{\mathcal D_k}^\top\Phi_{\mathcal D_k})^{-1}\Phi_{\mathcal D_k}^\top\mathcal P_k\big\|_\infty,\qquad \delta_{app}=\sup_{k,\mu}\|\mathcal M_kJ^{\mu}-J^{\mu}\|_\infty,δFV​=ksup​∥Mk​∥∞​=ksup​​Φ(ΦDk​⊤​ΦDk​​)−1ΦDk​⊤​Pk​​∞​,δapp​=k,μsup​∥Mk​Jμ−Jμ∥∞​, β=αm+H−1δFV,τ=αm+αm+H−11−α δFV+δapp+δFVεPE.\beta=\alpha^{m+H-1}\delta_{FV},\qquad \tau=\frac{\alpha^m+\alpha^{m+H-1}}{1-\alpha}\,\delta_{FV}+\delta_{app}+\delta_{FV}\varepsilon_{PE}.β=αm+H−1δFV​,τ=1−ααm+αm+H−1​δFV​+δapp​+δFV​εPE​.

If

m+H−1>log⁡(δFV)log⁡(1/α),m+H-1>\frac{\log(\delta_{FV})}{\log(1/\alpha)},m+H−1>log(1/α)log(δFV​)​,

then for every k≥0k\ge0k≥0 and every deterministic policy μ0\mu_0μ0​,

∥Jμk−J∗∥∞≤αkH1−α+2αH∥Jμ0−J0∥∞1−α k max⁡(αH,β)k−1⏟finite-time component+2αHτ1−β+εLA(1−αH)(1−α)⏟asymptotic component.(10)\|J^{\mu_k}-J^*\|_\infty\le\underbrace{\frac{\alpha^{kH}}{1-\alpha}+\frac{2\alpha^H\|J^{\mu_0}-J_0\|_\infty}{1-\alpha}\,k\,\max(\alpha^H,\beta)^{k-1}}_{\text{finite-time component}}+\underbrace{\frac{2\alpha^H\frac{\tau}{1-\beta}+\varepsilon_{LA}}{(1-\alpha^H)(1-\alpha)}}_{\text{asymptotic component}}. \tag{10}∥Jμk​−J∗∥∞​≤finite-time component1−ααkH​+1−α2αH∥Jμ0​−J0​∥∞​​kmax(αH,β)k−1​​+asymptotic component(1−αH)(1−α)2αH1−βτ​+εLA​​​​.(10)

The condition says that the combined lookahead and rollout depth m+H−1m+H-1m+H−1 must be large enough to offset the amplification δFV\delta_{FV}δFV​ of the least-squares fit; under it the policies of approximate policy iteration with linear value-function approximation converge geometrically to within the asymptotic component of optimal.

Formalization Note Algorithm 2 never defines μ0\mu_0μ0​, which appears in the bound; the run's μ0\mu_0μ0​ is unconstrained, so the bound holds for every deterministic μ0\mu_0μ0​. δapp\delta_{app}δapp​ is the supremum over all kkk and all deterministic policies (the literal reading of sup⁡k,μk\sup_{k,\mu_k}supk,μk​​). The condition on m+H−1m+H-1m+H−1 is kept as printed, with Lean's real logarithm; when δFV=0\delta_{FV}=0δFV​=0 (possible only if d=0d=0d=0) it reads m+H−1>0m+H-1>0m+H−1>0. At k=0k=0k=0 the middle term is 000.

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

/-- Theorem 1 (arXiv:2109.13419v7, p. 14, (10)): if `m + H − 1 > log(δ_FV)/log(1/α)`, then under
Assumption 1 every run of Algorithm 2 satisfies, for every `k` (and `μ_0` any deterministic
policy),
`‖J^{μ_k} − J^*‖_∞ ≤ α^{kH}/(1−α) + (2α^H ‖J^{μ_0} − J_0‖_∞/(1−α)) k max(α^H, β)^{k−1}
  + (2α^H τ/(1−β) + ε_LA)/((1−α^H)(1−α))`, with `β = α^{m+H−1}δ_FV` and
`τ = (α^m + α^{m+H−1})/(1−α) δ_FV + δ_app + δ_FV ε_PE`. -/
theorem theorem_1 {S A : Type*} [Fintype S] [DecidableEq S] [Nonempty S] [Fintype A]
    [DecidableEq A] [Nonempty A] (M : MDP S A) {d : ℕ} (Φ : Matrix S (Fin d) ℝ)
    (D : ℕ → Finset S) (m H : ℕ) (hH : 1 ≤ H) (εLA εPE : ℝ)
    (hmH : ((m + H - 1 : ℕ) : ℝ) > Real.log (deltaFV Φ D) / Real.log (1 / M.α))
    (J : ℕ → S → ℝ) (μ : ℕ → S → A) (w : ℕ → S → ℝ) (θ : ℕ → Fin d → ℝ)
    (hA1 : Assumption1 Φ D w εPE)
    (hrun : IsRunAlg2 M Φ D m H εLA J μ w θ) (k : ℕ) :
    ‖valueOf M (μ k) - optValue M‖ ≤
      M.α ^ (k * H) / (1 - M.α) +
      2 * M.α ^ H * ‖valueOf M (μ 0) - J 0‖ / (1 - M.α) * k *
        max (M.α ^ H) (betaLS M Φ D m H) ^ (k - 1) +
      (2 * M.α ^ H * (tauLS M Φ D m H εPE / (1 - betaLS M Φ D m H)) + εLA) /
        ((1 - M.α ^ H) * (1 - M.α)) := by sorry

end LookaheadAPI.LeastSquares
Source
arXiv:2109.13419v7, p. 14, Theorem 1, eq. (10)
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