Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 3: range of the expected pairwise Gaussian potential

Proved
AlignmentUniformity.gaussian_potential_range

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. Over the Borel probability measures μ\muμ on SdS^dSd, the expected pairwise Gaussian potential

IGt[μ]=∫Sd∫SdGt(u,v) dμ(v) dμ(u)I_{G_t}[\mu]=\int_{S^d}\int_{S^d}G_t(u,v)\,d\mu(v)\,d\mu(u)IGt​​[μ]=∫Sd​∫Sd​Gt​(u,v)dμ(v)dμ(u)

has range exactly [e−2t 0F1(;d+12;t2), 1]\big[e^{-2t}\,{}_0F_1(;\tfrac{d+1}{2};t^2),\,1\big][e−2t0​F1​(;2d+1​;t2),1]. Moreover:

  1. The minimum e−2t0F1(;d+12;t2)e^{-2t}{}_0F_1(;\frac{d+1}{2};t^2)e−2t0​F1​(;2d+1​;t2) is attained if and only if μ=σd\mu=\sigma_dμ=σd​.
  2. As a function of ddd, the minimum strictly decreases and converges to e−2te^{-2t}e−2t as d→∞d\to\inftyd→∞.
  3. The maximum 111 is attained if and only if μ=δu\mu=\delta_uμ=δu​ for some u∈Sdu\in S^du∈Sd.

Here 0F1(;α;z)=∑n≥0zn/((α)nn!){}_0F_1(;\alpha;z)=\sum_{n\ge0}z^n/((\alpha)_nn!)0​F1​(;α;z)=∑n≥0​zn/((α)n​n!).

The proposition gives the optimal value of the uniformity loss in closed form.

Preamble
import Mathlib
import Definitions.Def_AlignmentUniformity_Basic

open MeasureTheory Filter Topology
Formal statement
namespace AlignmentUniformity

theorem gaussian_potential_range (d : ℕ) {t : ℝ} (ht : 0 < t) :
    {I : ℝ | ∃ μ : Measure (Vec (d + 1)), IsSphereProb μ ∧ energy (gaussKernel t) μ μ = I} =
        Set.Icc (Real.exp (-2 * t) * hyp0F1 (((d : ℝ) + 1) / 2) (t ^ 2)) 1 ∧
      (∀ μ : Measure (Vec (d + 1)), IsSphereProb μ →
        (energy (gaussKernel t) μ μ = Real.exp (-2 * t) * hyp0F1 (((d : ℝ) + 1) / 2) (t ^ 2) ↔
          μ = sphereUnif (d + 1))) ∧
      StrictAnti (fun d' : ℕ => Real.exp (-2 * t) * hyp0F1 (((d' : ℝ) + 1) / 2) (t ^ 2)) ∧
      Tendsto (fun d' : ℕ => Real.exp (-2 * t) * hyp0F1 (((d' : ℝ) + 1) / 2) (t ^ 2)) atTop
        (𝓝 (Real.exp (-2 * t))) ∧
      (∀ μ : Measure (Vec (d + 1)), IsSphereProb μ →
        (energy (gaussKernel t) μ μ = 1 ↔
          ∃ u ∈ Metric.sphere (0 : Vec (d + 1)) 1, μ = Measure.dirac u)) := by sorry

end AlignmentUniformity
Source
Wang and Isola, Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere, ICML 2020, arXiv:2005.10242v10, Appendix A.1.1, Proposition 3, eq. (5), pp. 15-17
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 Rd+1\mathbb{R}^{d+1}Rd+1 with the Euclidean norm ∥⋅∥\|\cdot\|∥⋅∥, and write

Sd={x∈Rd+1:∥x∥=1}S^d = \{x \in \mathbb{R}^{d+1} : \|x\| = 1\}Sd={x∈Rd+1:∥x∥=1}

for the unit sphere centred at the origin. When d=0d = 0d=0 this is the two-point set {−1,1}⊂R\{-1, 1\} \subset \mathbb{R}{−1,1}⊂R.

Notation used in the statement.

  • Sphere probability measures. A sphere probability measure is a Borel probability measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1 that gives mass 000 to the complement Rd+1∖Sd\mathbb{R}^{d+1} \setminus S^dRd+1∖Sd.
  • Gaussian kernel. Gt(u,v)=e−t∥u−v∥2G_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, the Gaussian energy is the iterated integral
