Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(3.8), p. 9 — for f ≥ 0 the random-horizon discounted expectation (3.1) equals Σⱼ (Kʲ(θ)f̃(θ))(x)

Proved
LyapDiffMC.RandomHorizon.eq_3_8

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

discounted-rewardhitting-timemarkov-chainp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1potential-kernel

Throughout, SSS is a measurable state space, (P(θ):θ∈Λ)(P(\theta):\theta\in\Lambda)(P(θ):θ∈Λ) a family of Markov transition kernels on SSS indexed by an open interval Λ=(a,b)\Lambda=(a,b)Λ=(a,b), f,g:S→Rf, g : S\to\mathbb Rf,g:S→R measurable, and ∅≠C⊆S\emptyset\neq C\subseteq S∅=C⊆S measurable. The non-negative kernel K(θ,x,dy)=eg(x)P(θ,x,dy)K(\theta,x,dy)=e^{g(x)}P(\theta,x,dy)K(θ,x,dy)=eg(x)P(θ,x,dy) restricted to y∈Cy\in Cy∈C is K(θ)K(\theta)K(θ), its powers are Kn(θ)K^n(\theta)Kn(θ) (K0(x,dy)=δx(dy)K^0(x,dy)=\delta_x(dy)K0(x,dy)=δx​(dy)), G(θ,x,dy)=∑n≥0Kn(θ,x,dy)G(\theta,x,dy)=\sum_{n\ge0}K^n(\theta,x,dy)G(θ,x,dy)=∑n≥0​Kn(θ,x,dy) (possibly an infinite measure), f~(θ,x)=f(x)+∫CcK(θ,x,dy)f(y)\tilde f(\theta,x)=f(x)+\int_{C^c}K(\theta,x,dy)f(y)f~​(θ,x)=f(x)+∫Cc​K(θ,x,dy)f(y), and u∗(θ,x)=∑n≥0(Kn(θ)f~(θ))(x)=∫f~(θ,y) G(θ,x,dy)u^*(\theta,x)=\sum_{n\ge0}(K^n(\theta)\tilde f(\theta))(x)=\int \tilde f(\theta,y)\,G(\theta,x,dy)u∗(θ,x)=∑n≥0​(Kn(θ)f~​(θ))(x)=∫f~​(θ,y)G(θ,x,dy).

Fix θ\thetaθ and x∈Cx\in Cx∈C, and let Exθ\mathbf E^\theta_xExθ​ be the expectation for the chain XXX with transition kernel P(θ)P(\theta)P(θ) started at X0=xX_0=xX0​=x. Let T=inf⁡{n≥0:Xn∈Cc}T=\inf\{n\ge0:X_n\in C^c\}T=inf{n≥0:Xn​∈Cc} (T=∞T=\inftyT=∞ if XXX never leaves CCC). If f≥0f\ge0f≥0, then

Exθ[∑j=0T−1e∑k=0j−1g(Xk)f(Xj)+e∑k=0T−1g(Xk)f(XT)]=∑j=0∞Exθe∑k=0j−1g(Xk)f(Xj)I(T>j)+∑j=0∞Exθe∑k=0j−1g(Xk)I(T≥j)f(Xj)I(Xj∈Cc)=∑j=0∞(Kj(θ)f~(θ))(x).\mathbf E^\theta_x\Big[\sum_{j=0}^{T-1}e^{\sum_{k=0}^{j-1}g(X_k)}f(X_j)+e^{\sum_{k=0}^{T-1}g(X_k)}f(X_T)\Big] =\sum_{j=0}^\infty \mathbf E^\theta_x e^{\sum_{k=0}^{j-1}g(X_k)}f(X_j)I(T>j)+\sum_{j=0}^\infty \mathbf E^\theta_x e^{\sum_{k=0}^{j-1}g(X_k)}I(T\ge j)f(X_j)I(X_j\in C^c) =\sum_{j=0}^\infty (K^j(\theta)\tilde f(\theta))(x).Exθ​[j=0∑T−1​e∑k=0j−1​g(Xk​)f(Xj​)+e∑k=0T−1​g(Xk​)f(XT​)]=j=0∑∞​Exθ​e∑k=0j−1​g(Xk​)f(Xj​)I(T>j)+j=0∑∞​Exθ​e∑k=0j−1​g(Xk​)I(T≥j)f(Xj​)I(Xj​∈Cc)=j=0∑∞​(Kj(θ)f~​(θ))(x).

On {T=∞}\{T=\infty\}{T=∞} the terminal term is absent. All quantities lie in [0,∞][0,\infty][0,∞].

