Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 1: σd\sigma_dσd​ uniquely minimizes the expected pairwise Gaussian potential

Proved
AlignmentUniformity.uniform_unique_energy_minimizer

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

contrastive-learningenergy-minimizationhypersphererepresentation-learninguniform-distribution

Let d≥0d\ge0d≥0 and t>0t>0t>0, and let M(Sd)\mathcal{M}(S^d)M(Sd) be the set of Borel probability measures on SdS^dSd. Then the uniform distribution σd\sigma_dσd​ is the unique solution of

min⁡μ∈M(Sd)∫Sd∫SdGt(u,v) dμ(v) dμ(u).\min_{\mu\in\mathcal{M}(S^d)}\int_{S^d}\int_{S^d}G_t(u,v)\,d\mu(v)\,d\mu(u).μ∈M(Sd)min​∫Sd​∫Sd​Gt​(u,v)dμ(v)dμ(u).

That is, σd∈M(Sd)\sigma_d\in\mathcal{M}(S^d)σd​∈M(Sd), IGt[σd]≤IGt[μ]I_{G_t}[\sigma_d]\le I_{G_t}[\mu]IGt​​[σd​]≤IGt​​[μ] for every μ∈M(Sd)\mu\in\mathcal{M}(S^d)μ∈M(Sd), and equality forces μ=σd\mu=\sigma_dμ=σd​.

This is why Luniform\mathcal{L}_{\mathsf{uniform}}Luniform​ measures uniformity: among all feature distributions on the sphere, only the uniform one minimizes the expected pairwise Gaussian potential.

Preamble
import Mathlib
import Definitions.Def_AlignmentUniformity_Basic

open MeasureTheory Filter Topology
Formal statement
namespace AlignmentUniformity

theorem uniform_unique_energy_minimizer (d : ℕ) {t : ℝ} (ht : 0 < t) :
    IsSphereProb (sphereUnif (d + 1)) ∧
      ∀ μ : Measure (Vec (d + 1)), IsSphereProb μ →
        energy (gaussKernel t) (sphereUnif (d + 1)) (sphereUnif (d + 1)) ≤
            energy (gaussKernel t) μ μ ∧
          (energy (gaussKernel t) μ μ =
              energy (gaussKernel t) (sphereUnif (d + 1)) (sphereUnif (d + 1)) →
            μ = sphereUnif (d + 1)) := by sorry

end AlignmentUniformity
Source
Wang and Isola, Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere, ICML 2020, arXiv:2005.10242v10, Section 4.1.2, Proposition 1, p. 5; restated in Appendix A.1, Proposition 1, eq. (4), p. 14
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Fix a natural number d≥0d \ge 0d≥0 and a real number ttt with t>0t > 0t>0. Work in Euclidean space Rd+1\mathbb{R}^{d+1}Rd+1 with its usual norm ∥⋅∥\|\cdot\|∥⋅∥ and Borel σ\sigmaσ-algebra, and let Sd={x∈Rd+1:∥x∥=1}S^d = \{x \in \mathbb{R}^{d+1} : \|x\| = 1\}Sd={x∈Rd+1:∥x∥=1} be its unit sphere. The theorem uses the following objects.

  • Uniform measure σd\sigma_dσd​. First take the surface measure on SdS^dSd derived from Lebesgue measure:
A(s)=(d+1)⋅vold+1({ rx:0<r<1, x∈s }),s⊆Sd.A(s) = (d+1)\cdot \mathrm{vol}_{d+1}\big(\{\, r x : 0 < r < 1,\ x \in s \,\}\big), \qquad s \subseteq S^d .A(s)=(d+1)⋅vold+1​({rx:0<r<1, x∈s}),s⊆Sd.

Divide it by its total mass A(Sd)A(S^d)A(Sd). Then push it forward along the inclusion Sd↪Rd+1S^d \hookrightarrow \mathbb{R}^{d+1}Sd↪Rd+1. The result σd\sigma_dσd​ is a measure on Rd+1\mathbb{R}^{d+1}Rd+1. (The inverse A(Sd)−1A(S^d)^{-1}A(Sd)−1 is the extended-real inverse.)

  • Sphere probability measure. A measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1 is a sphere probability measure when two conditions hold: μ\muμ is a probability measure on Rd+1\mathbb{R}^{d+1}Rd+1, and μ(Rd+1∖Sd)=0\mu(\mathbb{R}^{d+1} \setminus S^d) = 0μ(Rd+1∖Sd)=0.
  • Gaussian kernel. For u,v∈Rd+1u, v \in \mathbb{R}^{d+1}u,v∈Rd+1,
Gt(u,v)=e−t∥u−v∥2.G_t(u,v) = e^{-t\|u-v\|^2}.Gt​(u,v)=e−t∥u−v∥2.
  • Energy. For a measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1,
Et(μ)=∫(∫Gt(u,v) dμ(v))dμ(u).E_t(\mu) = \int \left( \int G_t(u,v)\, d\mu(v) \right) d\mu(u).Et​(μ)=∫(∫Gt​(u,v)dμ(v))dμ(u).

This is an iterated integral that follows the convention that an integral of a non-integrable function is assigned the value 000. The integrand always lies in (0,1](0,1](0,1].

The theorem asserts both of the following.

  1. σd\sigma_dσd​ is a sphere probability measure. That is, it is a probability measure on Rd+1\mathbb{R}^{d+1}Rd+1 with no mass off SdS^dSd.
  2. Every measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1 that is a sphere probability measure satisfies both:
Et(σd)≤Et(μ),E_t(\sigma_d) \le E_t(\mu),Et​(σd​)≤Et​(μ),

and

Et(μ)=Et(σd) ⟹ μ=σd.E_t(\mu) = E_t(\sigma_d) \ \Longrightarrow\ \mu = \sigma_d .Et​(μ)=Et​(σd​) ⟹ μ=σd​.

Here μ=σd\mu = \sigma_dμ=σd​ means equality as measures on Rd+1\mathbb{R}^{d+1}Rd+1, i.e. on all measurable sets.

So σd\sigma_dσd​ minimizes EtE_tEt​ among all sphere probability measures, and it is the only measure in that class attaining the minimum value. No strict inequality is stated directly; it follows only through the equality clause.

The statement holds for every t>0t > 0t>0 and every d≥0d \ge 0d≥0, including d=0d = 0d=0. In that case the space is R1\mathbb{R}^1R1, the "sphere" is the two-point set {−1,1}\{-1, 1\}{−1,1}, and the sphere probability measures are exactly the probability measures supported on {−1,1}\{-1, 1\}{−1,1}.

Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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