Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The direction y=(x′Σx)−1/2Σ1/2xy = (x'\Sigma x)^{-1/2}\Sigma^{1/2}xy=(x′Σx)−1/2Σ1/2x is a unit vector

Proved
RobustMeanCov.Projection.normalized_direction_inner_self

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-algebramatrix-square-rootp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let Σ\SigmaΣ be a real positive semidefinite n×nn\times nn×n matrix with positive semidefinite square root Σ1/2\Sigma^{1/2}Σ1/2, and let x∈Rnx\in\mathbb{R}^nx∈Rn satisfy x′Σx>0x'\Sigma x > 0x′Σx>0. Define

y=(x′Σx)−1/2 Σ1/2x(so y′=(x′Σx)−1/2x′Σ1/2).y = (x'\Sigma x)^{-1/2}\, \Sigma^{1/2} x \qquad (\text{so } y' = (x'\Sigma x)^{-1/2} x'\Sigma^{1/2}).y=(x′Σx)−1/2Σ1/2x(so y′=(x′Σx)−1/2x′Σ1/2).

Then y′y=1y'y = 1y′y=1; in particular y≠0y \neq 0y=0.

This is the normalization that lets the proof of the general projection property reduce to projecting an isotropic random vector onto a unit direction.

Formalization Note Σ1/2\Sigma^{1/2}Σ1/2 is CFC.sqrt S, acting on Rn\mathbb{R}^nRn through Matrix.toEuclideanCLM, exactly as in Mathlib's multivariateGaussian. y′yy'yy′y is the Euclidean inner product ⟨y,y⟩\langle y, y\rangle⟨y,y⟩.

Preamble
import Mathlib
import Definitions.Def_RobustMeanCov_Projection_MeanCovClass
import Definitions.Def_RobustMeanCov_Shared_MeanVarClass
open MeasureTheory Matrix
open scoped RealInnerProductSpace MatrixOrder
Formal statement
namespace RobustMeanCov.Projection

/-- Appendix, proof of Theorem 1 (Popescu 2007, p. 109): for `Σ ⪰ 0` and `x′Σx > 0`, the vector
`y = (x′Σx)^{-1/2} Σ^{1/2} x` satisfies `y′y = 1`. -/
theorem normalized_direction_inner_self {n : ℕ} (x : EuclideanSpace ℝ (Fin n))
    (S : Matrix (Fin n) (Fin n) ℝ) (hS : S.PosSemidef) (hq : 0 < x.ofLp ⬝ᵥ S *ᵥ x.ofLp) :
    let y : EuclideanSpace ℝ (Fin n) :=
      (x.ofLp ⬝ᵥ S *ᵥ x.ofLp) ^ (-(1 / 2 : ℝ)) • toEuclideanCLM (𝕜 := ℝ) (CFC.sqrt S) x
    ⟪y, y⟫ = 1 := by sorry

end RobustMeanCov.Projection
Source
Popescu, Robust Mean-Covariance Solutions for Stochastic Optimization, Oper. Res. 55(1), 2007, https://doi.org/10.1287/opre.1060.0353, p. 109, Appendix, proof of Theorem 1, 'Note that y′y = 1' (before (2))
Read-back

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

This theorem fixes n∈Nn \in \mathbb{N}n∈N, a vector x∈Rnx \in \mathbb{R}^nx∈Rn and a real n×nn \times nn×n matrix SSS. The hypotheses are:

  • SSS is positive semidefinite: SSS is symmetric and z⊤Sz≥0z^\top S z \ge 0z⊤Sz≥0 for all z∈Rnz \in \mathbb{R}^nz∈Rn;
  • q:=x⊤Sx=∑i,jxiSijxj>0q := x^\top S x = \sum_{i,j} x_i S_{ij} x_j > 0q:=x⊤Sx=∑i,j​xi​Sij​xj​>0.

S1/2S^{1/2}S1/2 is the square root of SSS given by the continuous functional calculus. For a positive semidefinite SSS, this is the unique positive semidefinite matrix whose square is SSS. Define

y=q−1/2 S1/2x∈Rn,y = q^{-1/2}\, S^{1/2} x \in \mathbb{R}^n,y=q−1/2S1/2x∈Rn,

where S1/2xS^{1/2}xS1/2x is ordinary matrix–vector multiplication and q−1/2q^{-1/2}q−1/2 is the real power, equal to 1/q1/\sqrt{q}1/q​ since q>0q > 0q>0. The conclusion is

⟨y,y⟩=∑iyi2=1.\langle y, y\rangle = \sum_i y_i^2 = 1.⟨y,y⟩=i∑​yi2​=1.

Degenerate cases: when n=0n = 0n=0, qqq is an empty sum equal to 000, so the hypothesis q>0q > 0q>0 cannot hold and the statement is vacuous. Likewise, it is vacuous whenever x⊤Sx=0x^\top S x = 0x⊤Sx=0, including x=0x = 0x=0 and S=0S = 0S=0.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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