Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

d^⊤=μ^⊤(I−Q^)−1\hat d^\top=\hat\mu^\top(I-\hat Q)^{-1}d^⊤=μ^​⊤(I−Q^​)−1 for a training set (§4.2, p. 31)

Proved
SuttonTD.Convergence.ml_visits_eq

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

maximum-likelihoodp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1temporal-difference

Let a training set be given in which every nonterminal state appears. Let d^i\hat d_id^i​ be the number of times iii appears, [μ^]i[\hat\mu]_i[μ^​]i​ the number of sequences beginning in iii, and Q^\hat QQ^​ the maximum-likelihood transition matrix. Then

d^⊤=μ^⊤(I−Q^)−1.\hat d^\top=\hat\mu^\top(I-\hat Q)^{-1}.d^⊤=μ^​⊤(I−Q^​)−1.

This is the analogue of (7) needed to carry the proof of Theorem 2 over to Theorem 3.

Preamble
import Definitions.Def_SuttonTD_Convergence_TrainingSet
open Matrix
Formal statement
namespace SuttonTD.Convergence

/-- **`d̂ᵀ = μ̂ᵀ(I − Q̂)⁻¹`** (Sutton 1988, §4.2, p. 31, PDF p. 23): for a training set in which
every nonterminal state appears, the visit counts `d̂_i`, the start counts `[μ̂]_i` and the
maximum-likelihood matrix `Q̂` satisfy `d̂ᵀ = μ̂ᵀ(I − Q̂)⁻¹` (counts cast to `ℝ`). -/
theorem ml_visits_eq {N : Type*} [Fintype N] [DecidableEq N] {S : ℕ}
    (D : TrainingSet N S) (happ : ∀ i, 0 < D.visits i) :
    (fun i => (D.visits i : ℝ)) = (fun i => (D.starts i : ℝ)) ᵥ* (1 - D.Qhat)⁻¹ := by sorry

end SuttonTD.Convergence
Source
Sutton (1988), Machine Learning 3:9–44, §4.2, p. 31 (PDF p. 23)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

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