Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2 — nonstationary Markovian treatment model: Assumption 1 (mixing), kernel deviation δ\deltaδ, trajectory law, value function JJJ, GATE τ\tauτ

Definition
TPG_Model

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

causal-inferencemarkov-chainnonstationaritypolicy-gradienttreatment-effect

This definition file fixes the dynamic model of treatment of the source (§2.2–2.3) and the objects built from it.

Convention. Time is indexed by t=0,1,…,T−1t=0,1,\dots,T-1t=0,1,…,T−1; the source writes t=1,…,Tt=1,\dots,Tt=1,…,T, so time ttt here is the source's time t+1t+1t+1.

  1. Total variation. For real vectors f,gf,gf,g on a finite set SSS, ∥f−g∥TV=12∑x∈S∣f(x)−g(x)∣\|f-g\|_{\mathrm{TV}}=\tfrac12\sum_{x\in S}|f(x)-g(x)|∥f−g∥TV​=21​∑x∈S​∣f(x)−g(x)∣ (tvDist). A probability vector is a nonnegative vector summing to one (IsProbVec).

  2. Environment (Env S). A finite state space SSS with, for every time t∈Nt\in\mathbb Nt∈N and action z∈{0,1}z\in\{0,1\}z∈{0,1} (false is control, true is treatment), a transition matrix PztP_z^tPzt​ with nonnegative entries and rows summing to one, so that P(Xt+1=x′∣Xt=x,Zt=z)=Pzt(x,x′)\mathbb P(X_{t+1}=x'\mid X_t=x,Z_t=z)=P_z^t(x,x')P(Xt+1​=x′∣Xt​=x,Zt​=z)=Pzt​(x,x′); a distribution ρ\rhoρ of the initial state X0X_0X0​; and for every state xxx and action zzz a probability distribution R(⋅∣x,z)R(\cdot\mid x,z)R(⋅∣x,z) on R\mathbb RR of the reward.

  3. Bounded rewards (Env.RewardBound M): R([−M,M]∣x,z)=1R([-M,M]\mid x,z)=1R([−M,M]∣x,z)=1 for all x,zx,zx,z. The mean rewards are 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) (Env.r) and 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) (Env.rMix).

  4. Kernels under πθ\pi_\thetaπθ​: Pθt=θP1t+(1−θ)P0tP_\theta^t=\theta P_1^t+(1-\theta)P_0^tPθt​=θP1t​+(1−θ)P0t​ (Env.PMix), and the multi-step kernel Pθa→b=PθaPθa+1⋯Pθb−1P_\theta^{a\to b}=P_\theta^{a}P_\theta^{a+1}\cdots P_\theta^{b-1}Pθa→b​=Pθa​Pθa+1​⋯Pθb−1​, equal to the identity when b≤ab\le ab≤a (Env.PProd).

  5. Assumption 1, mixing time (Env.Mixing T γ): for every t<Tt<Tt<T, every action zzz and every pair of probability vectors f,f′f,f'f,f′ on SSS,

∥f′Pzt−fPzt∥TV≤γ ∥f′−f∥TV,(fP)(x′)=∑xf(x)P(x,x′).\|f'P_z^t-fP_z^t\|_{\mathrm{TV}}\le\gamma\,\|f'-f\|_{\mathrm{TV}},\qquad (fP)(x')=\sum_{x}f(x)P(x,x').∥f′Pzt​−fPzt​∥TV​≤γ∥f′−f∥TV​,(fP)(x′)=x∑​f(x)P(x,x′).

The condition 0<γ<10<\gamma<10<γ<1 is a separate hypothesis of each theorem.

  1. Kernel deviation (Env.delta T): δ=sup⁡t<Tsup⁡x∈S∥P1t(x,⋅)−P0t(x,⋅)∥TV\delta=\sup_{t<T}\sup_{x\in S}\|P_1^t(x,\cdot)-P_0^t(x,\cdot)\|_{\mathrm{TV}}δ=supt<T​supx∈S​∥P1t​(x,⋅)−P0t​(x,⋅)∥TV​.

  2. Trajectories. A trajectory of horizon TTT is ω=(Xt,Zt,Yt)t<T\omega=(X_t,Z_t,Y_t)_{t<T}ω=(Xt​,Zt​,Yt​)t<T​ (Traj S T, with coordinate maps X, Z, Y). For a sequence q=(qt)t≥0q=(q_t)_{t\ge0}q=(qt​)t≥0​ of treatment probabilities, Env.pathWeight is the probability of a state path xxx and an action path zzz,

ρ(x0)∏s+1<TPzss(xs,xs+1)∏t<Tqt zt(1−qt)1−zt,\rho(x_0)\prod_{s+1<T}P_{z_s}^{s}(x_s,x_{s+1})\prod_{t<T}q_t^{\,z_t}(1-q_t)^{1-z_t},ρ(x0​)s+1<T∏​Pzs​s​(xs​,xs+1​)t<T∏​qtzt​​(1−qt​)1−zt​,

and Env.trajLaw T q is the law of the trajectory when X0∼ρX_0\sim\rhoX0​∼ρ, the actions are independent with P(Zt=1)=qt\mathbb P(Z_t=1)=q_tP(Zt​=1)=qt​, the state follows PZttP^t_{Z_t}PZt​t​, and, given the states and actions, the rewards are independent with Yt∼R(⋅∣Xt,Zt)Y_t\sim R(\cdot\mid X_t,Z_t)Yt​∼R(⋅∣Xt​,Zt​). Env.expLaw T θ is the case qt≡θq_t\equiv\thetaqt​≡θ: the law under the Bernoulli randomization policy πθ\pi_\thetaπθ​.

  1. Value function and estimand (Env.J, Env.gate):
J(θ)=1T∑t<TEθ[Yt],τ=1T∑t<T(E1[Yt]−E0[Yt]).J(\theta)=\frac1T\sum_{t<T}\mathbb E_\theta[Y_t],\qquad \tau=\frac1T\sum_{t<T}\bigl(\mathbb E_1[Y_t]-\mathbb E_0[Y_t]\bigr).J(θ)=T1​t<T∑​Eθ​[Yt​],τ=T1​t<T∑​(E1​[Yt​]−E0​[Yt​]).

