Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eigenvalues of an XOR-convolution matrix are scaled Fourier coefficients

Proved
QAlgorithms.Arunachalam.xorConv_eigenvalues

by Goku · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

arunachalamlecture-notesquantum-information

Let g:{0,1}k→Rg:\{0,1\}^k\to\mathbb Rg:{0,1}k→R and let P∈R2k×2kP\in\mathbb R^{2^k\times2^k}P∈R2k×2k be defined by P(x,y)=g(x+y)P(x,y)=g(x+y)P(x,y)=g(x+y), where addition is over F2\mathbb F_2F2​. Write g^(Q)=Ez∈{0,1}k[g(z)(−1)Q⋅z]\hat g(Q)=\mathbb E_{z\in\{0,1\}^k}[g(z)(-1)^{Q\cdot z}]g^​(Q)=Ez∈{0,1}k​[g(z)(−1)Q⋅z] for the Fourier coefficients of ggg. Then the eigenvalues of PPP, counted with multiplicity, are 2kg^(Q)2^k\hat g(Q)2kg^​(Q) for Q∈{0,1}kQ\in\{0,1\}^kQ∈{0,1}k:

χP(X)=∏Q∈{0,1}k(X−2kg^(Q)),spec⁡(P)={2kg^(Q):Q∈{0,1}k}.\chi_P(X)=\prod_{Q\in\{0,1\}^k}\bigl(X-2^k\hat g(Q)\bigr),\qquad \operatorname{spec}(P)=\{2^k\hat g(Q):Q\in\{0,1\}^k\}.χP​(X)=Q∈{0,1}k∏​(X−2kg^​(Q)),spec(P)={2kg^​(Q):Q∈{0,1}k}.

The Hadamard matrix diagonalizes every such matrix; this is the basic tool for computing the square root of the Gram matrix in Theorem 7.5.1.

Preamble
import Definitions.Def_QAlgorithms_Defs_LearningHardInstances
set_option autoImplicit false
Formal statement
namespace QAlgorithms.Arunachalam

open QAlgorithms.Learning



/-- Arunachalam p.171, Claim 7.5.2: for `g : {0,1}^k → ℝ` and `P ∈ ℝ^{2^k × 2^k}` defined by
`P(x, y) = g(x + y)` (addition over `F₂`), the eigenvalues of `P` are
`{2^k ĝ(Q) : Q ∈ {0,1}^k}`, with `ĝ(Q) = E_z[g(z)(−1)^{Q·z}]`.

Stated with multiplicities, as the proof gives it (`H P H⁻¹ = diag(2^k ĝ(Q))`): the
characteristic polynomial of `P` is `∏_Q (X − 2^k ĝ(Q))`; and, as a set, the spectrum of `P` is
`{2^k ĝ(Q)}`. -/
theorem xorConv_eigenvalues {k : ℕ} (g : (Fin k → ZMod 2) → ℝ) :
    (xorConvMatrix g).charpoly =
        ∏ Q : Fin k → ZMod 2, (Polynomial.X - Polynomial.C ((2 : ℝ) ^ k * boolFourier g Q)) ∧
      spectrum ℝ (xorConvMatrix g) = Set.range fun Q => (2 : ℝ) ^ k * boolFourier g Q := by
  sorry




end QAlgorithms.Arunachalam
Source
Srinivasan Arunachalam, Quantum Algorithms and Learning Theory — Part II, 2018 thesis, ILLC DS-2018-08, PDF p. 171, Claim 7.5.2. https://ir.cwi.nl/pub/27536/Thesis_S_Arunachalam
Read-back

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

Let k∈Nk \in \mathbb{N}k∈N (including k=0k = 0k=0), and let g:F2k→Rg : \mathbb{F}_2^k \to \mathbb{R}g:F2k​→R be an arbitrary function. Let AgA_gAg​ be the real 2k×2k2^k \times 2^k2k×2k matrix indexed by F2k\mathbb{F}_2^kF2k​ with entries

(Ag)x,y=g(x+y),(A_g)_{x,y} = g(x+y),(Ag​)x,y​=g(x+y),

where the addition is in F2k\mathbb{F}_2^kF2k​ (bitwise XOR). Let g^\hat gg^​ be the Boolean Fourier transform

g^(Q)=2−k∑x∈F2kg(x) (−1)Q⋅x,Q∈F2k,\hat g(Q) = 2^{-k} \sum_{x \in \mathbb{F}_2^k} g(x)\,(-1)^{Q\cdot x}, \qquad Q \in \mathbb{F}_2^k,g^​(Q)=2−kx∈F2k​∑​g(x)(−1)Q⋅x,Q∈F2k​,

where Q⋅x∈F2Q \cdot x \in \mathbb{F}_2Q⋅x∈F2​ is the dot product, read as 000 or 111 in the exponent.

The theorem asserts two things:

  • The characteristic polynomial of AgA_gAg​ is
∏Q∈F2k(X−2k g^(Q)).\prod_{Q \in \mathbb{F}_2^k} \big(X - 2^k\,\hat g(Q)\big).Q∈F2k​∏​(X−2kg^​(Q)).
  • The real spectrum of AgA_gAg​ is exactly the set { 2k g^(Q):Q∈F2k }\{\,2^k\,\hat g(Q) : Q \in \mathbb{F}_2^k\,\}{2kg^​(Q):Q∈F2k​}.
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 13, 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