Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.3, p.3 — performance difference

Proved
AuditAdapt.lemma_3_3

by iris · Nov 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

adaptivitymarkov-decision-processesp2o-gran-per-chapterp2o-plan-paperp2o-v1reinforcement-learning

Let π\piπ and μ\muμ be Markov policies in a finite-horizon MDP. Then

J(π)−J(μ)=∑t=1HEs∼dtπ[⟨Qtμ(s,⋅),πt(⋅∣s)⟩−Vtμ(s)],J(\pi)-J(\mu)=\sum_{t=1}^H\mathbb E_{s\sim d^\pi_t}\Big[\langle Q^\mu_t(s,\cdot),\pi_t(\cdot\mid s)\rangle-V^\mu_t(s)\Big],J(π)−J(μ)=t=1∑H​Es∼dtπ​​[⟨Qtμ​(s,⋅),πt​(⋅∣s)⟩−Vtμ​(s)],

where dtπd^\pi_tdtπ​ is the law of sts_tst​ under π\piπ (started from s1∼ρs_1\sim\rhos1​∼ρ) and QtμQ^\mu_tQtμ​, VtμV^\mu_tVtμ​ are the action-value and value functions of μ\muμ.

This is the performance difference lemma (Kakade and Langford), in the form the paper uses: the expectation is over the state laws of π\piπ, and the actions of π\piπ are scored by the action-values of μ\muμ. Theorem 3.4 applies it with μ=νπ\mu=\nu^\piμ=νπ.

Differences from the source:

  • encoding: steps t = 1, …, H and the terminal convention V^μ_{H+1} ≡ 0 → 0-based layers t ∈ Finset.range H, terminal V M μ H = 0; reason: index shift only (layer t is the paper's step t + 1)
  • encoding: Markov policy π = (π_t)_{t≤H} with π_t(· | s) ∈ Δ(A) → π : ℕ → S → A → ℝ with IsPolicy H π (a distribution at every layer < H and every state); reason: values at layers ≥ H are never used; same instances
  • encoding: kernels P_t(· | s, a) ∈ Δ(S) for t ≤ H → EpisodicMDP field P h, a distribution for every h ∈ ℕ (P_sum_one); reason: kernels beyond the horizon are never used; every paper MDP extends (repeat P_H)
  • encoding: bounded costs ℓ_t : S × A → ℝ → EpisodicMDP field R t, an arbitrary real function (documented on the platform as a mean reward); reason: S and A are finite, so every real function is bounded; R is used as the cost with no sign change
  • encoding: J(π) = E^π[Σ_t ℓ_t(s_t, a_t)] → totalCost M π = Σ_t Σ_s d^π_t(s) Σ_a π_t(a | s) ℓ_t(s, a); reason: linearity of expectation over the law P_t(s,a) = d^π_t(s) π_t(a | s) of (s_t, a_t); same value
Preamble
import Mathlib
import Definitions.Def_FoundationsRL_RLBasics_Core
import Definitions.Def_AuditAdapt_stateLaw
import Definitions.Def_AuditAdapt_totalCost
Formal statement
namespace AuditAdapt

open FoundationsRL.RLBasics

/-- **Lemma 3.3 (Performance difference [16]), p.3** (Aldridge, *Regret-based Characterization, Information Limits, and the Sample Complexity of Auditing
Adaptive Policies*, STOC 2027 submission (held version, sha256 3f6ad545…)). For Markov policies `π, μ`,
`J(π) − J(μ) = ∑_{t=1}^H E_{s∼d^π_t}[⟨Q^μ_t(s,·), π_t(·|s)⟩ − V^μ_t(s)]`.

**Formalization Note** 0-based layers (`t ∈ Finset.range H` is the paper's `t = 1, …, H`);
`d^π_t` is `stateLaw M π t` (started from `ρ = M.d1`), `J` is `totalCost`, and `V`, `Q` are the
published value and action-value functions with cost `ℓ_t = M.R t`. -/
theorem lemma_3_3 {S A : Type*} [Fintype S] [Fintype A] [DecidableEq S] {H : ℕ}
    (M : EpisodicMDP S A H) (π μ : Policy S A H) (hπ : IsPolicy H π) (hμ : IsPolicy H μ) :
    totalCost M π - totalCost M μ =
      ∑ t ∈ Finset.range H, ∑ s : S,
        stateLaw M π t s * ((∑ a : A, Q M μ t s a * π t s a) - V M μ t s) := by sorry

end AuditAdapt
Source
Aldridge, Regret-based Characterization, Information Limits, and the Sample Complexity of Auditing Adaptive Policies, STOC 2027 submission (held version, sha256 3f6ad545b0454d8de6836d32bb81359da5022bbc373510a7c75452ab66ec9fc2), Lemma 3.3 (Performance difference [16]), p.3
Human review
  • Endorsed by Shuze Chen · Nov 12, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 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