τ\tauτ is the global average treatment effect (GATE).

Every statement of the mission is expressed through these objects.

Formalization Note Kernels are stored for all t∈Nt\in\mathbb Nt∈N; a statement with horizon TTT involves PtP^tPt only for t<Tt<Tt<T, which are the source's P1,…,PTP^1,\dots,P^TP1,…,PT. The trajectory law is constructed as a finite mixture, over the pairs of a state path and an action path, of products of point masses and reward laws. For qt∉[0,1]q_t\notin[0,1]qt​∈/[0,1] negative path weights are replaced by 000 and the result is not a probability law; no statement uses such qqq except through values of JJJ away from the point of interest. For T=0T=0T=0 the averages JJJ and τ\tauτ equal 000.

Definition code
import Mathlib

open MeasureTheory ProbabilityTheory
open scoped BigOperators ENNReal

namespace TPG

/-- Total variation distance between two real vectors on a finite set,
with the convention `‖f - g‖_TV = (1/2) ‖f - g‖₁`. -/
noncomputable def tvDist {S : Type} [Fintype S] (f g : S → ℝ) : ℝ :=
  (1 / 2) * ∑ x, |f x - g x|

/-- `f` is a probability distribution on the finite set `S`. -/
def IsProbVec {S : Type} [Fintype S] (f : S → ℝ) : Prop :=
  (∀ x, 0 ≤ f x) ∧ ∑ x, f x = 1

