Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 2: NNN-point minimizers converge weak* to σd\sigma_dσd​

Proved
AlignmentUniformity.energy_minimizers_equidistribute

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. For each N≥1N\ge1N≥1, let uN∗=(uN,1∗,…,uN,N∗)\mathbf{u}^*_N=(u^*_{N,1},\dots,u^*_{N,N})uN∗​=(uN,1∗​,…,uN,N∗​) be an NNN-point minimizer of the pairwise potential:

uN∗∈argmin⁡u1,…,uN∈Sd ∑1≤i<j≤NGt(ui,uj).\mathbf{u}^*_N\in\operatorname*{argmin}_{u_1,\dots,u_N\in S^d}\ \sum_{1\le i<j\le N}G_t(u_i,u_j).uN∗​∈u1​,…,uN​∈Sdargmin​ 1≤i<j≤N∑​Gt​(ui​,uj​).

Then the normalized counting measures 1N∑i=1NδuN,i∗\frac1N\sum_{i=1}^N\delta_{u^*_{N,i}}N1​∑i=1N​δuN,i∗​​ converge weak* to σd\sigma_dσd​ as N→∞N\to\inftyN→∞: for every continuous f:Rd+1→Rf:\mathbb{R}^{d+1}\to\mathbb{R}f:Rd+1→R,

lim⁡N→∞1N∑i=1Nf(uN,i∗)=∫f dσd.\lim_{N\to\infty}\frac1N\sum_{i=1}^Nf(u^*_{N,i})=\int f\,d\sigma_d.N→∞lim​N1​i=1∑N​f(uN,i∗​)=∫fdσd​.

This is the finite-sample counterpart of Proposition 1.

Formalization Note The minimizer need not be unique. The statement holds for every choice of minimizers, as in the paper's Lemma 2 ("any energy minimizing sequence").

Preamble
import Mathlib
import Definitions.Def_AlignmentUniformity_Basic

open MeasureTheory Filter Topology
Formal statement
namespace AlignmentUniformity

theorem energy_minimizers_equidistribute (d : ℕ) {t : ℝ} (ht : 0 < t)
    (u : (N : ℕ) → Fin N → Vec (d + 1))
    (hu : ∀ N : ℕ, 0 < N →
      (∀ i, u N i ∈ Metric.sphere (0 : Vec (d + 1)) 1) ∧
        ∀ v : Fin N → Vec (d + 1), (∀ i, v i ∈ Metric.sphere (0 : Vec (d + 1)) 1) →
          pairPotential t (u N) ≤ pairPotential t v) :
    WeakStarTendsto (fun N => normCounting (u N)) (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 2, p. 5; restated in Appendix A.1, Proposition 2, p. 15
Read-back

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

Fix a natural number ddd and a real number ttt with t>0t > 0t>0. Let Sd={x∈Rd+1:∥x∥=1}S^d = \{x \in \mathbb{R}^{d+1} : \|x\| = 1\}Sd={x∈Rd+1:∥x∥=1} be the unit sphere in Euclidean space Rd+1\mathbb{R}^{d+1}Rd+1, where ∥⋅∥\|\cdot\|∥⋅∥ is the Euclidean norm. When d=0d = 0d=0, S0S^0S0 is the two-point set {−1,1}⊂R\{-1, 1\} \subset \mathbb{R}{−1,1}⊂R.

Suppose we are given, for every natural number NNN (including N=0N = 0N=0), an NNN-point configuration

u(N)=(u1(N),…,uN(N)),ui(N)∈Rd+1.u^{(N)} = \big(u^{(N)}_1, \dots, u^{(N)}_N\big), \qquad u^{(N)}_i \in \mathbb{R}^{d+1}.u(N)=(u1(N)​,…,uN(N)​),ui(N)​∈Rd+1.

The configurations for different NNN are not required to be related to one another.

For any NNN-point configuration v=(v1,…,vN)v = (v_1,\dots,v_N)v=(v1​,…,vN​), define its pairwise Gaussian potential

Et(v)  =  ∑1≤i<j≤Nexp⁡ ⁣(−t ∥vi−vj∥2).E_t(v) \;=\; \sum_{1 \le i < j \le N} \exp\!\big(-t\,\|v_i - v_j\|^2\big).Et​(v)=1≤i<j≤N∑​exp(−t∥vi​−vj​∥2).

This is an empty sum, equal to 000, when N≤1N \le 1N≤1.

Hypothesis. For every N≥1N \ge 1N≥1:

  • every point ui(N)u^{(N)}_iui(N)​ lies on SdS^dSd; and
  • u(N)u^{(N)}u(N) is a global minimizer of EtE_tEt​ among all NNN-point configurations on the sphere. That is, Et(u(N))≤Et(v)E_t(u^{(N)}) \le E_t(v)Et​(u(N))≤Et​(v) for every v=(v1,…,vN)v = (v_1,\dots,v_N)v=(v1​,…,vN​) with all vi∈Sdv_i \in S^dvi​∈Sd.

Nothing is assumed about u(0)u^{(0)}u(0), which is necessarily the empty configuration. For N=1N = 1N=1 the potential is identically 000, so any single point of SdS^dSd qualifies. Such minimizers exist for every NNN, because EtE_tEt​ is continuous on the compact set (Sd)N(S^d)^N(Sd)N, so the hypothesis is satisfiable.

Measures. Let μN\mu_NμN​ be the normalized counting measure

μN=1N∑i=1Nδui(N).\mu_N = \frac{1}{N}\sum_{i=1}^N \delta_{u^{(N)}_i}.μN​=N1​i=1∑N​δui(N)​​.

For N=0N = 0N=0 this is the zero measure, since it is computed as ∞⋅0=0\infty \cdot 0 = 0∞⋅0=0 in extended arithmetic.

Let σd\sigma_dσd​ be the uniform distribution on SdS^dSd, viewed as a Borel measure on Rd+1\mathbb{R}^{d+1}Rd+1. It is the surface-area measure on SdS^dSd divided by the total surface area of SdS^dSd, so it is a probability measure concentrated on SdS^dSd. Here the surface-area measure of a set A⊆SdA \subseteq S^dA⊆Sd is (d+1)(d+1)(d+1) times the Lebesgue volume of the cone {rx:0<r<1, x∈A}\{r x : 0 < r < 1,\ x \in A\}{rx:0<r<1, x∈A}. For d=0d = 0d=0, σ0\sigma_0σ0​ gives mass 12\tfrac1221​ to each of ±1\pm 1±1.

Conclusion. μN→σd\mu_N \to \sigma_dμN​→σd​ weak* as N→∞N \to \inftyN→∞, in the following sense. For every continuous function f:Rd+1→Rf : \mathbb{R}^{d+1} \to \mathbb{R}f:Rd+1→R (not required to be bounded or compactly supported),

lim⁡N→∞1N∑i=1Nf(ui(N))  =  ∫Sdf dσd.\lim_{N \to \infty} \frac{1}{N}\sum_{i=1}^N f\big(u^{(N)}_i\big) \;=\; \int_{S^d} f \, d\sigma_d.N→∞lim​N1​i=1∑N​f(ui(N)​)=∫Sd​fdσd​.

The integrals are taken in the convention where a non-integrable function has integral 000. However, every continuous fff is integrable against each μN\mu_NμN​ (finite support) and against σd\sigma_dσd​, since fff is bounded on the compact sphere.

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