Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Problem 01 definitions — Positive definite matrix integral inequality

Definition
rybin2026_p01_matrix_integral

by wenxinzhang · Sep 4, 2026 · Mathlib c5ea003 (Lean v4.30.0)

integral-inequalitymatrix-analysispositive-definite-matrices

Euclidean. For every n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, let In={0,…,n−1}I_n=\{0,\ldots,n-1\}In​={0,…,n−1}. The space Euclidean⁡(n)\operatorname{Euclidean}(n)Euclidean(n) is the real coordinate space RIn\mathbb R^{I_n}RIn​, equipped with the standard Euclidean norm ∥x∥2=(∑i∈In∣xi∣2)1/2\lVert x\rVert_2=(\sum_{i\in I_n}|x_i|^2)^{1/2}∥x∥2​=(∑i∈In​​∣xi​∣2)1/2. For n=0n=0n=0, InI_nIn​ is empty and this space consists only of the zero vector.

surfaceMeasure. For every n∈Nn\in\mathbb Nn∈N, let En=RInE_n=\mathbb R^{I_n}En​=RIn​ with its Euclidean norm and let Sn={x∈En:∥x∥2=1}S_n=\{x\in E_n:\lVert x\rVert_2=1\}Sn​={x∈En​:∥x∥2​=1}. The measure surfaceMeasure⁡(n)\operatorname{surfaceMeasure}(n)surfaceMeasure(n) is the measure σn\sigma_nσn​ on SnS_nSn​ induced from Lebesgue volume on EnE_nEn​ by its polar-decomposition construction, with no additional normalization to make it a probability measure. When n=0n=0n=0, SnS_nSn​ is empty, so σn\sigma_nσn​ is the unique measure on the empty space.

bilinear. For every n∈Nn\in\mathbb Nn∈N, every real matrix M=(Mij)i,j∈InM=(M_{ij})_{i,j\in I_n}M=(Mij​)i,j∈In​​, and every u,v∈RInu,v\in\mathbb R^{I_n}u,v∈RIn​, the quantity bilinear⁡(M,u,v)\operatorname{bilinear}(M,u,v)bilinear(M,u,v) is

∑i∈Inui(∑j∈InMijvj)=∑i,j∈InuiMijvj.\sum_{i\in I_n}u_i\left(\sum_{j\in I_n}M_{ij}v_j\right) =\sum_{i,j\in I_n}u_iM_{ij}v_j.i∈In​∑​ui​​j∈In​∑​Mij​vj​​=i,j∈In​∑​ui​Mij​vj​.

No symmetry, definiteness, or other condition is imposed on MMM, and no normalization is imposed on uuu or vvv. For n=0n=0n=0, both sums are empty and the value is 000.

distance. For every n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, and arbitrary real n×nn\times nn×n matrices AAA and BBB, let Sn={x∈RIn:∥x∥2=1}S_n=\{x\in\mathbb R^{I_n}:\lVert x\rVert_2=1\}Sn​={x∈RIn​:∥x∥2​=1} and let σn\sigma_nσn​ be the sphere measure induced from Lebesgue volume by polar decomposition. The definition assigns the real number

distance⁡(A,B)=∫Sn ⁣(∫Sn∣∑i,j∈Inui(Aij−Bij)vj∣(∑i,j∈InuiAijuj)(∑i,j∈InviBijvj) dσn(v))dσn(u).\operatorname{distance}(A,B) = \int_{S_n}\!\left( \int_{S_n} \frac{ \left|\sum_{i,j\in I_n}u_i(A_{ij}-B_{ij})v_j\right| }{ \left(\sum_{i,j\in I_n}u_iA_{ij}u_j\right) \left(\sum_{i,j\in I_n}v_iB_{ij}v_j\right) } \,d\sigma_n(v) \right)d\sigma_n(u).distance(A,B)=∫Sn​​​∫Sn​​(∑i,j∈In​​ui​Aij​uj​)(∑i,j∈In​​vi​Bij​vj​)​∑i,j∈In​​ui​(Aij​−Bij​)vj​​​dσn​(v)​dσn​(u).

There are no assumptions that AAA or BBB is symmetric, positive, invertible, or distinct. The numerator alone is enclosed in an absolute value; the two quadratic expressions in the denominator are not. Consequently the pointwise quotient can be negative when their product is negative. Real division is total here: if either denominator factor is 000, the quotient at that pair (u,v)(u,v)(u,v) is defined to be 000, regardless of the numerator. Each integral is the real Bochner integral, which is defined to be 000 when its integrand is not integrable; in particular, a nonintegrable inner integral has value 000, and a nonintegrable resulting outer integrand makes the entire outer integral 000. For n=0n=0n=0, the unit sphere is empty and the double integral is 000.

Definition code
import Mathlib.LinearAlgebra.Matrix.PosDef
import Mathlib.Analysis.Normed.Lp.MeasurableSpace
import Mathlib.MeasureTheory.Constructions.HaarToSphere
import Mathlib.MeasureTheory.Integral.Prod

open Matrix MeasureTheory Metric
open scoped BigOperators

namespace RybinAI2026.P01

/-- Euclidean coordinate space used by the matrix integral problem, equipped with the `ℓ²` norm. -/
abbrev Euclidean (n : ℕ) := EuclideanSpace ℝ (Fin n)

/-- The canonical surface measure obtained from Lebesgue measure by polar decomposition. -/
noncomputable def surfaceMeasure (n : ℕ) : Measure (sphere (0 : Euclidean n) 1) :=
  (volume : Measure (Euclidean n)).toSphere