/-- A nonstationary Markovian environment with finite state space `S` and binary action
(`true` = treatment, `false` = control). Time is indexed by `t = 0, 1, 2, …`
(the source's time `t + 1`).

* `P t z` is the transition matrix used between times `t` and `t + 1` under action `z`;
* `ρ` is the distribution of the initial state;
* `R x z` is the distribution of the real-valued reward when action `z` is taken in state `x`. -/
structure Env (S : Type) [Fintype S] where
  P : ℕ → Bool → Matrix S S ℝ
  P_nonneg : ∀ (t : ℕ) (z : Bool) (x x' : S), 0 ≤ P t z x x'
  P_row_sum : ∀ (t : ℕ) (z : Bool) (x : S), ∑ x', P t z x x' = 1
  ρ : S → ℝ
  ρ_nonneg : ∀ x : S, 0 ≤ ρ x
  ρ_sum : ∑ x, ρ x = 1
  R : S → Bool → Measure ℝ
  R_prob : ∀ (x : S) (z : Bool), IsProbabilityMeasure (R x z)

instance {S : Type} [Fintype S] (E : Env S) (x : S) (z : Bool) :
    IsProbabilityMeasure (E.R x z) := E.R_prob x z

section Kernels

variable {S : Type} [Fintype S]

/-- Rewards are almost surely bounded by `M`: `R([-M, M] | x, z) = 1` for all `x, z`. -/
def Env.RewardBound (E : Env S) (M : ℝ) : Prop :=
  ∀ (x : S) (z : Bool), E.R x z (Set.Icc (-M) M) = 1

/-- Expected reward `r(x, z) = ∫ y R(dy | x, z)`. -/
noncomputable def Env.r (E : Env S) (z : Bool) (x : S) : ℝ :=
  ∫ y, y ∂(E.R x z)

/-- Expected reward `r_θ(x) = θ r(x, 1) + (1 - θ) r(x, 0)` under the policy `π_θ`. -/
noncomputable def Env.rMix (E : Env S) (θ : ℝ) (x : S) : ℝ :=
  θ * E.r true x + (1 - θ) * E.r false x

/-- Transition matrix `P_θ^t = θ P_1^t + (1 - θ) P_0^t` under the policy `π_θ`. -/
noncomputable def Env.PMix (E : Env S) (θ : ℝ) (t : ℕ) : Matrix S S ℝ :=
  θ • E.P t true + (1 - θ) • E.P t false

/-- Multi-step kernel `P_θ^{a → b} = P_θ^a P_θ^{a+1} ⋯ P_θ^{b-1}`
(the identity matrix when `b ≤ a`). -/
noncomputable def Env.PProd [DecidableEq S] (E : Env S) (θ : ℝ) (a b : ℕ) : Matrix S S ℝ :=
  ((List.Ico a b).map (fun u => E.PMix θ u)).prod

/-- Assumption 1 (mixing time) over the horizon `T` with contraction constant `γ`:
for every time `t < T`, every action `z` and every pair of probability distributions
`f, f'` on `S`, `‖f' P_z^t - f P_z^t‖_TV ≤ γ ‖f' - f‖_TV`. -/
def Env.Mixing (E : Env S) (T : ℕ) (γ : ℝ) : Prop :=
  ∀ t : ℕ, t < T → ∀ (z : Bool) (f f' : S → ℝ), IsProbVec f → IsProbVec f' →
    tvDist (Matrix.vecMul f' (E.P t z)) (Matrix.vecMul f (E.P t z)) ≤ γ * tvDist f' f

/-- Kernel deviation
`δ = sup_{t < T} sup_x ‖P_1^t(x, ·) - P_0^t(x, ·)‖_TV` over the horizon `T`. -/
noncomputable def Env.delta (E : Env S) (T : ℕ) : ℝ :=
  ⨆ t : Fin T, ⨆ x : S, tvDist (E.P (t : ℕ) true x) (E.P (t : ℕ) false x)

end Kernels

section Trajectory

variable {S : Type} [Fintype S]

/-- A trajectory `(X_t, Z_t, Y_t)_{t < T}` of states, actions and rewards. -/
abbrev Traj (S : Type) (T : ℕ) : Type := Fin T → S × Bool × ℝ

/-- State at time `t`. -/
def X {T : ℕ} (t : Fin T) (ω : Traj S T) : S := (ω t).1

/-- Action (treatment indicator) at time `t`. -/
def Z {T : ℕ} (t : Fin T) (ω : Traj S T) : Bool := (ω t).2.1

/-- Reward at time `t`. -/
def Y {T : ℕ} (t : Fin T) (ω : Traj S T) : ℝ := (ω t).2.2

/-- Probability of the state path `x` and action path `z` over the horizon `T` when the
initial state has distribution `ρ`, the action at time `t` is treatment with probability
`q t` independently of everything else, and the state moves from time `s` to time `s + 1`
according to `P s (z s)`:
`ρ(x_0) · ∏_{s + 1 < T} P_{z_s}^s(x_s, x_{s+1}) · ∏_{t < T} (q_t if z_t else 1 - q_t)`. -/
noncomputable def Env.pathWeight (E : Env S) (T : ℕ) (q : ℕ → ℝ)
    (x : Fin T → S) (z : Fin T → Bool) : ℝ :=
  (∏ t : Fin T, if (t : ℕ) = 0 then E.ρ (x t) else 1)
    * (∏ s : Fin T, ∏ t : Fin T,
        if (s : ℕ) + 1 = (t : ℕ) then E.P (s : ℕ) (z s) (x s) (x t) else 1)
    * (∏ t : Fin T, if z t then q (t : ℕ) else 1 - q (t : ℕ))

/-- Law of the trajectory `(X_t, Z_t, Y_t)_{t < T}` when the action at time `t` is treatment
with probability `q t`: a mixture over state/action paths, weighted by `pathWeight`, of the
laws under which the path is fixed and the rewards are independent with
`Y_t ∼ R(· | x_t, z_t)`. -/
noncomputable def Env.trajLaw [MeasurableSpace S] (E : Env S) (T : ℕ) (q : ℕ → ℝ) :
    Measure (Traj S T) :=
  ∑ p : (Fin T → S) × (Fin T → Bool),
    ENNReal.ofReal (E.pathWeight T q p.1 p.2) •
      Measure.pi (fun t : Fin T =>
        (Measure.dirac (p.1 t)).prod ((Measure.dirac (p.2 t)).prod (E.R (p.1 t) (p.2 t))))

/-- Law of the trajectory under the Bernoulli randomization policy `π_θ`
(every action is treatment with probability `θ`). -/
noncomputable def Env.expLaw [MeasurableSpace S] (E : Env S) (T : ℕ) (θ : ℝ) :
    Measure (Traj S T) :=
  E.trajLaw T (fun _ => θ)

/-- Value function `J(θ) = (1/T) ∑_t E_{π_θ}[Y_t]`. -/
noncomputable def Env.J [MeasurableSpace S] (E : Env S) (T : ℕ) (θ : ℝ) : ℝ :=
  (1 / (T : ℝ)) * ∑ t : Fin T, ∫ ω, Y t ω ∂(E.expLaw T θ)

/-- Global average treatment effect
`τ = (1/T) ∑_t (E_{π_1}[Y_t] - E_{π_0}[Y_t])`. -/
noncomputable def Env.gate [MeasurableSpace S] (E : Env S) (T : ℕ) : ℝ :=
  (1 / (T : ℝ)) * ∑ t : Fin T,
    ((∫ ω, Y t ω ∂(E.expLaw T 1)) - ∫ ω, Y t ω ∂(E.expLaw T 0))

end Trajectory

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. §2.2–2.3, pp. 8–10: transition kernels, Assumption 1, rewards, policies π_θ, eq. (1), definition of the GATE; Theorem 1, p. 11 (kernel deviation δ); eq. (6), p. 13 (value function J); Appendix A.1–A.2, p. 27 (multi-step kernels).
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Read-back of the definition file TPG_Model

All declarations live in the namespace TPG. Throughout, "Boolean" means an element of the two-point set {true,false}\{\mathsf{true},\mathsf{false}\}{true,false}, N={0,1,2,… }\mathbb{N}=\{0,1,2,\dots\}N={0,1,2,…}, and {0,…,T−1}\{0,\dots,T-1\}{0,…,T−1} denotes the set of natural numbers below TTT (empty when T=0T=0T=0). Declarations are listed in file order.


tvDist (definition, a real number). Let SSS be a finite type and let f,g:S→Rf,g:S\to\mathbb{R}f,g:S→R be two arbitrary real-valued functions on SSS (they are not required to be nonnegative or to sum to 111). The real number tvDist(f,g)\mathrm{tvDist}(f,g)tvDist(f,g) is defined by

tvDist(f,g)  =  12∑x∈S∣f(x)−g(x)∣.\mathrm{tvDist}(f,g)\;=\;\frac12\sum_{x\in S}\bigl|f(x)-g(x)\bigr| .tvDist(f,g)=21​x∈S∑​​f(x)−g(x)​.

If SSS is empty the sum is empty and the value is 000.


IsProbVec (definition, a proposition). Let SSS be a finite type and f:S→Rf:S\to\mathbb{R}f:S→R. The proposition IsProbVec(f)\mathrm{IsProbVec}(f)IsProbVec(f) is the conjunction of two conditions: f(x)≥0f(x)\ge 0f(x)≥0 for every x∈Sx\in Sx∈S, and ∑x∈Sf(x)=1\sum_{x\in S}f(x)=1∑x∈S​f(x)=1. If SSS is empty the sum is 000, so no function satisfies the proposition.


Env (structure). Let SSS be a finite type. An element EEE of Env(S)\mathrm{Env}(S)Env(S) is a bundle of the following eight fields (three pieces of data, each followed by the conditions imposed on it).

  • P: for every natural number t∈Nt\in\mathbb{N}t∈N (all natural numbers, with no upper limit) and every Boolean zzz, a real matrix PtzP_t^{z}Ptz​ with rows and columns indexed by SSS; its entry in row xxx, column x′x'x′ is written Ptz(x,x′)P_t^{z}(x,x')Ptz​(x,x′).
  • P_nonneg: for every t∈Nt\in\mathbb{N}t∈N, every Boolean zzz and all x,x′∈Sx,x'\in Sx,x′∈S:   0≤Ptz(x,x′)\;0\le P_t^{z}(x,x')0≤Ptz​(x,x′).
  • P_row_sum: for every t∈Nt\in\mathbb{N}t∈N, every Boolean zzz and every x∈Sx\in Sx∈S:   ∑x′∈SPtz(x,x′)=1\;\sum_{x'\in S}P_t^{z}(x,x')=1∑x′∈S​Ptz​(x,x′)=1 (every row sums to 111).
  • ρ: a function ρ:S→R\rho:S\to\mathbb{R}ρ:S→R.
  • ρ_nonneg: for every x∈Sx\in Sx∈S:   0≤ρ(x)\;0\le\rho(x)0≤ρ(x).
  • ρ_sum:   ∑x∈Sρ(x)=1\;\sum_{x\in S}\rho(x)=1∑x∈S​ρ(x)=1.
  • R: for every x∈Sx\in Sx∈S and every Boolean zzz, a measure Rx,zR_{x,z}Rx,z​ on R\mathbb{R}R (with its Borel σ\sigmaσ-algebra). This family is indexed by xxx and zzz only; it has no dependence on a time index.
  • R_prob: for every x∈Sx\in Sx∈S and every Boolean zzz, Rx,zR_{x,z}Rx,z​ is a probability measure, i.e. Rx,z(R)=1R_{x,z}(\mathbb{R})=1Rx,z​(R)=1.

Nothing else is required: in particular no boundedness, moment or support condition is imposed on the measures Rx,zR_{x,z}Rx,z​. If SSS is empty, the condition ρ_sum reads 0=10=10=1, so Env(S)\mathrm{Env}(S)Env(S) has no elements; hence the existence of any E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) forces SSS to be nonempty.


(unnamed instance). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S), x∈Sx\in Sx∈S and zzz a Boolean. The declaration records that the measure Rx,zR_{x,z}Rx,z​ of EEE is a probability measure, the justification being the field R_prob of EEE applied to xxx and zzz. It adds no new mathematical content; it makes this fact available automatically wherever a probability measure is expected.