Et(μ)=∫(∫e−t∥u−v∥2 dμ(v))dμ(u).E_t(\mu) = \int \left( \int e^{-t\|u-v\|^2} \, d\mu(v) \right) d\mu(u).Et​(μ)=∫(∫e−t∥u−v∥2dμ(v))dμ(u).

The integrals are Bochner integrals, with the convention that a non-integrable integrand is assigned the value 000. For a probability measure the integrand lies in (0,1](0,1](0,1].

  • Uniform measure. σd\sigma_dσd​ is the normalized surface-area measure on SdS^dSd, viewed as a measure on Rd+1\mathbb{R}^{d+1}Rd+1. The surface measure of a set s⊆Sds \subseteq S^ds⊆Sd is (d+1)(d+1)(d+1) times the Lebesgue volume of {rx:0<r<1, x∈s}\{r x : 0 < r < 1,\ x \in s\}{rx:0<r<1, x∈s}. It is then divided by its total mass, so σd\sigma_dσd​ has total mass 111.
  • Hypergeometric function. For real α\alphaα and zzz,
0F1(;α;z)=∑n=0∞zn(α)n n!,(α)n=α(α+1)⋯(α+n−1),(α)0=1.{}_0F_1(;\alpha; z) = \sum_{n=0}^{\infty} \frac{z^n}{(\alpha)_n \, n!}, \qquad (\alpha)_n = \alpha(\alpha+1)\cdots(\alpha+n-1), \quad (\alpha)_0 = 1.0​F1​(;α;z)=n=0∑∞​(α)n​n!zn​,(α)n​=α(α+1)⋯(α+n−1),(α)0​=1.

The sum is an unconditional infinite sum, with the convention that it equals 000 if the series is not summable.

  • The constant. For each natural number d′d'd′, define
cd′(t)=e−2t 0F1 ⁣(;d′+12; t2).c_{d'}(t) = e^{-2t} \, {}_0F_1\!\left(;\tfrac{d'+1}{2};\, t^2\right).cd′​(t)=e−2t0​F1​(;2d′+1​;t2).

Claim. The theorem asserts that all five of the following statements hold simultaneously.

  1. Range of the energy. The set of real numbers III for which some sphere probability measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1 satisfies Et(μ)=IE_t(\mu) = IEt​(μ)=I is exactly the closed interval
{ Et(μ):μ a sphere probability measure on Rd+1 }=[ cd(t), 1 ].\{\, E_t(\mu) : \mu \text{ a sphere probability measure on } \mathbb{R}^{d+1} \,\} = [\, c_d(t),\ 1 \,].{Et​(μ):μ a sphere probability measure on Rd+1}=[cd​(t), 1].

In particular, both endpoints are attained, and this implicitly asserts cd(t)≤1c_d(t) \le 1cd​(t)≤1.

  1. Characterization of the minimum. For every sphere probability measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1,
Et(μ)=cd(t)  ⟺  μ=σd,E_t(\mu) = c_d(t) \iff \mu = \sigma_d,Et​(μ)=cd​(t)⟺μ=σd​,

where the right-hand side is equality of measures on Rd+1\mathbb{R}^{d+1}Rd+1.

  1. Monotonicity in dimension. With ttt held fixed, the sequence d′↦cd′(t)d' \mapsto c_{d'}(t)d′↦cd′​(t), indexed by all natural numbers d′=0,1,2,…d' = 0, 1, 2, \dotsd′=0,1,2,…, is strictly decreasing: cd′(t)>cd′′(t)c_{d'}(t) > c_{d''}(t)cd′​(t)>cd′′​(t) whenever d′<d′′d' < d''d′<d′′.

  2. Limit in dimension. With ttt held fixed,

cd′(t)→e−2tas d′→∞.c_{d'}(t) \to e^{-2t} \quad \text{as } d' \to \infty.cd′​(t)→e−2tas d′→∞.
  1. Characterization of the maximum. For every sphere probability measure μ\muμ on Rd+1\mathbb{R}^{d+1}Rd+1,
Et(μ)=1  ⟺  μ=δu for some u∈Sd,E_t(\mu) = 1 \iff \mu = \delta_u \text{ for some } u \in S^d,Et​(μ)=1⟺μ=δu​ for some u∈Sd,

where δu\delta_uδu​ is the Dirac point mass at uuu.

Statements 1, 2 and 5 concern the single fixed dimension ddd. Statements 3 and 4 range over all dimensions d′d'd′ for the same fixed t>0t > 0t>0. The only hypothesis on ttt is t>0t > 0t>0; no other assumptions are imposed.

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