Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6 (Matrix decomposition): arbitrary finite dimension

Open
QAlgorithms.Papers.Independent.Intakethird100.P85.matrixDecomposition

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let d≥0d\ge0d≥0 and let UUU be a unitary d×dd\times dd×d complex matrix whose entries lie in D[ω]\mathbb D[\omega]D[ω]. There is a finite word of one- and two-level operations of types X,H,T,ωX,H,T,\omegaX,H,T,ω, with product WWW, such that

U=W.U=W.U=W.

Two-level operations use distinct ordered coordinates. At d=0d=0d=0 the empty word gives the unique empty matrix. The result supplies the algebraic factorization used by exact circuit synthesis.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P85
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P85

open scoped Classical BigOperators

open QAlgorithms

open QAlgorithms.Papers.Independent.Gap48.P10
  (InZomega InDomega Residue bits residue residueMultiply Reducible)

open QAlgorithms.Papers.Independent.Support21.P13
  (synthesisRing integralRing coordinateValue HTLetter htWordMatrix EntriesInRing cliffordTLibrary)

local notation "omega" => QAlgorithms.gateT true true

local notation "sqrtTwo" => ((Real.sqrt 2 : ℝ) : ℂ)

/-- Lemma 6, PDF p.4: arbitrary finite-dimensional matrix factorization, including dimension 0. -/
theorem matrixDecomposition (d : ℕ) (U : Matrix (Fin d) (Fin d) ℂ)
    (unitary : U ∈ Matrix.unitaryGroup (Fin d) ℂ) (ring : ∀ i j, InDomega (U i j)) :
    ∃ w : List (LevelOp d), levelWordMatrix w = U := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P85

end
Source
Exact synthesis of multiqubit Clifford+T circuits, arXiv:1212.0506v3, PDF p. 4, Lemma 6 (Matrix decomposition): arbitrary finite dimension
Read-back

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

Let ω=eiπ/4\omega=e^{i\pi/4}ω=eiπ/4 and O={a0ω3+a1ω2+a2ω+a3:aj∈Z}\mathcal O=\{a_0\omega^3+a_1\omega^2+a_2\omega+a_3:a_j\in\mathbb Z\}O={a0​ω3+a1​ω2+a2​ω+a3​:aj​∈Z}. For every natural number ddd and every unitary complex d×dd\times dd×d matrix UUU, suppose that for every entry UijU_{ij}Uij​ there exists a natural number hijh_{ij}hij​ such that 2hijUij∈O2^{h_{ij}}U_{ij}\in\mathcal O2hij​Uij​∈O. Then U=W(w)U=W(w)U=W(w) for some finite word www whose operations are X=(0110)X=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)X=(01​10​), H=2−1/2(111−1)H=2^{-1/2}\left(\begin{smallmatrix}1&1\\1&-1\end{smallmatrix}\right)H=2−1/2(11​1−1​), or T=diag⁡(1,ω)T=\operatorname{diag}(1,\omega)T=diag(1,ω) on an ordered pair of distinct coordinates, acting identically on all other coordinates, or the diagonal operation multiplying a single coordinate by ω\omegaω. Here W(w)W(w)W(w) multiplies the operation matrices in reverse word order, and the empty word gives III. The statement includes d=0d=0d=0, where all entry conditions are vacuous and the empty word represents the unique empty matrix.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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