Env.RewardBound (definition, a proposition). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with reward measures Rx,zR_{x,z}Rx,z​ on R\mathbb{R}R (one probability measure for each x∈Sx\in Sx∈S and Boolean zzz), and let M∈RM\in\mathbb{R}M∈R be an arbitrary real number (its sign is not constrained). The proposition RewardBound(E,M)\mathrm{RewardBound}(E,M)RewardBound(E,M) says: for every x∈Sx\in Sx∈S and every Boolean zzz,

Rx,z([−M,M])=1,R_{x,z}\bigl([-M,M]\bigr)=1,Rx,z​([−M,M])=1,

where [−M,M]={y∈R:−M≤y≤M}[-M,M]=\{y\in\mathbb{R}: -M\le y\le M\}[−M,M]={y∈R:−M≤y≤M} is the closed interval. If M<0M<0M<0 this interval is empty, its measure is 000, and the proposition is false (recall that SSS is necessarily nonempty once EEE exists).


Env.r (definition, a real number). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with reward measures Rx,zR_{x,z}Rx,z​, let zzz be a Boolean and x∈Sx\in Sx∈S (the arguments are taken in this order: first zzz, then xxx). The real number rz(x)r_z(x)rz​(x) is

rz(x)  =  ∫Ry  dRx,z(y),r_z(x)\;=\;\int_{\mathbb{R}}y\;\mathrm{d}R_{x,z}(y),rz​(x)=∫R​ydRx,z​(y),

the integral of the identity function against the probability measure Rx,zR_{x,z}Rx,z​. No integrability hypothesis is part of the definition; the integral is the Bochner integral, which by convention has the value 000 when the identity function is not integrable with respect to Rx,zR_{x,z}Rx,z​ (that is, when ∫∣y∣ dRx,z(y)=∞\int|y|\,\mathrm{d}R_{x,z}(y)=\infty∫∣y∣dRx,z​(y)=∞).


Env.rMix (definition, a real number). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S), θ∈R\theta\in\mathbb{R}θ∈R an arbitrary real number (not required to lie in [0,1][0,1][0,1]), and x∈Sx\in Sx∈S. With rz(x)=∫Ry dRx,z(y)r_z(x)=\int_{\mathbb{R}}y\,\mathrm{d}R_{x,z}(y)rz​(x)=∫R​ydRx,z​(y) as in Env.r (value 000 if the identity is not Rx,zR_{x,z}Rx,z​-integrable), the definition is

rMixθ(x)  =  θ⋅rtrue(x)  +  (1−θ)⋅rfalse(x).\mathrm{rMix}_\theta(x)\;=\;\theta\cdot r_{\mathsf{true}}(x)\;+\;(1-\theta)\cdot r_{\mathsf{false}}(x).rMixθ​(x)=θ⋅rtrue​(x)+(1−θ)⋅rfalse​(x).

Env.PMix (definition, a real S×SS\times SS×S matrix). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with matrices PtzP_t^{z}Ptz​, let θ∈R\theta\in\mathbb{R}θ∈R be an arbitrary real number (not required to lie in [0,1][0,1][0,1]) and t∈Nt\in\mathbb{N}t∈N. The matrix Pˉtθ\bar P^{\theta}_tPˉtθ​ is the entrywise combination

Pˉtθ  =  θ Pttrue  +  (1−θ) Ptfalse,i.e.Pˉtθ(x,x′)=θ Pttrue(x,x′)+(1−θ) Ptfalse(x,x′).\bar P^{\theta}_t\;=\;\theta\,P_t^{\mathsf{true}}\;+\;(1-\theta)\,P_t^{\mathsf{false}},\qquad\text{i.e.}\qquad \bar P^{\theta}_t(x,x')=\theta\,P_t^{\mathsf{true}}(x,x')+(1-\theta)\,P_t^{\mathsf{false}}(x,x').Pˉtθ​=θPttrue​+(1−θ)Ptfalse​,i.e.Pˉtθ​(x,x′)=θPttrue​(x,x′)+(1−θ)Ptfalse​(x,x′).

For θ∉[0,1]\theta\notin[0,1]θ∈/[0,1] one of the two coefficients is negative, so entries of Pˉtθ\bar P^\theta_tPˉtθ​ can be negative.


Env.PProd (definition, a real S×SS\times SS×S matrix). Let SSS be a finite type with decidable equality (used to form the identity matrix), E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S), θ∈R\theta\in\mathbb{R}θ∈R arbitrary, and a,b∈Na,b\in\mathbb{N}a,b∈N. Writing Pˉuθ=θ Putrue+(1−θ) Pufalse\bar P^{\theta}_u=\theta\,P_u^{\mathsf{true}}+(1-\theta)\,P_u^{\mathsf{false}}Pˉuθ​=θPutrue​+(1−θ)Pufalse​ as in Env.PMix, the definition is the ordered matrix product over the indices u=a,a+1,…,b−1u=a,a+1,\dots,b-1u=a,a+1,…,b−1, taken in increasing order from left to right:

