Lemma B.1: TVD of joint distributions
ProvedWhenToTrustYourModel.tvd_joint_boundLet and be finite sets, let be distributions on , and for every let and be distributions on . Form the joint distributions . Then
and, more tightly,
This is the step that turns a policy divergence plus a model error into a divergence of the joint state-action-next-state distribution in all later bounds.
import Mathlib import Definitions.Def_WhenToTrustYourModel_Basic open Finset
namespace WhenToTrustYourModel
theorem tvd_joint_bound {X Y : Type*} [Fintype X] [Fintype Y]
(p₁ p₂ : X → ℝ) (hp₁ : IsDist p₁) (hp₂ : IsDist p₂)
(q₁ q₂ : X → Y → ℝ) (hq₁ : ∀ x, IsDist (q₁ x)) (hq₂ : ∀ x, IsDist (q₂ x)) :
tvDist (jointDist p₁ q₁) (jointDist p₂ q₂) ≤ tvDist p₁ p₂ + (⨆ x, tvDist (q₁ x) (q₂ x)) ∧
tvDist (jointDist p₁ q₁) (jointDist p₂ q₂) ≤
tvDist p₁ p₂ + ∑ x, p₁ x * tvDist (q₁ x) (q₂ x) := by sorry
end WhenToTrustYourModelRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and be arbitrary finite types. Call a real-valued function on a finite set a distribution if for every and . For two real functions on the same finite set, the total variation distance is
Given a function on and a two-argument function on , the joint function on is
The theorem assumes the following:
- are both distributions on .
- are such that, for every fixed , the functions and are each distributions on .
These hypotheses force to be nonempty, since an empty sum cannot equal . Because is nonempty, there is some with a distribution, so is also nonempty.
Under these assumptions the theorem asserts that both of the following inequalities hold:
In the first inequality, is finite and nonempty, so the supremum is a maximum over .
In the second inequality, the conditional distances are weighted by the first marginal only. Nothing is weighted by , and no symmetrized weighting is used.
All distances and the supremum are real numbers. Both bounds are non-strict ().
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.