Theorem 3.A.4 — Strassen's martingale-coupling characterization of the convex order (corrected: finite means, random variables)
ProvedStochasticOrders.Convex.convex_order_martingale_coupling_iff_v2Let on and on be random variables with finite means (measurable and integrable, the standing assumption of §3.A). Then
i.e. a.s. Furthermore, and can be selected such that is increasing in in the usual stochastic order . This is Strassen's martingale-coupling characterization of the convex order (the mean-preserving spread of Rothschild–Stiglitz): holds exactly when a copy of each can be built on a common probability space so that the copy of is, conditionally on the copy of , a fair randomization of it whose conditional law grows in with the conditioning value. The reverse direction is Jensen's inequality; the book calls the constructive direction "not easy to prove".
Formalization Note. The retired version assumed no integrability: Mathlib's conditional expectation of a non-integrable is the junk value , so for on the order held reflexively while the martingale clause forced a.s., and the forward direction was refuted. The new statement makes the standing finite-mean assumption explicit (Integrable X μ, Integrable Y ν), so is integrable and is the honest conditional expectation; it also requires , , , to be measurable (random variables) — Measurable X̂ is moreover what makes a sub-σ-algebra of the ambient one, without which Mathlib's ρ[Ŷ | σ(X̂)] is again (condExp_of_not_le). The martingale condition is Mathlib's ρ[Ŷ | MeasurableSpace.comap X̂ _] =ᵐ[ρ] X̂. The book's " is increasing in in " is a property of a version of the conditional distribution, which is defined only up to null sets; it is formalized as the existence of a Markov kernel disintegrating the joint law, (ρ.map (X̂, Ŷ) = ρ.map X̂ ⊗ₘ κ), whose survival functions are monotone in at every threshold — the usual stochastic order between the measures and . The retired version demanded this of Mathlib's specific condDistrib at every real , including points outside the support of where that version is construction-dependent (a Lean artefact, not the book's claim). The convex order is the imported ConvexOrder (test functions convex with both , integrable), which for integrable , is equivalent to the book's "whenever the expectations exist". Conventions made explicit: random variables are measurable functions on probability spaces (the book's standing convention, stated as Measurable hypotheses and IsProbabilityMeasure instances); "" is ProbabilityTheory.IdentDistrib; the common space is existentially quantified, and the coupled copies are themselves random variables. No correction to the printed source.
import Mathlib import Definitions.Def_StochasticOrders_Convex_ConvexOrder
namespace StochasticOrders.Convex
open MeasureTheory ProbabilityTheory
/-- Theorem 3.A.4 (Shaked & Shanthikumar, *Stochastic Orders*, Springer 2007, p. 112): for random
variables `X`, `Y` with finite means, `X ≤cx Y` if, and only if, there exist two random variables
`X̂` and `Ŷ`, defined on the same probability space, such that `X̂ =st X`, `Ŷ =st Y`, and
`{X̂, Ŷ}` is a martingale, that is, `E[Ŷ | X̂] = X̂` a.s. Furthermore (folded into the same
witness, as the book states it as a strengthening of the same construction), `X̂` and `Ŷ` can be
selected such that `[Ŷ | X̂ = x]` is increasing in `x` in the usual stochastic order `≤st`.
Corrected version (`_v2`) of `convex_order_martingale_coupling_iff`: (1) the standing finite-mean
assumption of §3.A is explicit (`Integrable X μ`, `Integrable Y ν`); without it `ρ[Ŷ | ·]` of a
non-integrable `Ŷ` is Mathlib's junk `0` and the forward direction failed. (2) `X`, `Y`, `X̂`, `Ŷ`
are random variables (`Measurable`); `Measurable X̂` is also what makes `comap X̂ ≤ m` and hence
the conditional expectation meaningful (`condExp_of_not_le`). (3) "`[Ŷ | X̂ = x]` increasing in
`x`" is a property of a *version* of the conditional distribution: it is stated as the existence
of a Markov kernel `κ` disintegrating the joint law (`ρ.map (X̂, Ŷ) = ρ.map X̂ ⊗ₘ κ`) whose
survival functions `t ↦ κ x {t < y}` are monotone in `x`, instead of a condition at every real
`x` on Mathlib's specific `condDistrib` version, whose values off the support of `X̂` are
construction-dependent. -/
theorem convex_order_martingale_coupling_iff_v2 {Ω Ω' : Type*} [MeasurableSpace Ω]
[MeasurableSpace Ω'] (μ : Measure Ω) (ν : Measure Ω') [IsProbabilityMeasure μ]
[IsProbabilityMeasure ν] (X : Ω → ℝ) (Y : Ω' → ℝ) (hX : Measurable X) (hY : Measurable Y)
(hXint : Integrable X μ) (hYint : Integrable Y ν) :
ConvexOrder μ ν X Y ↔
∃ (Ω'' : Type) (_ : MeasurableSpace Ω'') (ρ : Measure Ω'') (_ : IsProbabilityMeasure ρ)
(Xhat Yhat : Ω'' → ℝ),
Measurable Xhat ∧ Measurable Yhat ∧
IdentDistrib Xhat X ρ μ ∧ IdentDistrib Yhat Y ρ ν ∧
ρ[Yhat | MeasurableSpace.comap Xhat inferInstance] =ᵐ[ρ] Xhat ∧
∃ κ : Kernel ℝ ℝ, IsMarkovKernel κ ∧
ρ.map (fun ω => (Xhat ω, Yhat ω)) = (ρ.map Xhat) ⊗ₘ κ ∧
∀ x₁ x₂ : ℝ, x₁ ≤ x₂ → ∀ t : ℝ, κ x₁ {y : ℝ | t < y} ≤ κ x₂ {y : ℝ | t < y} := by sorry
end StochasticOrders.Convex
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.