This identifies the path expectation (3.1) with the series ∑nKn(θ)f~(θ)\sum_n K^n(\theta)\tilde f(\theta)∑n​Kn(θ)f~​(θ). The rest of the mission uses that series as u∗u^*u∗, so this result links the mission's u∗u^*u∗ to the chain.

Formalization Note The path law is the published MarkovChainKernel (BanditAlgorithm.markovChainKernel). The right-hand side is ∫f~(θ,y) G(θ,x,dy)\int\tilde f(\theta,y)\,G(\theta,x,dy)∫f~​(θ,y)G(θ,x,dy) with f~\tilde ff~​ computed in [0,∞][0,\infty][0,∞].

Differences from the source:

  • encoding: E^θ_x, expectation of the chain driven by P(θ) started at x → lintegral against BanditAlgorithm.markovChainKernel (P θ) x; reason: the published path law of the time-homogeneous chain with kernel P(θ) and X₀ = x
  • encoding: T = inf{n ≥ 0 : Xₙ ∈ Cᶜ}, with T = ∞ when Cᶜ is never hit; the terminal term exp(Σ_{k<T} g)f(X_T) → exitTime in ℕ∞ (⊤ if the path never leaves C); the terminal term is absent on {T = ⊤}; reason: the infinite-horizon reading of p. 3 (C^c = ∅ gives T = ∞ and no terminal reward)
  • encoding: non-negative real terms and their sums → ENNReal.ofReal of each term, sums and expectations in ℝ≥0∞; reason: every term is non-negative since f ≥ 0; same values in [0, ∞]
  • encoding: Σⱼ (Kʲ(θ)f̃(θ))(x) → ∫⁻ f̃(θ, y) G(θ, x, dy) with G(θ, x, ·) = Measure.sum of Kʲ(θ, x, ·); reason: the integral against a sum of measures is the sum of the integrals
  • encoding: θ ∈ Λ with P(θ) a Markov kernel, f, g, C measurability left implicit → any real θ, P θ Markov for every θ ∈ ℝ (Setting), Measurable f, g, MeasurableSet C; reason: the identity holds for every Markov kernel P(θ), so θ ∈ Λ needs no binder; measurability is needed for the expectations and kernel integrals to be defined
Preamble
import Mathlib
import Definitions.Def_MarkovChainKernel
import Definitions.Def_LyapDiffMC_RandomHorizon_Model

open MeasureTheory ProbabilityTheory
open scoped ENNReal
Formal statement
namespace LyapDiffMC.RandomHorizon

open Classical in
/-- (3.8), p. 9. For non-negative `f`, the random-horizon discounted expectation (3.1) under the
chain with kernel `P(θ)` started at `x ∈ C` splits into the reward collected strictly before the
exit time `T` and the reward collected at time `T` (when `T < ∞`), and this equals
`Σⱼ (Kʲ(θ) f̃(θ))(x) = ∫ f̃(θ, y) G(θ, x, dy)`. -/
theorem eq_3_8 {S : Type*} [MeasurableSpace S] (M : Setting S) (θ : ℝ)
    (hf : ∀ y, 0 ≤ M.f y) (x : S) (hx : x ∈ M.C) :
    ∫⁻ ω, pathReward M ω ∂(BanditAlgorithm.markovChainKernel (M.P θ) x)
        = (∑' j : ℕ, ∫⁻ ω, (if (j : ℕ∞) < exitTime M ω then discReward M ω j else 0)
              ∂(BanditAlgorithm.markovChainKernel (M.P θ) x))
          + (∑' j : ℕ, ∫⁻ ω,
              (if (j : ℕ∞) ≤ exitTime M ω ∧ ω j ∉ M.C then discReward M ω j else 0)
              ∂(BanditAlgorithm.markovChainKernel (M.P θ) x)) ∧
    (∑' j : ℕ, ∫⁻ ω, (if (j : ℕ∞) < exitTime M ω then discReward M ω j else 0)
              ∂(BanditAlgorithm.markovChainKernel (M.P θ) x))
          + (∑' j : ℕ, ∫⁻ ω,
              (if (j : ℕ∞) ≤ exitTime M ω ∧ ω j ∉ M.C then discReward M ω j else 0)
              ∂(BanditAlgorithm.markovChainKernel (M.P θ) x))
        = ∫⁻ y, ftildeE M θ y ∂(greenMeasure M θ x) := by sorry

end LyapDiffMC.RandomHorizon
Source
Rhee, Glynn, Lyapunov Conditions for Differentiability of Markov Chain Expectations, arXiv:1707.03870v1, p. 9, (3.8)
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

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