/-- The bilinear numerator `uᵀ M v`. -/
def bilinear {n : ℕ} (M : Matrix (Fin n) (Fin n) ℝ)
    (u v : Euclidean n) : ℝ :=
  dotProduct (fun i => u i) (M *ᵥ fun j => v j)

/-- The double spherical integral from problem 1.  No normalization is imposed on surface
measure; multiplying the measure by a fixed constant multiplies every occurrence of `distance`
by the same constant and does not affect the target inequality. -/
noncomputable def distance {n : ℕ} (A B : Matrix (Fin n) (Fin n) ℝ) : ℝ :=
  ∫ u, ∫ v,
    |bilinear (A - B) u.1 v.1| /
      (bilinear A u.1 u.1 * bilinear B v.1 v.1)
    ∂surfaceMeasure n ∂surfaceMeasure n

end RybinAI2026.P01
Source
https://rybindmitry.github.io/problems/1.html
Read-back

What the Lean code literally says, in plain math · gpt-5.6-sol

Euclidean. For every n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, let In={0,…,n−1}I_n=\{0,\ldots,n-1\}In​={0,…,n−1}. The space Euclidean⁡(n)\operatorname{Euclidean}(n)Euclidean(n) is the real coordinate space RIn\mathbb R^{I_n}RIn​, equipped with the standard Euclidean norm ∥x∥2=(∑i∈In∣xi∣2)1/2\lVert x\rVert_2=(\sum_{i\in I_n}|x_i|^2)^{1/2}∥x∥2​=(∑i∈In​​∣xi​∣2)1/2. For n=0n=0n=0, InI_nIn​ is empty and this space consists only of the zero vector.

surfaceMeasure. For every n∈Nn\in\mathbb Nn∈N, let En=RInE_n=\mathbb R^{I_n}En​=RIn​ with its Euclidean norm and let Sn={x∈En:∥x∥2=1}S_n=\{x\in E_n:\lVert x\rVert_2=1\}Sn​={x∈En​:∥x∥2​=1}. The measure surfaceMeasure⁡(n)\operatorname{surfaceMeasure}(n)surfaceMeasure(n) is the measure σn\sigma_nσn​ on SnS_nSn​ induced from Lebesgue volume on EnE_nEn​ by its polar-decomposition construction, with no additional normalization to make it a probability measure. When n=0n=0n=0, SnS_nSn​ is empty, so σn\sigma_nσn​ is the unique measure on the empty space.

bilinear. For every n∈Nn\in\mathbb Nn∈N, every real matrix M=(Mij)i,j∈InM=(M_{ij})_{i,j\in I_n}M=(Mij​)i,j∈In​​, and every u,v∈RInu,v\in\mathbb R^{I_n}u,v∈RIn​, the quantity bilinear⁡(M,u,v)\operatorname{bilinear}(M,u,v)bilinear(M,u,v) is

∑i∈Inui(∑j∈InMijvj)=∑i,j∈InuiMijvj.\sum_{i\in I_n}u_i\left(\sum_{j\in I_n}M_{ij}v_j\right) =\sum_{i,j\in I_n}u_iM_{ij}v_j.i∈In​∑​ui​​j∈In​∑​Mij​vj​​=i,j∈In​∑​ui​Mij​vj​.

No symmetry, definiteness, or other condition is imposed on MMM, and no normalization is imposed on uuu or vvv. For n=0n=0n=0, both sums are empty and the value is 000.

distance. For every n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, and arbitrary real n×nn\times nn×n matrices AAA and BBB, let Sn={x∈RIn:∥x∥2=1}S_n=\{x\in\mathbb R^{I_n}:\lVert x\rVert_2=1\}Sn​={x∈RIn​:∥x∥2​=1} and let σn\sigma_nσn​ be the sphere measure induced from Lebesgue volume by polar decomposition. The definition assigns the real number

distance⁡(A,B)=∫Sn ⁣(∫Sn∣∑i,j∈Inui(Aij−Bij)vj∣(∑i,j∈InuiAijuj)(∑i,j∈InviBijvj) dσn(v))dσn(u).\operatorname{distance}(A,B) = \int_{S_n}\!\left( \int_{S_n} \frac{ \left|\sum_{i,j\in I_n}u_i(A_{ij}-B_{ij})v_j\right| }{ \left(\sum_{i,j\in I_n}u_iA_{ij}u_j\right) \left(\sum_{i,j\in I_n}v_iB_{ij}v_j\right) } \,d\sigma_n(v) \right)d\sigma_n(u).distance(A,B)=∫Sn​​​∫Sn​​(∑i,j∈In​​ui​Aij​uj​)(∑i,j∈In​​vi​Bij​vj​)​∑i,j∈In​​ui​(Aij​−Bij​)vj​​​dσn​(v)​dσn​(u).

There are no assumptions that AAA or BBB is symmetric, positive, invertible, or distinct. The numerator alone is enclosed in an absolute value; the two quadratic expressions in the denominator are not. Consequently the pointwise quotient can be negative when their product is negative. Real division is total here: if either denominator factor is 000, the quotient at that pair (u,v)(u,v)(u,v) is defined to be 000, regardless of the numerator. Each integral is the real Bochner integral, which is defined to be 000 when its integrand is not integrable; in particular, a nonintegrable inner integral has value 000, and a nonintegrable resulting outer integrand makes the entire outer integral 000. For n=0n=0n=0, the unit sphere is empty and the double integral is 000.

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

  • Endorsed by wenxinzhang · Sep 4, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me