Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 1 — strong duality I=JI=JI=J, a dual optimizer (λ∗,φλ∗)(\lambda^*,\varphi_{\lambda^*})(λ∗,φλ∗​) and complementary slackness

Open
ModelRiskOT.Duality.theorem_1

by mikedeng1 · Oct 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

distributionally-robust-optimizationdualityoptimal-transportp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let SSS be a Polish space, μ\muμ a Borel probability measure on SSS, c:S×S→[0,∞)c : S\times S\to[0,\infty)c:S×S→[0,∞) a lower semicontinuous cost with c(x,y)=0c(x,y)=0c(x,y)=0 if and only if x=yx=yx=y (Assumption (A1)), f:S→Rf : S\to\mathbb Rf:S→R upper semicontinuous and μ\muμ-integrable (Assumption (A2)), and δ>0\delta>0δ>0. Let I=sup⁡{∫f(y) dπ(x,y):π∈Φμ,δ}I=\sup\{\int f(y)\,d\pi(x,y):\pi\in\Phi_{\mu,\delta}\}I=sup{∫f(y)dπ(x,y):π∈Φμ,δ​} be the worst-case expectation of fff over transport plans out of μ\muμ with cost at most δ\deltaδ, and J=inf⁡{λδ+∫φ dμ:(λ,φ)∈Λc,f}J=\inf\{\lambda\delta+\int\varphi\,d\mu:(\lambda,\varphi)\in\Lambda_{c,f}\}J=inf{λδ+∫φdμ:(λ,φ)∈Λc,f​} its dual. For λ≥0\lambda\ge0λ≥0 let φλ(x)=sup⁡y∈S{f(y)−λc(x,y)}\varphi_\lambda(x)=\sup_{y\in S}\{f(y)-\lambda c(x,y)\}φλ​(x)=supy∈S​{f(y)−λc(x,y)}. Then:

  1. (a) Strong duality.
sup⁡{I(π):π∈Φμ,δ}=inf⁡{J(λ,φ):(λ,φ)∈Λc,f}.\sup\{I(\pi):\pi\in\Phi_{\mu,\delta}\}=\inf\{J(\lambda,\varphi):(\lambda,\varphi)\in\Lambda_{c,f}\}.sup{I(π):π∈Φμ,δ​}=inf{J(λ,φ):(λ,φ)∈Λc,f​}.
  1. (b) Dual attainment. There is λ≥0\lambda\ge0λ≥0 such that (λ,φλ)∈Λc,f(\lambda,\varphi_\lambda)\in\Lambda_{c,f}(λ,φλ​)∈Λc,f​ and J(λ,φλ)=JJ(\lambda,\varphi_\lambda)=JJ(λ,φλ​)=J.
  2. (b) Complementary slackness, "if". For π∗∈Φμ,δ\pi^*\in\Phi_{\mu,\delta}π∗∈Φμ,δ​ and (λ∗,φλ∗)∈Λc,f(\lambda^*,\varphi_{\lambda^*})\in\Lambda_{c,f}(λ∗,φλ∗​)∈Λc,f​, if
f(y)−λ∗c(x,y)=sup⁡z∈S{f(z)−λ∗c(x,z)}  π∗-a.s.(8a)andλ∗(∫c dπ∗−δ)=0(8b),f(y)-\lambda^*c(x,y)=\sup_{z\in S}\{f(z)-\lambda^*c(x,z)\}\ \ \pi^*\text{-a.s.}\quad(8a)\qquad\text{and}\qquad \lambda^*\Big(\int c\,d\pi^*-\delta\Big)=0\quad(8b),f(y)−λ∗c(x,y)=z∈Ssup​{f(z)−λ∗c(x,z)}  π∗-a.s.(8a)andλ∗(∫cdπ∗−δ)=0(8b),

then π∗\pi^*π∗ is a primal optimizer (I(π∗)=II(\pi^*)=II(π∗)=I), (λ∗,φλ∗)(\lambda^*,\varphi_{\lambda^*})(λ∗,φλ∗​) is a dual optimizer (J(λ∗,φλ∗)=JJ(\lambda^*,\varphi_{\lambda^*})=JJ(λ∗,φλ∗​)=J), and I(π∗)=J(λ∗,φλ∗)I(\pi^*)=J(\lambda^*,\varphi_{\lambda^*})I(π∗)=J(λ∗,φλ∗​). 4. (b) Complementary slackness, "only if". Conversely, if π∗\pi^*π∗ and (λ∗,φλ∗)(\lambda^*,\varphi_{\lambda^*})(λ∗,φλ∗​) are as in 3., are primal and dual optimizers with I(π∗)=J(λ∗,φλ∗)I(\pi^*)=J(\lambda^*,\varphi_{\lambda^*})I(π∗)=J(λ∗,φλ∗​), and J(λ∗,φλ∗)<∞J(\lambda^*,\varphi_{\lambda^*})<\inftyJ(λ∗,φλ∗​)<∞, then (8a) and (8b) hold.

Theorem 1 says that the worst-case expectation over an optimal-transport ball on a general Polish space, with only lower semicontinuous costs and upper semicontinuous integrable fff, equals a one-dimensional dual problem over λ\lambdaλ, and it characterizes worst-case transport plans.

