Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Existence of an alternating-axis canonical decomposition

Open
QAlgorithms.Papers.Independent.Intakenext100.P03.canonical_exists

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

prove2quantum

Let nnn be a positive even integer. Put ζm=e2πi/m\zeta_m=e^{2\pi i/m}ζm​=e2πi/m, Rn=Z[ζ2n,1/2]R_n=\mathbb Z[\zeta_{2n},1/2]Rn​=Z[ζ2n​,1/2], Uz(θ)=diag⁡(1,eiθ)U_z(\theta)=\operatorname{diag}(1,e^{i\theta})Uz​(θ)=diag(1,eiθ), and Gn=⟨C,Uz(π/n)⟩G_n=\langle C,U_z(\pi/n)\rangleGn​=⟨C,Uz​(π/n)⟩, where C=⟨H0,S⟩C=\langle H_0,S\rangleC=⟨H0​,S⟩, H0=1+i2(111−1)H_0=\frac{1+i}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}H0​=21+i​(11​1−1​) and S=diag⁡(1,i)S=\operatorname{diag}(1,i)S=diag(1,i).

For an axis p∈{x,y,z}p\in\{x,y,z\}p∈{x,y,z} with Pauli matrix PPP, write Up(θ)=1+eiθ2I+1−eiθ2PU_p(\theta)=\frac{1+e^{i\theta}}2I+\frac{1-e^{i\theta}}2PUp​(θ)=21+eiθ​I+21−eiθ​P. A canonical pair consists of an ordered finite list (pi,ai)i=1m(p_i,a_i)_{i=1}^m(pi​,ai​)i=1m​ and an actual matrix DDD, with consecutive axes distinct, 1≤ai<n/21\le a_i<n/21≤ai​<n/2, DDD proportional to an element of CCC, and U=(∏i=1mUpi(aiπ/n))DU=(\prod_{i=1}^m U_{p_i}(a_i\pi/n))DU=(∏i=1m​Upi​​(ai​π/n))D. Products have the printed left-to-right order, and the empty list is permitted. For every U∈GnU\in G_nU∈Gn​, there is such a pair:

∃ ((pi,ai)i=1m,D),U=(∏i=1mUpi(aiπ/n))D.\exists\,((p_i,a_i)_{i=1}^m,D),\qquad U=\left(\prod_{i=1}^mU_{p_i}(a_i\pi/n)\right)D.∃((pi​,ai​)i=1m​,D),U=(i=1∏m​Upi​​(ai​π/n))D.

This provides the canonical syntax without assuming its later uniqueness or optimality.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P03
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P03

open scoped BigOperators Classical

-- Reuse the Mathlib matrix type without declaring a second Mat.

local notation "Mat" => Matrix Bool Bool ℂ

/-- Canonical data: the axis/exponent list and the actual residual matrix D,
not a nonunique phase/Clifford witness pair, PDF pp.6-7. -/
local notation "CanonicalData" => List (Fin 3 × ℕ) × Matrix Bool Bool ℂ

/-- Lemma 3.1, PDF pp.6-8: existence, without assuming the stronger
optimality identity proved there and stated separately in Corollary 4.2. -/
theorem canonical_exists (n : ℕ) (hn : 0 < n) (heven : Even n)
    (U : Mat) (hU : U ∈ cyclotomicGroup n) :
    ∃ d : CanonicalData, IsCyclotomicCanonical n U d := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P03

end
Source
Exact synthesis of single-qubit unitaries over Clifford-cyclotomic gate sets, arXiv:1501.04944v2, PDF p. 7, Lemma 3.1
Read-back

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

For every positive even natural number nnn and every complex 2×22\times22×2 matrix UUU belonging to the following generated submonoid GnG_nGn​, there exists a pair d=(L,C)d=(L,C)d=(L,C) with the properties below. Define

H0=1+i2(111−1),S=diag⁡(1,i),Z(θ)=diag⁡(1,eiθ).H_0=\frac{1+i}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}, \qquad S=\operatorname{diag}(1,i), \qquad Z(\theta)=\operatorname{diag}(1,e^{i\theta}).H0​=21+i​(11​1−1​),S=diag(1,i),Z(θ)=diag(1,eiθ).

Let C\mathcal CC consist of all finite products of H0,S,H0∗,S∗H_0,S,H_0^*,S^*H0​,S,H0∗​,S∗, including the empty product, and let GnG_nGn​ consist of all finite products of elements of C\mathcal CC, Z(π/n)Z(\pi/n)Z(π/n), and Z(π/n)∗Z(\pi/n)^*Z(π/n)∗. Here LLL is a finite list of pairs (p,a)(p,a)(p,a), with ppp one of the three coordinates X,Y,ZX,Y,ZX,Y,Z and aaa a natural number, and CCC is a complex 2×22\times22×2 matrix. Every pair in LLL satisfies 1≤a<⌊n/2⌋1\le a<\lfloor n/2\rfloor1≤a<⌊n/2⌋; successive pairs have different coordinates; some real ϕ\phiϕ satisfies eiϕC∈Ce^{i\phi}C\in\mathcal CeiϕC∈C; and

U=(∏(p,a) in L[1+eiaπ/n2I+1−eiaπ/n2 σp])C,U=\left(\prod_{(p,a)\text{ in }L} \left[\frac{1+e^{ia\pi/n}}2 I+ \frac{1-e^{ia\pi/n}}2\,\sigma_p\right]\right)C,U=​(p,a) in L∏​[21+eiaπ/n​I+21−eiaπ/n​σp​]​C,

with factors multiplied in list order, where σX=(0110)\sigma_X=\begin{pmatrix}0&1\\1&0\end{pmatrix}σX​=(01​10​), σY=(0−ii0)\sigma_Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}σY​=(0i​−i0​), and σZ=diag⁡(1,−1)\sigma_Z=\operatorname{diag}(1,-1)σZ​=diag(1,−1). The list may be empty, in which case its product is III; in particular, for n=2n=2n=2, the bound on aaa forces it to be empty.

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

    Confirmed by the moderator at approval.

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