Kantorovich duality on finite spaces #
On finite source and target spaces the transport problem is a linear program: minimise
∑ i, ∑ j, c (i, j) * A i j over the transportation matrices A with prescribed marginals
μ and ν. Its dual maximises ∑ i, μ i * φ i + ∑ j, ν j * ψ j over the pairs of real
potentials satisfying φ i + ψ j ≤ c (i, j).
This file proves that the two problems have the same value, that both are attained, and that a feasible pair of a plan and a potential pair is simultaneously optimal exactly when the plan is concentrated on the contact set of the potentials.
Unlike the rest of the theory the cost here is an honest real number, negative values included,
because a linear program has no reason to be nonnegative. Consequently the primal value is
measured by TauCeti.TransportMatrix.cost rather than by TauCeti.transportCost, whose
ℝ≥0∞-valued lintegral cannot see cancellation. The two marginal integrals of the dual are
likewise packaged as TauCeti.finiteDualValue, which asks for no measurable structure on the
two finite spaces; TauCeti.finiteDualValue_eq_kantorovichDualValue and
TauCeti.TransportMatrix.cost_eq_integral identify both with the measure-level definitions as
soon as one is available. The feasibility constraint used here is likewise the real form of the
canonical TauCeti.DualFeasible, by TauCeti.dualFeasible_ofReal_iff whenever the cost is
nonnegative.
The hard half of the duality is the minimax theorem: the Lagrangian
∑ q, (c q - φ q.1 - ψ q.2) * f q + (∑ i, μ i * φ i + ∑ j, ν j * ψ j)
is affine in the plan f, which ranges over the compact convex standard simplex, and affine
in the potentials, which range over the whole of (ι → ℝ) × (κ → ℝ). Sion's minimax theorem
exchanges the two extrema. Taking the potentials unbounded is what forces the extended-real
codomain: the inner supremum is ⊤ at a plan whose marginals are wrong.
Main definitions #
TauCeti.finiteDualValue— the value of a pair of potentials against two probability mass functions. The primal value isTauCeti.TransportMatrix.cost, which belongs to the transportation-matrix file.
Main statements #
TauCeti.TransportMatrix.finiteDualValue_le_cost— weak duality;TauCeti.TransportMatrix.exists_forall_cost_leandTauCeti.exists_forall_finiteDualValue_le— primal and dual attainment;TauCeti.exists_cost_eq_finiteDualValue— strong duality, together with both attainments;TauCeti.exists_isLeast_cost_isGreatest_finiteDualValue— the same statement read as an optimal value shared by the two problems;TauCeti.TransportMatrix.cost_eq_finiteDualValue_iff— complementary slackness;TauCeti.TransportMatrix.forall_cost_le_and_forall_finiteDualValue_le_iff— the optimality certificate: a plan and a feasible pair are optimal for their problems exactly when the plan lives on the contact set of the pair, andTauCeti.TransportMatrix.forall_cost_le_and_forall_finiteDualValue_le_iff_mem_contactSet— the same certificate read throughTauCeti.contactSet;TauCeti.TransportMatrix.forall_cost_le_iff_exists_forall_add_le_and_support_subset_contactSet— existential complementary slackness, with finite dual attainment supplying the potentials;TauCeti.finiteDualValue_eq_kantorovichDualValueandTauCeti.TransportMatrix.cost_eq_integral— the bridges to the measure-level dual and primal values.
References #
- C. Villani, Topics in Optimal Transportation, Graduate Studies in Mathematics 58, 2003, §1.1.2, for the finite duality and complementary slackness.
- M. Sion, On general minimax theorems, Pacific J. Math. 8 (1958), 171--176.
Mathlib.Topology.Sion, formalized by Antoine Chambert-Loir and Anatole Dedecker.
This is Layer 2, item 3 of the optimal-transport roadmap.
Shifting the two potentials by two constants shifts the dual value by their sum: both marginals have total mass one.
The dual value is unchanged by the opposite additive shifts of the two potentials, which is the normalisation freedom of the dual problem: both marginals have total mass one.
The standard-simplex picture #
Convexity and compactness arguments are run on real-valued plans, which form a closed subset of the standard simplex on the product.
The algebraic core #
The difference between the cost of a plan and the value of a pair of potentials is the total
mass the plan puts on the pointwise gap c (i, j) - φ i - ψ j.
The cost of a plan exceeds the value of a pair of potentials by the mass the plan puts on the pointwise gap.
Weak duality on finite spaces: every dual-feasible pair of potentials is worth at most the cost of every transport plan.
Complementary slackness: a transport plan and a dual-feasible pair of potentials have the same value exactly when the plan is concentrated on the contact set of the potentials.
Primal attainment #
Primal attainment: on finite spaces the transport problem has a minimiser.
Dual attainment #
The dual problem is invariant under the opposite shifts of the two potentials, so its
supremum is unchanged by restricting to potentials normalised at a base point. Two infimal
c-transforms turn an arbitrary feasible pair into a normalised one with at least the same
value, and normalised pairs are confined to a box.
Strong duality #
The Lagrangian of the transport problem is affine and continuous in the plan, which ranges over
the compact convex standard simplex, and affine and continuous in the potentials, which range
over the whole of (ι → ℝ) × (κ → ℝ). Sion's minimax theorem exchanges the two extrema. The
inner supremum is ⊤ at a plan with the wrong marginals, whence the extended-real codomain.
Kantorovich duality on finite spaces: the transport problem and its dual have the same value, and both are attained.
The common optimal value of the two problems: the transport problem attains its infimum and the dual problem attains its supremum, at the same real number.
The optimality certificate. A transport plan and a dual-feasible pair of potentials are optimal for their respective problems exactly when the plan is concentrated on the contact set of the pair.
The optimality certificate, through the contact set. The pointwise equality of
TauCeti.TransportMatrix.forall_cost_le_and_forall_finiteDualValue_le_iff says exactly that
every pair carrying mass lies in TauCeti.contactSet of the coerced potentials.
Containment of the support of a transportation matrix in the contact set of real-valued potentials is the pointwise complementary-slackness condition on every nonzero entry.
Existential complementary slackness for a finite transport plan. A transportation matrix minimizes a real cost exactly when there is a dual-feasible pair of potentials whose contact set contains the support of the matrix. Finite Kantorovich duality supplies the potentials, so they need not be selected in advance.
The measure-level reading #
Neither the primal nor the dual value needs a measurable structure on the two finite spaces. When one is available, both agree with the measure-level definitions of the rest of the theory.
The dual value of a pair of potentials against two probability mass functions is the Kantorovich dual value against the measures they define.
The cost of a finite transportation matrix is the integral of the cost function against the probability measure the matrix defines.