PProdθ(a,b)  =  Pˉaθ Pˉa+1θ⋯Pˉb−1θ.\mathrm{PProd}_\theta(a,b)\;=\;\bar P^{\theta}_a\,\bar P^{\theta}_{a+1}\cdots\bar P^{\theta}_{b-1}.PProdθ​(a,b)=Pˉaθ​Pˉa+1θ​⋯Pˉb−1θ​.

The number of factors is b−ab-ab−a computed with truncated subtraction of natural numbers: if b≤ab\le ab≤a there are no factors and the value is the identity matrix on SSS; if b=a+1b=a+1b=a+1 the value is the single matrix Pˉaθ\bar P^\theta_aPˉaθ​.


Env.Mixing (definition, a proposition). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with matrices PtzP_t^{z}Ptz​, T∈NT\in\mathbb{N}T∈N, and γ∈R\gamma\in\mathbb{R}γ∈R an arbitrary real number (not required to be nonnegative or less than 111). For a function f:S→Rf:S\to\mathbb{R}f:S→R and a matrix AAA write fAfAfA for the row-vector-times-matrix product, (fA)(x′)=∑x∈Sf(x) A(x,x′)(fA)(x')=\sum_{x\in S}f(x)\,A(x,x')(fA)(x′)=∑x∈S​f(x)A(x,x′). The proposition Mixing(E,T,γ)\mathrm{Mixing}(E,T,\gamma)Mixing(E,T,γ) says: for every natural number ttt with t<Tt<Tt<T, every Boolean zzz, and all functions f,f′:S→Rf,f':S\to\mathbb{R}f,f′:S→R such that both fff and f′f'f′ have nonnegative entries summing to 111,

12∑x′∈S∣(f′Ptz)(x′)−(fPtz)(x′)∣  ≤  γ⋅12∑x∈S∣f′(x)−f(x)∣.\frac12\sum_{x'\in S}\Bigl|\bigl(f'P_t^{z}\bigr)(x')-\bigl(fP_t^{z}\bigr)(x')\Bigr|\;\le\;\gamma\cdot\frac12\sum_{x\in S}\bigl|f'(x)-f(x)\bigr| .21​x′∈S∑​​(f′Ptz​)(x′)−(fPtz​)(x′)​≤γ⋅21​x∈S∑​​f′(x)−f(x)​.

The inequality is non-strict. Only the matrices with time index t∈{0,…,T−1}t\in\{0,\dots,T-1\}t∈{0,…,T−1} are constrained (both Boolean values, each separately); if T=0T=0T=0 the proposition holds vacuously for every γ\gammaγ.


Env.delta (definition, a real number). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with matrices PtzP_t^{z}Ptz​, and T∈NT\in\mathbb{N}T∈N. The definition is

δ(E,T)  =  sup⁡t∈{0,…,T−1}  sup⁡x∈S  12∑x′∈S∣Pttrue(x,x′)−Ptfalse(x,x′)∣,\delta(E,T)\;=\;\sup_{t\in\{0,\dots,T-1\}}\;\sup_{x\in S}\;\frac12\sum_{x'\in S}\Bigl|P_t^{\mathsf{true}}(x,x')-P_t^{\mathsf{false}}(x,x')\Bigr| ,δ(E,T)=t∈{0,…,T−1}sup​x∈Ssup​21​x′∈S∑​​Pttrue​(x,x′)−Ptfalse​(x,x′)​,

i.e. for each time t<Tt<Tt<T and each row index xxx, half the ℓ1\ell^1ℓ1-distance between row xxx of PttrueP_t^{\mathsf{true}}Pttrue​ and row xxx of PtfalseP_t^{\mathsf{false}}Ptfalse​, then the supremum over xxx and over ttt. The suprema are suprema of real numbers with the convention that the supremum over an empty index set is 000; consequently δ(E,0)=0\delta(E,0)=0δ(E,0)=0. For T≥1T\ge 1T≥1 both index sets are finite and nonempty, so the suprema are maxima.


Traj (abbreviation, a type). Let SSS be any type (no finiteness is required here) and T∈NT\in\mathbb{N}T∈N. Then Traj(S,T)\mathrm{Traj}(S,T)Traj(S,T) is the set of all functions

ω:{0,…,T−1}  ⟶  S×{true,false}×R,\omega:\{0,\dots,T-1\}\;\longrightarrow\;S\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R},ω:{0,…,T−1}⟶S×{true,false}×R,

i.e. sequences of length TTT of triples (element of SSS, Boolean, real number). For T=0T=0T=0 this set has exactly one element (the empty sequence).


X (definition, an element of SSS). Let SSS be any type (the definition does not use finiteness of SSS), T∈NT\in\mathbb{N}T∈N, t∈{0,…,T−1}t\in\{0,\dots,T-1\}t∈{0,…,T−1} and ω∈Traj(S,T)\omega\in\mathrm{Traj}(S,T)ω∈Traj(S,T), i.e. ω\omegaω is a length-TTT sequence of triples in S×{true,false}×RS\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R}S×{true,false}×R. Then Xt(ω)∈SX_t(\omega)\in SXt​(ω)∈S is the first component of the triple ω(t)\omega(t)ω(t). (When T=0T=0T=0 there is no admissible ttt.)


