Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Expected reward in matrix form, ρ⊤Pq00⋯Pqt−1t−1 rqt\rho^\top P^0_{q_0}\cdots P^{t-1}_{q_{t-1}}\,r_{q_t}ρ⊤Pq0​0​⋯Pqt−1​t−1​rqt​​

Definition
TPG_Bridge

by Wenqian Xing · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

causal-inferencemarkov-chainnonstationaritypolicy-gradienttreatment-effect

For an environment of TPG_Model and a sequence q=(qt)t≥0q=(q_t)_{t\ge0}q=(qt​)t≥0​ of treatment probabilities, Env.meanReward q t is the number

mt(q)=μqt rqt=ρ⊤Pq00Pq11⋯Pqt−1t−1 rqt,m_t(q)=\mu_q^t\,r_{q_t}=\rho^\top P^0_{q_0}P^1_{q_1}\cdots P^{t-1}_{q_{t-1}}\,r_{q_t},mt​(q)=μqt​rqt​​=ρ⊤Pq0​0​Pq1​1​⋯Pqt−1​t−1​rqt​​,

where Pθs=θP1s+(1−θ)P0sP^s_\theta=\theta P^s_1+(1-\theta)P^s_0Pθs​=θP1s​+(1−θ)P0s​, rθ(x)=θ r(x,1)+(1−θ) r(x,0)r_\theta(x)=\theta\,r(x,1)+(1-\theta)\,r(x,0)rθ​(x)=θr(x,1)+(1−θ)r(x,0) and r(x,z)=∫y R(dy∣x,z)r(x,z)=\int y\,R(dy\mid x,z)r(x,z)=∫yR(dy∣x,z). Time is 000-indexed.

It is the expected reward Eq[Yt]\mathbb E_q[Y_t]Eq​[Yt​] at time ttt when the action at time sss is treatment with probability qsq_sqs​ (a separate lemma proves this), written in the matrix form used throughout the source's proofs. It is affine in each qsq_sqs​ with s≤ts\le ts≤t and does not depend on qsq_sqs​ for s>ts>ts>t.

Definition code
import Mathlib
import Definitions.Def_TPG_Model
import Definitions.Def_TPG_Markov

open MeasureTheory ProbabilityTheory
open scoped BigOperators ENNReal

namespace TPG

/-- Expected reward at time `t` when the action at time `s` is treatment with probability `q s`,
in matrix form: `ρᵀ P_{q_0}^0 ⋯ P_{q_{t-1}}^{t-1} r_{q_t}`. -/
noncomputable def Env.meanReward {S : Type} [Fintype S] [DecidableEq S] (E : Env S)
    (q : ℕ → ℝ) (t : ℕ) : ℝ :=
  dotProduct (E.stateVec q t) (E.rMix (q t))

end TPG
Source
Johari, Peng, Xing, Estimation of Treatment Effects Under Nonstationarity via the Truncated Policy Gradient Estimator, revised manuscript of October 2026 (revision of arXiv:2506.05308v3, https://arxiv.org/abs/2506.05308); numbering follows the revised manuscript. Auxiliary statement, not a numbered result of the paper: it is the matrix expression ρ^⊤ P_θ^{1→t} r_θ of Appendix G.1, p. 42 (proof of Proposition 1), for a time-varying sequence of treatment probabilities.

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