Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(9.22), p. 530 — matrix KL conjugate

Proved
CompOT.Barycenter.kl_matrix_conjugate

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

convex-conjugateoptimal-transportp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1relative-entropy

Let KKK be a finite matrix with strictly positive entries, and let UUU be any real matrix of the same shape. For nonnegative matrices PPP, define KL(P∣K)\mathrm{KL}(P\mid K)KL(P∣K) by summing the scalar generalized KL terms. Its convex conjugate is

max⁡P≥0{⟨U,P⟩−KL(P∣K)}=∑i,jKij(eUij−1).\max_{P\ge0}\{\langle U,P\rangle-\mathrm{KL}(P\mid K)\}=\sum_{i,j}K_{ij}(e^{U_{ij}}-1).P≥0max​{⟨U,P⟩−KL(P∣K)}=i,j∑​Kij​(eUij​−1).

The maximizing matrix has entries Pij=KijeUijP_{ij}=K_{ij}e^{U_{ij}}Pij​=Kij​eUij​.

This is the separable transformation that turns the KL projection problem into the exponential dual objective.

Formalization Note The theorem states both the universal upper bound and attainment, so its use of “max” is literal even when an index type is empty.

Preamble
import Mathlib
import Definitions.Def_CompOT_Barycenter_Defs
Formal statement
namespace CompOT.Barycenter

/-- The separable matrix KL conjugate (9.22), p. 530. -/
theorem kl_matrix_conjugate {n m : ℕ}
    (hn : 0 < n) (hm : 0 < m)
    (U K : Matrix (Fin n) (Fin m) ℝ) (hK : ∀ i j, 0 < K i j) :
    (∀ P : Matrix (Fin n) (Fin m) ℝ, (∀ i j, 0 ≤ P i j) →
      (∑ i, ∑ j, U i j * P i j) - klMatrix P K ≤
        ∑ i, ∑ j, K i j * (Real.exp (U i j) - 1)) ∧
    (∑ i, ∑ j, U i j * (K i j * Real.exp (U i j))) -
      klMatrix (fun i j => K i j * Real.exp (U i j)) K =
        ∑ i, ∑ j, K i j * (Real.exp (U i j) - 1) := by sorry

end CompOT.Barycenter
Source
Peyré & Cuturi, Computational Optimal Transport (FnT ML 2019), (9.22), proof of Proposition 9.1, p. 530
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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