Z (definition, a Boolean). Let SSS be any type (finiteness not used), T∈NT\in\mathbb{N}T∈N, t∈{0,…,T−1}t\in\{0,\dots,T-1\}t∈{0,…,T−1} and ω∈Traj(S,T)\omega\in\mathrm{Traj}(S,T)ω∈Traj(S,T), a length-TTT sequence of triples in S×{true,false}×RS\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R}S×{true,false}×R. Then Zt(ω)Z_t(\omega)Zt​(ω) is the second (Boolean) component of the triple ω(t)\omega(t)ω(t).


Y (definition, a real number). Let SSS be any type (finiteness not used), T∈NT\in\mathbb{N}T∈N, t∈{0,…,T−1}t\in\{0,\dots,T-1\}t∈{0,…,T−1} and ω∈Traj(S,T)\omega\in\mathrm{Traj}(S,T)ω∈Traj(S,T), a length-TTT sequence of triples in S×{true,false}×RS\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R}S×{true,false}×R. Then Yt(ω)∈RY_t(\omega)\in\mathbb{R}Yt​(ω)∈R is the third (real) component of the triple ω(t)\omega(t)ω(t).


Env.pathWeight (definition, a real number). Let SSS be a finite type, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with matrices PtzP_t^{z}Ptz​ and initial vector ρ\rhoρ, let T∈NT\in\mathbb{N}T∈N, let q:N→Rq:\mathbb{N}\to\mathbb{R}q:N→R be an arbitrary sequence of real numbers (the values qtq_tqt​ are not required to lie in [0,1][0,1][0,1]), let x:{0,…,T−1}→Sx:\{0,\dots,T-1\}\to Sx:{0,…,T−1}→S and z:{0,…,T−1}→{true,false}z:\{0,\dots,T-1\}\to\{\mathsf{true},\mathsf{false}\}z:{0,…,T−1}→{true,false}. The real number wq(x,z)w_q(x,z)wq​(x,z) is the product of three factors,

wq(x,z)=(∏t<Tat)⋅(∏s<T ∏t<Tbs,t)⋅(∏t<Tct),w_q(x,z)=\Bigl(\prod_{t<T}a_t\Bigr)\cdot\Bigl(\prod_{s<T}\ \prod_{t<T}b_{s,t}\Bigr)\cdot\Bigl(\prod_{t<T}c_t\Bigr),wq​(x,z)=(t<T∏​at​)⋅(s<T∏​ t<T∏​bs,t​)⋅(t<T∏​ct​),

where

