Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 3.5 — a_µ(x) = ‖ϕ(x) − β_ϕ(µ)‖² + D(µ)/2, D(µ) = 2Var(ϕ(X)), d_µ = −2⟨ϕ − β, ϕ′ − β⟩

Proved
DistCov.Indep.proposition_3_5

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

barycenterhilbert-spacenegative-typep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1variance

Let X\mathcal XX be a separable metric space with its Borel σ\sigmaσ-field, with negative type witnessed by the embedding ϕ:X→H\phi:\mathcal X\to Hϕ:X→H into a real Hilbert space (d(x,x′)=∥ϕ(x)−ϕ(x′)∥2d(x,x')=\|\phi(x)-\phi(x')\|^2d(x,x′)=∥ϕ(x)−ϕ(x′)∥2), and let μ\muμ be a probability measure on X\mathcal XX with finite first moment. Write βϕ(μ)=∫ϕ dμ\beta_\phi(\mu)=\int\phi\,d\muβϕ​(μ)=∫ϕdμ. Then:

  1. for all x∈Xx\in\mathcal Xx∈X,
aμ(x)=∥ϕ(x)−βϕ(μ)∥2+D(μ)/2;a_\mu(x)=\|\phi(x)-\beta_\phi(\mu)\|^2+D(\mu)/2;aμ​(x)=∥ϕ(x)−βϕ​(μ)∥2+D(μ)/2;
  1. D(μ)=2Var⁡(ϕ(X))D(\mu)=2\operatorname{Var}(\phi(X))D(μ)=2Var(ϕ(X)) if X∼μX\sim\muX∼μ, where Var⁡(Z)=E∥Z−EZ∥2\operatorname{Var}(Z)=\mathbf E\|Z-\mathbf E Z\|^2Var(Z)=E∥Z−EZ∥2, that is
D(μ)=2∫∥ϕ(x)−βϕ(μ)∥2 dμ(x);D(\mu)=2\int\|\phi(x)-\beta_\phi(\mu)\|^2\,d\mu(x);D(μ)=2∫∥ϕ(x)−βϕ​(μ)∥2dμ(x);
  1. for all x,x′∈Xx,x'\in\mathcal Xx,x′∈X,
dμ(x,x′)=−2 ⟨ϕ(x)−βϕ(μ), ϕ(x′)−βϕ(μ)⟩.d_\mu(x,x')=-2\,\big\langle\phi(x)-\beta_\phi(\mu),\,\phi(x')-\beta_\phi(\mu)\big\rangle.dμ​(x,x′)=−2⟨ϕ(x)−βϕ​(μ),ϕ(x′)−βϕ​(μ)⟩.

The third identity expresses the centred distance dμd_\mudμ​ as a (negative) Gram kernel of the centred embedding; it is what turns dcov⁡(θ)\operatorname{dcov}(\theta)dcov(θ) into a squared norm in Proposition 3.7.

Formalization Note The variance is written out as the integral of ∥ϕ(x)−βϕ(μ)∥2\|\phi(x)-\beta_\phi(\mu)\|^2∥ϕ(x)−βϕ​(μ)∥2, since E[ϕ(X)]=βϕ(μ)\mathbf E[\phi(X)]=\beta_\phi(\mu)E[ϕ(X)]=βϕ​(μ). Hilbert spaces are real (Errata (viii), p. 27); separability is the standing assumption of Errata (i), p. 24.

Preamble
import Mathlib
import Definitions.Def_DistCov_Indep_Setting
Formal statement
namespace DistCov.Indep

open MeasureTheory
open scoped InnerProductSpace

theorem proposition_3_5 {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [SecondCountableTopology X] {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H]
    (ϕ : X → H) (hϕ : IsNegTypeEmbedding ϕ)
    (μ : Measure X) [IsProbabilityMeasure μ] (h : FiniteFirstMoment μ) :
    (∀ x, meanDist μ x = ‖ϕ x - bary ϕ μ‖ ^ 2 + D μ / 2) ∧
    D μ = 2 * ∫ x, ‖ϕ x - bary ϕ μ‖ ^ 2 ∂μ ∧
    (∀ x x', dcent μ x x' = -2 * ⟪ϕ x - bary ϕ μ, ϕ x' - bary ϕ μ⟫_ℝ) := by sorry

end DistCov.Indep
Source
Lyons, Distance covariance in metric spaces, arXiv:1106.5758 (version of 19 Dec. 2020), p. 13, Proposition 3.5 and the definition of Var(Z) before it; Errata (i), p. 24 and (viii), p. 27
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

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