Formalization Note The finiteness hypothesis J(λ∗,φλ∗)<∞J(\lambda^*,\varphi_{\lambda^*})<\inftyJ(λ∗,φλ∗​)<∞ in item 4 is implicit in the paper: when fff outgrows ccc on a set of positive μ\muμ-measure, φλ≡∞\varphi_{\lambda}\equiv\inftyφλ​≡∞ there, I=J=∞I=J=\inftyI=J=∞, and an optimal π∗\pi^*π∗ with I(π∗)=∞I(\pi^*)=\inftyI(π∗)=∞ can exist while (8a) is impossible (f(y)−λ∗c(x,y)f(y)-\lambda^*c(x,y)f(y)−λ∗c(x,y) is finite). The direction "if" holds without it. By weak duality, "primal and dual optimizers satisfying I(π∗)=J(λ∗,φλ∗)I(\pi^*)=J(\lambda^*,\varphi_{\lambda^*})I(π∗)=J(λ∗,φλ∗​)" is equivalent to I(π∗)=J(λ∗,φλ∗)I(\pi^*)=J(\lambda^*,\varphi_{\lambda^*})I(π∗)=J(λ∗,φλ∗​) alone; the statement spells out all three equalities. In (8b) the cost integral is converted to a real number, which is safe because it is at most δ\deltaδ. The space SSS is a Polish space with its Borel σ-algebra; the cost ccc is real-valued and written curried, c x y=c(x,y)c\,x\,y = c(x,y)cxy=c(x,y); (A1) is the structure AssumptionA1; (A2) is the pair of hypotheses UpperSemicontinuous f and Integrable f μ. Values that can be infinite (III, JJJ, I(π)I(\pi)I(π), J(λ,φ)J(\lambda,\varphi)J(λ,φ), φλ\varphi_\lambdaφλ​) live in EReal; an integral of an extended-real function is ∫φ+−∫φ−\int\varphi^+ - \int\varphi^-∫φ+−∫φ− with lower Lebesgue integrals, and ∞−∞\infty-\infty∞−∞ evaluates to −∞-\infty−∞, so a coupling with ∫f− dπ=∞\int f^-\,d\pi=\infty∫f−dπ=∞ never raises the primal supremum (the paper's footnote 2 reading).

Preamble
import Mathlib
import Definitions.Def_ModelRiskOT_Duality_AssumptionA1
import Definitions.Def_ModelRiskOT_Duality_primalValue
import Definitions.Def_ModelRiskOT_Duality_dualValue
import Definitions.Def_ModelRiskOT_Duality_phiLam

open MeasureTheory
Formal statement
namespace ModelRiskOT.Duality

/-- **Theorem 1** (Blanchet & Murthy, arXiv:1604.01446v2, p. 7). Under (A1) and (A2), with `δ > 0`:

1. (a) strong duality `I = J`;
2. (b) a dual optimizer of the form `(λ, φ_λ)`, `λ ≥ 0`, exists;
3. (b, "if") for `π* ∈ Φ_{μ,δ}` and `(λ*, φ_{λ*}) ∈ Λ_{c,f}`, the complementary slackness
   conditions (8a) `f(y) − λ* c(x, y) = sup_z {f(z) − λ* c(x, z)}` `π*`-a.s. and
   (8b) `λ* (∫ c dπ* − δ) = 0` imply that `π*` and `(λ*, φ_{λ*})` are primal and dual optimizers
   with `I(π*) = J(λ*, φ_{λ*})`;
4. (b, "only if") conversely, if `π*` and `(λ*, φ_{λ*})` are primal and dual optimizers with
   `I(π*) = J(λ*, φ_{λ*})` **and `J(λ*, φ_{λ*}) < ∞`** (a hypothesis the page leaves implicit:
   without it the "only if" fails when `I = J = ∞`), then (8a) and (8b) hold. -/
theorem theorem_1 {S : Type*} [TopologicalSpace S] [PolishSpace S] [MeasurableSpace S] [BorelSpace S]
    (μ : Measure S) [IsProbabilityMeasure μ] (c : S → S → ℝ) (hc : AssumptionA1 c)
    (f : S → ℝ) (hf_usc : UpperSemicontinuous f) (hf_int : Integrable f μ)
    (δ : ℝ) (hδ : 0 < δ) :
    primalValue c f μ δ = dualValue c f μ δ ∧
    (∃ lam : ℝ, 0 ≤ lam ∧ (lam, phiLam c f lam) ∈ dualFeasible c f Set.univ ∧
      dualObj μ δ lam (phiLam c f lam) = dualValue c f μ δ) ∧
    (∀ π ∈ primalFeasible c μ δ, ∀ lam : ℝ, (lam, phiLam c f lam) ∈ dualFeasible c f Set.univ →
      ((∀ᵐ p ∂π, ((f p.2 - lam * c p.1 p.2 : ℝ) : EReal) = phiLam c f lam p.1) ∧
        lam * ((∫⁻ p, ENNReal.ofReal (c p.1 p.2) ∂π).toReal - δ) = 0) →
      (primalObj f π = primalValue c f μ δ ∧
        dualObj μ δ lam (phiLam c f lam) = dualValue c f μ δ ∧
        primalObj f π = dualObj μ δ lam (phiLam c f lam))) ∧
    (∀ π ∈ primalFeasible c μ δ, ∀ lam : ℝ, (lam, phiLam c f lam) ∈ dualFeasible c f Set.univ →
      dualObj μ δ lam (phiLam c f lam) ≠ ⊤ →
      (primalObj f π = primalValue c f μ δ ∧
        dualObj μ δ lam (phiLam c f lam) = dualValue c f μ δ ∧
        primalObj f π = dualObj μ δ lam (phiLam c f lam)) →
      ((∀ᵐ p ∂π, ((f p.2 - lam * c p.1 p.2 : ℝ) : EReal) = phiLam c f lam p.1) ∧
        lam * ((∫⁻ p, ENNReal.ofReal (c p.1 p.2) ∂π).toReal - δ) = 0)) := by sorry

end ModelRiskOT.Duality
Source
Blanchet & Murthy, Quantifying Distributional Model Risk via Optimal Transport, arXiv:1604.01446v2, p. 7, Theorem 1 (a), (b), Eqs. (8a)–(8b)

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me