at={ρ(xt)if t=01otherwise,bs,t={Pszs(xs,xt)if s+1=t1otherwise,ct={qtif zt=true1−qtif zt=false.a_t=\begin{cases}\rho(x_t)&\text{if }t=0\\ 1&\text{otherwise,}\end{cases}\qquad b_{s,t}=\begin{cases}P_s^{z_s}(x_s,x_t)&\text{if }s+1=t\\ 1&\text{otherwise,}\end{cases}\qquad c_t=\begin{cases}q_t&\text{if }z_t=\mathsf{true}\\ 1-q_t&\text{if }z_t=\mathsf{false}.\end{cases}at​={ρ(xt​)1​if t=0otherwise,​bs,t​={Pszs​​(xs​,xt​)1​if s+1=totherwise,​ct​={qt​1−qt​​if zt​=trueif zt​=false.​

Evaluating the products, for T≥1T\ge 1T≥1 this is

wq(x,z)=ρ(x0)⋅∏s=0T−2Pszs(xs,xs+1)⋅∏t=0T−1(qt if zt=true, else 1−qt).w_q(x,z)=\rho(x_0)\cdot\prod_{s=0}^{T-2}P_s^{z_s}(x_s,x_{s+1})\cdot\prod_{t=0}^{T-1}\bigl(q_t\text{ if }z_t=\mathsf{true},\ \text{else }1-q_t\bigr).wq​(x,z)=ρ(x0​)⋅s=0∏T−2​Pszs​​(xs​,xs+1​)⋅t=0∏T−1​(qt​ if zt​=true, else 1−qt​).

Literal consequences: the factor for the step from time sss to time s+1s+1s+1 uses the matrix with time index sss and the Boolean zsz_szs​ of the earlier time sss; the matrices PszP_s^{z}Psz​ with s≥T−1s\ge T-1s≥T−1 do not occur, and the last Boolean zT−1z_{T-1}zT−1​ occurs only in the third factor; only q0,…,qT−1q_0,\dots,q_{T-1}q0​,…,qT−1​ are used. For T=1T=1T=1 there is no transition factor and wq(x,z)=ρ(x0)⋅(q0 or 1−q0)w_q(x,z)=\rho(x_0)\cdot(q_0\text{ or }1-q_0)wq​(x,z)=ρ(x0​)⋅(q0​ or 1−q0​). For T=0T=0T=0 all three products are empty and wq(x,z)=1w_q(x,z)=1wq​(x,z)=1 (for the unique empty xxx and zzz). If some qtq_tqt​ lies outside [0,1][0,1][0,1], then wq(x,z)w_q(x,z)wq​(x,z) can be negative.


Env.trajLaw (definition, a measure on Traj(S,T)\mathrm{Traj}(S,T)Traj(S,T)). Let SSS be a finite type that is in addition equipped with a σ\sigmaσ-algebra, supplied as an arbitrary extra structure (nothing requires it to be the σ\sigmaσ-algebra of all subsets). Let E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) with matrices PtzP_t^{z}Ptz​, initial vector ρ\rhoρ and reward probability measures Rx,zR_{x,z}Rx,z​ on R\mathbb{R}R; let T∈NT\in\mathbb{N}T∈N and let q:N→Rq:\mathbb{N}\to\mathbb{R}q:N→R be an arbitrary real sequence. The space Traj(S,T)=(S×{true,false}×R)T\mathrm{Traj}(S,T)=\bigl(S\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R}\bigr)^{T}Traj(S,T)=(S×{true,false}×R)T carries the product σ\sigmaσ-algebra (the given σ\sigmaσ-algebra on SSS, all subsets of the Booleans, the Borel sets of R\mathbb{R}R). The measure μq\mu_qμq​ is the following finite sum, taken over all pairs (x,z)(x,z)(x,z) with x:{0,…,T−1}→Sx:\{0,\dots,T-1\}\to Sx:{0,…,T−1}→S and z:{0,…,T−1}→{true,false}z:\{0,\dots,T-1\}\to\{\mathsf{true},\mathsf{false}\}z:{0,…,T−1}→{true,false}:

μq  =  ∑(x,z) max⁡(wq(x,z), 0)⋅⨂t=0T−1(δxt⊗δzt⊗Rxt,zt),\mu_q\;=\;\sum_{(x,z)}\ \max\bigl(w_q(x,z),\,0\bigr)\cdot\bigotimes_{t=0}^{T-1}\Bigl(\delta_{x_t}\otimes\delta_{z_t}\otimes R_{x_t,z_t}\Bigr),μq​=(x,z)∑​ max(wq​(x,z),0)⋅t=0⨂T−1​(δxt​​⊗δzt​​⊗Rxt​,zt​​),

where:

  • wq(x,z)=ρ(x0)∏s=0T−2Pszs(xs,xs+1)∏t=0T−1(qt if zt=true, else 1−qt)w_q(x,z)=\rho(x_0)\prod_{s=0}^{T-2}P_s^{z_s}(x_s,x_{s+1})\prod_{t=0}^{T-1}\bigl(q_t\text{ if }z_t=\mathsf{true},\text{ else }1-q_t\bigr)wq​(x,z)=ρ(x0​)∏s=0T−2​Pszs​​(xs​,xs+1​)∏t=0T−1​(qt​ if zt​=true, else 1−qt​) is the path weight of Env.pathWeight (equal to 111 when T=0T=0T=0);
  • the scalar in front of each term is the weight converted to an extended nonnegative real by replacing every negative value with 000; so pairs (x,z)(x,z)(x,z) with negative weight contribute nothing, rather than a negative amount;
  • δxt\delta_{x_t}δxt​​ is the unit point mass at xtx_txt​ on SSS, δzt\delta_{z_t}δzt​​ the unit point mass at ztz_tzt​ on the Booleans, and δxt⊗δzt⊗Rxt,zt\delta_{x_t}\otimes\delta_{z_t}\otimes R_{x_t,z_t}δxt​​⊗δzt​​⊗Rxt​,zt​​ their product with Rxt,ztR_{x_t,z_t}Rxt​,zt​​ on S×{true,false}×RS\times\{\mathsf{true},\mathsf{false}\}\times\mathbb{R}S×{true,false}×R; the outer ⨂t\bigotimes_t⨂t​ is the product measure over the TTT time coordinates.

Thus each term is a measure under which the state and Boolean coordinates are deterministically xxx and zzz and the real coordinates Y0,…,YT−1Y_0,\dots,Y_{T-1}Y0​,…,YT−1​ are independent with Yt∼Rxt,ztY_t\sim R_{x_t,z_t}Yt​∼Rxt​,zt​​ (the reward measure depends on the state and Boolean at the same time ttt, and not on ttt itself). When 0≤qt≤10\le q_t\le 10≤qt​≤1 for all t<Tt<Tt<T, every weight is nonnegative, no clipping occurs, the weights sum to 111, and μq\mu_qμq​ is the joint law of the following process: X0∼ρX_0\sim\rhoX0​∼ρ; at each time ttt, ZtZ_tZt​ is true\mathsf{true}true with probability qtq_tqt​ and false\mathsf{false}false with probability 1−qt1-q_t1−qt​, drawn independently of everything before it (its distribution depends on ttt only, not on the states); Xt+1X_{t+1}Xt+1​ is drawn from row XtX_tXt​ of PtZtP_t^{Z_t}PtZt​​; and YtY_tYt​ is drawn from RXt,ZtR_{X_t,Z_t}RXt​,Zt​​. When some qtq_tqt​ with t<Tt<Tt<T lies outside [0,1][0,1][0,1], some weights may be negative and are replaced by 000, and μq\mu_qμq​ is then in general not a probability measure. For T=0T=0T=0 the space is a single point, there is exactly one pair (x,z)(x,z)(x,z), its weight is 111, and μq\mu_qμq​ is the unit mass on that point.


Env.expLaw (definition, a measure on Traj(S,T)\mathrm{Traj}(S,T)Traj(S,T)). Let SSS be a finite type equipped with an arbitrary σ\sigmaσ-algebra, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S), T∈NT\in\mathbb{N}T∈N and θ∈R\theta\in\mathbb{R}θ∈R an arbitrary real number (not required to lie in [0,1][0,1][0,1]). The measure μθ\mu_\thetaμθ​ is the measure of Env.trajLaw for the constant sequence qt=θq_t=\thetaqt​=θ for all ttt:

μθ  =  ∑(x,z) max⁡(wθ(x,z),0)⋅⨂t=0T−1(δxt⊗δzt⊗Rxt,zt),\mu_\theta\;=\;\sum_{(x,z)}\ \max\bigl(w_\theta(x,z),0\bigr)\cdot\bigotimes_{t=0}^{T-1}\Bigl(\delta_{x_t}\otimes\delta_{z_t}\otimes R_{x_t,z_t}\Bigr),μθ​=(x,z)∑​ max(wθ​(x,z),0)⋅t=0⨂T−1​(δxt​​⊗δzt​​⊗Rxt​,zt​​),

the sum being over all x:{0,…,T−1}→Sx:\{0,\dots,T-1\}\to Sx:{0,…,T−1}→S and z:{0,…,T−1}→{true,false}z:\{0,\dots,T-1\}\to\{\mathsf{true},\mathsf{false}\}z:{0,…,T−1}→{true,false}, with

wθ(x,z)=ρ(x0)⋅∏s=0T−2Pszs(xs,xs+1)⋅∏t=0T−1(θ if zt=true, else 1−θ)w_\theta(x,z)=\rho(x_0)\cdot\prod_{s=0}^{T-2}P_s^{z_s}(x_s,x_{s+1})\cdot\prod_{t=0}^{T-1}\bigl(\theta\text{ if }z_t=\mathsf{true},\ \text{else }1-\theta\bigr)wθ​(x,z)=ρ(x0​)⋅s=0∏T−2​Pszs​​(xs​,xs+1​)⋅t=0∏T−1​(θ if zt​=true, else 1−θ)

(and wθ=1w_\theta=1wθ​=1 when T=0T=0T=0). Here δ\deltaδ denotes a unit point mass, Rx,zR_{x,z}Rx,z​ are the reward probability measures of EEE, and each summand makes the state and Boolean coordinates equal to xxx and zzz and the real coordinates independent with Yt∼Rxt,ztY_t\sim R_{x_t,z_t}Yt​∼Rxt​,zt​​. For θ∈[0,1]\theta\in[0,1]θ∈[0,1] this is the law of the process in which X0∼ρX_0\sim\rhoX0​∼ρ, each ZtZ_tZt​ is independently true\mathsf{true}true with probability θ\thetaθ, Xt+1X_{t+1}Xt+1​ is drawn from row XtX_tXt​ of PtZtP_t^{Z_t}PtZt​​, and Yt∼RXt,ZtY_t\sim R_{X_t,Z_t}Yt​∼RXt​,Zt​​. For θ=1\theta=1θ=1 only sequences zzz that are constantly true\mathsf{true}true have nonzero weight, and for θ=0\theta=0θ=0 only those constantly false\mathsf{false}false. For θ∉[0,1]\theta\notin[0,1]θ∈/[0,1] negative weights are replaced by 000 and μθ\mu_\thetaμθ​ is in general not a probability measure.


Env.J (definition, a real number). Let SSS be a finite type equipped with an arbitrary σ\sigmaσ-algebra, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S), T∈NT\in\mathbb{N}T∈N and θ∈R\theta\in\mathbb{R}θ∈R arbitrary. Let μθ\mu_\thetaμθ​ be the measure of Env.expLaw on length-TTT trajectories ω=(Xt,Zt,Yt)t<T\omega=(X_t,Z_t,Y_t)_{t<T}ω=(Xt​,Zt​,Yt​)t<T​ (for θ∈[0,1]\theta\in[0,1]θ∈[0,1]: X0∼ρX_0\sim\rhoX0​∼ρ, each ZtZ_tZt​ independently true\mathsf{true}true with probability θ\thetaθ, Xt+1X_{t+1}Xt+1​ drawn from row XtX_tXt​ of PtZtP_t^{Z_t}PtZt​​, Yt∼RXt,ZtY_t\sim R_{X_t,Z_t}Yt​∼RXt​,Zt​​; for other θ\thetaθ, the same formula with negative path weights replaced by 000), and let Yt(ω)Y_t(\omega)Yt​(ω) be the real component of ω\omegaω at time ttt. The definition is

J(E,T,θ)  =  1T∑t=0T−1 ∫Yt(ω)  dμθ(ω).J(E,T,\theta)\;=\;\frac1T\sum_{t=0}^{T-1}\ \int Y_t(\omega)\;\mathrm{d}\mu_\theta(\omega).J(E,T,θ)=T1​t=0∑T−1​ ∫Yt​(ω)dμθ​(ω).

Conventions that apply literally: for T=0T=0T=0 the factor 1/T1/T1/T is 1/01/01/0, which equals 000, and the sum is empty, so J(E,0,θ)=0J(E,0,\theta)=0J(E,0,θ)=0. Each integral is a Bochner integral with no integrability hypothesis; it has the value 000 whenever YtY_tYt​ is not integrable with respect to μθ\mu_\thetaμθ​ (no bound or moment condition on the reward measures is assumed in this definition). For θ∉[0,1]\theta\notin[0,1]θ∈/[0,1] the integrals are taken against a measure that need not have total mass 111.


Env.gate (definition, a real number). Let SSS be a finite type equipped with an arbitrary σ\sigmaσ-algebra, E∈Env(S)E\in\mathrm{Env}(S)E∈Env(S) and T∈NT\in\mathbb{N}T∈N. Let μ1\mu_1μ1​ and μ0\mu_0μ0​ be the measures of Env.expLaw for θ=1\theta=1θ=1 and θ=0\theta=0θ=0 on length-TTT trajectories. Explicitly, μ1\mu_1μ1​ is the law of the process with X0∼ρX_0\sim\rhoX0​∼ρ, Zt=trueZ_t=\mathsf{true}Zt​=true for all ttt, Xt+1X_{t+1}Xt+1​ drawn from row XtX_tXt​ of PttrueP_t^{\mathsf{true}}Pttrue​ and Yt∼RXt,trueY_t\sim R_{X_t,\mathsf{true}}Yt​∼RXt​,true​; and μ0\mu_0μ0​ is the same with false\mathsf{false}false in place of true\mathsf{true}true throughout. With Yt(ω)Y_t(\omega)Yt​(ω) the real component of the trajectory ω\omegaω at time ttt, the definition is

gate(E,T)  =  1T∑t=0T−1(∫Yt dμ1  −  ∫Yt dμ0).\mathrm{gate}(E,T)\;=\;\frac1T\sum_{t=0}^{T-1}\Bigl(\int Y_t\,\mathrm{d}\mu_1\;-\;\int Y_t\,\mathrm{d}\mu_0\Bigr).gate(E,T)=T1​t=0∑T−1​(∫Yt​dμ1​−∫Yt​dμ0​).

For T=0T=0T=0 the value is 000 (since 1/0=01/0=01/0=0 and the sum is empty). Each integral is a Bochner integral with value 000 when YtY_tYt​ is not integrable under the respective measure; no integrability is assumed. Distributing the finite sum, this number equals J(E,T,1)−J(E,T,0)J(E,T,1)-J(E,T,0)J(E,T,1)−J(E,T,0) with JJJ as in Env.J.

Human review
  • Endorsed by tianyipeng · Oct 12, 2026

  • Endorsed by Wenqian Xing · Oct 12, 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