Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8: the full product-energy diagonal expansion

Open
QAlgorithms.Papers.Independent.Extend50.P14.diagonal_energy_expansion

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let n,d≥1 and let H be Hermitian and diagonal in the product basis of n d-level systems. For 1≤l<d put Z^{(l)}=|l-1⟩⟨l-1|-|l⟩⟨l|. There are real diagonal entries h_x and real coefficients c_a indexed by patterns a that choose I or one Z^{(l)} at each site, such that

H=∑xhx∣x⟩⟨x∣=Tr⁡HdnI+∑a≠(I,…,I)ca⨂jaj.H=\sum_x h_x|x\rangle\langle x|=\frac{\operatorname{Tr}H}{d^n}I+\sum_{a\ne(I,\ldots,I)}c_a\bigotimes_j a_j.H=x∑​hx​∣x⟩⟨x∣=dnTrH​I+a=(I,…,I)∑​ca​j⨂​aj​.

This is the source expansion with each selected site and nonzero level counted once. For d=1 the nonidentity sum is empty.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P14
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Extend50.P14

open scoped Classical Matrix ComplexConjugate Matrix.Norms.Frobenius

open MeasureTheory

-- Exact accepted aliases and physical operators, without local redeclarations.

open QAlgorithms.Papers.Independent.Information100.P60 (Mat)

open QAlgorithms.Papers.Independent.Advance50.P49 (onWire multiSwap)

attribute [local instance 100] LieRing.ofAssociativeRing

/-- PDF p.48, Lemma 8/G39–G40: the full physical product-energy expansion.
Positive d makes Tr(I)=d^n nonzero; d=1 leaves only the scalar term. -/
theorem diagonal_energy_expansion (n d : ℕ) (hn : 1 ≤ n) (hd : 1 ≤ d)
    (H : EMat n d) (hH : H.IsHermitian) (hDiag : Matrix.IsDiag H) :
    (∃ h : EnergyBasis n d → ℝ, H = Matrix.diagonal (fun x => (h x : ℂ))) ∧
    ∃ c : (Fin n → Option (Fin (d-1))) → ℝ,
      H = (Matrix.trace H / (d : ℂ)^n) • (1 : EMat n d) +
        ∑ a ∈ Finset.univ.filter (fun a => ∃ j, a j ≠ none),
          (c a : ℂ) • energyDiagonalMonomial n d a := by sorry

end QAlgorithms.Papers.Independent.Extend50.P14

end
Source
Restrictions on realizable unitary operations imposed by symmetry and locality, arXiv:2003.05524v3, PDF p. 48, Lemma 8: the full product-energy diagonal expansion
Read-back

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

For every pair of natural numbers n,d≥1n,d\ge1n,d≥1 and every Hermitian diagonal complex matrix HHH on B={0,…,d−1}n\mathcal B=\{0,\ldots,d-1\}^{n}B={0,…,d−1}n, there exists a real-valued function hhh on B\mathcal BB such that H=diag⁡(h(x))H=\operatorname{diag}(h(x))H=diag(h(x)), and there exists a real coefficient function ccc on all assignments aaa that give each site either no index or an index ℓ<d−1\ell<d-1ℓ<d−1, such that

H=tr⁡Hdn IB+∑a∃j:aj≠nonec(a)Ma.H=\frac{\operatorname{tr}H}{d^n}\,I_{\mathcal B} +\sum_{\substack{a\\\exists j:\,a_j\ne\mathrm{none}}}c(a)M_a.H=dntrH​IB​+a∃j:aj​=none​∑​c(a)Ma​.

Here MaM_aMa​ is diagonal, with Ma(x,x)=∏jfaj(xj)M_a(x,x)=\prod_j f_{a_j}(x_j)Ma​(x,x)=∏j​faj​​(xj​), where fnone(r)=1f_{\mathrm{none}}(r)=1fnone​(r)=1 and, for an assigned index ℓ\ellℓ, fℓ(r)f_\ell(r)fℓ​(r) is 111 at r=ℓr=\ellr=ℓ, −1-1−1 at r=ℓ+1r=\ell+1r=ℓ+1, and 000 otherwise. All real scalars in the matrix identity are regarded as complex scalars, and the sum ranges over every assignment with at least one assigned index. Neither hhh nor ccc is asserted to be unique. The case d=1d=1d=1 is included: the displayed sum is empty and the data space is one-dimensional.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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