Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§4.2, proof of Theorem 4.2, pp. 441–442 — d_H(v, v′) = d_H(v/v′, 𝟙) = d_H(𝟙/v, 𝟙/v′) and d_H(c⊙v, c⊙v′) = d_H(v, v′)

Proved
CompOT.Sinkhorn.thm_4_2_proof_invariance

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

hilbert-projective-metricoptimal-transportp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1

Let m≥1m \ge 1m≥1 and let v,v′∈Rmv, v' \in \mathbb{R}^mv,v′∈Rm have positive entries. Then

dH(v,v′)=dH(v/v′,1m)=dH(1m/v,1m/v′),d_{\mathcal H}(v,v') = d_{\mathcal H}(v/v', \mathbb{1}_m) = d_{\mathcal H}(\mathbb{1}_m/v, \mathbb{1}_m/v'),dH​(v,v′)=dH​(v/v′,1m​)=dH​(1m​/v,1m​/v′),

and for every c∈Rmc \in \mathbb{R}^mc∈Rm with positive entries,

dH(c⊙v,c⊙v′)=dH(v,v′),d_{\mathcal H}(c \odot v, c \odot v') = d_{\mathcal H}(v, v'),dH​(c⊙v,c⊙v′)=dH​(v,v′),

where products and quotients of vectors are entrywise.

These invariances of Hilbert's projective metric under entrywise division, inversion and positive diagonal scaling are what reduce one Sinkhorn update u↦a/(Kv)u \mapsto a/(Kv)u↦a/(Kv) to an application of the matrix KKK.

Formalization Note The first display is the opening of the proof (p. 441). The diagonal scaling invariance is not displayed on its own in the book; it is the step used in the first equality dH(a/(Kv(ℓ)),a/(Kv⋆))=dH(Kv(ℓ),Kv⋆)d_{\mathcal H}(a/(Kv^{(\ell)}), a/(Kv^\star)) = d_{\mathcal H}(Kv^{(\ell)}, Kv^\star)dH​(a/(Kv(ℓ)),a/(Kv⋆))=dH​(Kv(ℓ),Kv⋆) of the next display (p. 442), and it is cited to that display.

Preamble
import Mathlib
import Definitions.Def_CompOT_Sinkhorn_Defs
Formal statement
namespace CompOT.Sinkhorn

/-- Proof of Theorem 4.2, p. 441 (first display) and p. 442 (first equality of the first
display): for positive `v, v'`,
`d_H(v, v') = d_H(v/v', 𝟙_m) = d_H(𝟙_m/v, 𝟙_m/v')`, and `d_H` is invariant under
entrywise multiplication of both arguments by a positive vector `c`. -/
theorem thm_4_2_proof_invariance {m : ℕ} (hm : 0 < m) (v v' : Fin m → ℝ)
    (hv : ∀ j, 0 < v j) (hv' : ∀ j, 0 < v' j) :
    hilbertMetric v v' = hilbertMetric (v / v') 1 ∧
    hilbertMetric v v' = hilbertMetric (1 / v) (1 / v') ∧
    ∀ c : Fin m → ℝ, (∀ j, 0 < c j) → hilbertMetric (c * v) (c * v') = hilbertMetric v v' := by sorry

end CompOT.Sinkhorn
Source
Peyré & Cuturi, Computational Optimal Transport (FnT ML 2019), §4.2, Remark 4.14, proof of Theorem 4.2, first display, p. 441, and first equality of the first display on p. 442
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