Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Entrywise Quadratic Energy Trace Identity

Proved
FunctionalInequalities.Analysis.sum_matrix_product_entry_quadratic_eq_trace_readable

by Lazyfill · Oct 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

functional-inequalitieskls-conjecturekls-modularkls-readablelog-concave

This statement converts a family of entrywise quadratic energies into a trace sum.

Let S be a symmetric real n-by-n matrix. Let R be an arbitrary real m-by-m matrix, and let Tₖ be symmetric real n-by-n matrices indexed by Fin m. For each pair of matrix-entry indices p, define the vector whose k-th coordinate is (STkS)p(ST_kS)_p(STk​S)p​. Then

∑p(ST∙S)p⋅(R(ST∙S)p)=∑k,lRkltr⁡((SS)Tk(SS)Tl).\sum_p (ST_{\bullet}S)_p\mathbin{\cdot}\bigl(R(ST_{\bullet}S)_p\bigr) =\sum_{k,l}R_{kl}\operatorname{tr}\bigl((SS)T_k(SS)T_l\bigr).p∑​(ST∙​S)p​⋅(R(ST∙​S)p​)=k,l∑​Rkl​tr((SS)Tk​(SS)Tl​).

This is a finite algebraic identity for entrywise inverse-quadratic energies and trace energies.

Formalization Note R need not be symmetric or positive; symmetry is required only for S and every Tₖ.

Original Lean declaration header

Within namespace FunctionalInequalities.Analysis. Shown in its original module context. Proof omitted.

theorem sum_matrix_product_entry_quadratic_eq_trace {m n : ℕ}
    (S : Matrix (Fin n) (Fin n) ℝ) (hS : S.IsSymm)
    (R : Matrix (Fin m) (Fin m) ℝ)
    (T : Fin m → Matrix (Fin n) (Fin n) ℝ) (hT : ∀ k, (T k).IsSymm) :
    (∑ p : Fin n × Fin n,
      (fun k => (S * T k * S) p.1 p.2) ⬝ᵥ
        (R *ᵥ (fun k => (S * T k * S) p.1 p.2))) =
      ∑ k : Fin m, ∑ l : Fin m, R k l * ((S * S) * T k * (S * S) * T l).trace

Module navigation

Module: Analysis/Matrix/Trace/Algebra.

Supporting theorems: sum_matrix_product_entry_mul_eq_trace.

Previous: sum_matrix_product_entry_mul_eq_trace.

Source excerpt, lines 148–155 · Frozen source 408915f.

Preamble
import Definitions.Def_KLSModular_FunctionalInequalities_Analysis_Matrix_Trace_Algebra

open Matrix
set_option maxHeartbeats 1000000
Formal statement

theorem FunctionalInequalities.Analysis.sum_matrix_product_entry_quadratic_eq_trace_readable {m n : ℕ}
    (S : Matrix (Fin n) (Fin n) ℝ) (hS : S.IsSymm)
    (R : Matrix (Fin m) (Fin m) ℝ)
    (T : Fin m → Matrix (Fin n) (Fin n) ℝ) (hT : ∀ k, (T k).IsSymm) :
    (∑ p : Fin n × Fin n,
      (fun k => (S * T k * S) p.1 p.2) ⬝ᵥ
        (R *ᵥ (fun k => (S * T k * S) p.1 p.2))) =
      ∑ k : Fin m, ∑ l : Fin m, R k l * ((S * S) * T k * (S * S) * T l).trace := by sorry
Source
Lean source: https://github.com/human-ai-mathematics/kls-lean/blob/408915f/formalization/FunctionalInequalities/Analysis/Matrix/Trace/Algebra.lean#L145-L180 (repository human-ai-mathematics/kls-lean, commit 408915f, module `FunctionalInequalities.Analysis.Matrix.Trace.Algebra`, declaration `FunctionalInequalities.Analysis.sum_matrix_product_entry_quadratic_eq_trace`; the repository is private at upload time).

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