Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Coprime normalized trigonometric numerators

Open
QAlgorithms.Papers.Independent.Intakenext100.P03.normalized_numerators

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).

Write n=2ksn=2^ksn=2ks with k≥1k\ge1k≥1 and positive odd sss. Define qa=2k−1−2k−jq_a=2^{k-1}-2^{k-j}qa​=2k−1−2k−j if n/gcd⁡(a,n)=2jn/\gcd(a,n)=2^jn/gcd(a,n)=2j, and qa=2k−1q_a=2^{k-1}qa​=2k−1 otherwise. Set α=21/2k−1\alpha=2^{1/2^{k-1}}α=21/2k−1 and β=2\beta=2β=2 for k=1k=1k=1, β=2cos⁡(π/2k)\beta=2\cos(\pi/2^k)β=2cos(π/2k) for k≥2k\ge2k≥2. For 1≤a<n/21\le a<n/21≤a<n/2, set ca=αqacos⁡(πa/n)c_a=\alpha^{q_a}\cos(\pi a/n)ca​=αqa​cos(πa/n) and sa=αqasin⁡(πa/n)s_a=\alpha^{q_a}\sin(\pi a/n)sa​=αqa​sin(πa/n), equivalently the piecewise normalization (32). Let K=Q({ca,sa:1≤a<n/2},α)K=\mathbb Q(\{c_a,s_a:1\le a<n/2\},\alpha)K=Q({ca​,sa​:1≤a<n/2},α) and OK\mathcal O_KOK​ be its ring of integers. Then

ca,sa∈OK,caOK+αOK=saOK+αOK=OK.c_a,s_a\in\mathcal O_K,\qquad c_a\mathcal O_K+\alpha\mathcal O_K=s_a\mathcal O_K+\alpha\mathcal O_K=\mathcal O_K.ca​,sa​∈OK​,ca​OK​+αOK​=sa​OK​+αOK​=OK​.

If n/gcd⁡(a,n)n/\gcd(a,n)n/gcd(a,n) is a power of two, then also ca,sa∈OK×c_a,s_a\in\mathcal O_K^\timesca​,sa​∈OK×​. Units and coprimality are taken in this ring of integers. These numerators control denominator cancellation.

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 6.1, PDF pp.15-16: integrality, coprimality and the conditional
unit assertion in O_K. The normalization is equation (32), equivalently (33). -/
theorem normalized_numerators (n k s : ℕ) (hk : 1 ≤ k) (hs : 0 < s)
    (hodd : Odd s) (hfactor : n = 2 ^ k * s)
    (a : ℕ) (ha : 1 ≤ a) (halt : a < n / 2) :
    InIntegers (numeratorField n k) (cosineNumerator n k a) ∧
    InIntegers (numeratorField n k) (sineNumerator n k a) ∧
    IntegerCoprime (numeratorField n k) (cosineNumerator n k a) (denominatorAlpha k) ∧
    IntegerCoprime (numeratorField n k) (sineNumerator n k a) (denominatorAlpha k) ∧
    (IsTwoPower (n / Nat.gcd a n) →
      IntegerUnit (numeratorField n k) (cosineNumerator n k a) ∧
      IntegerUnit (numeratorField n k) (sineNumerator n k a)) := 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. 15, Lemma 6.1
Read-back

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

For all natural numbers n,k,sn,k,sn,k,s satisfying k≥1k\ge1k≥1, s>0s>0s>0, sss odd, and n=2ksn=2^k sn=2ks, and every natural number aaa satisfying 1≤a<⌊n/2⌋1\le a<\lfloor n/2\rfloor1≤a<⌊n/2⌋, define

αk=2 1/2k−1,W(c)={2k−1−2 k−log⁡2 ⁣(n/gcd⁡(c,n)),n/gcd⁡(c,n)=2j for some j∈N,2k−1,otherwise,\alpha_k=2^{\,1/2^{k-1}},\qquad W(c)= \begin{cases} 2^{k-1}-2^{\,k-\log_2\!\left(n/\gcd(c,n)\right)}, & n/\gcd(c,n)=2^j\text{ for some }j\in\mathbb N,\\ 2^{k-1},&\text{otherwise}, \end{cases}αk​=21/2k−1,W(c)={2k−1−2k−log2​(n/gcd(c,n)),2k−1,​n/gcd(c,n)=2j for some j∈N,otherwise,​

where log⁡2\log_2log2​ in this formula is the natural-number logarithm and all natural-number subtractions, including the outer subtraction, are truncated at zero. The power-of-two condition includes 20=12^0=120=1. Put Cc=αkW(c)cos⁡(πc/n)C_c=\alpha_k^{W(c)}\cos(\pi c/n)Cc​=αkW(c)​cos(πc/n) and Sc=αkW(c)sin⁡(πc/n)S_c=\alpha_k^{W(c)}\sin(\pi c/n)Sc​=αkW(c)​sin(πc/n), regarded as complex numbers, and let FFF be the smallest subfield of C\mathbb CC containing αk\alpha_kαk​ and every Cc,ScC_c,S_cCc​,Sc​ with 1≤c<⌊n/2⌋1\le c<\lfloor n/2\rfloor1≤c<⌊n/2⌋. Let OF={z∈F:z is integral over Z}\mathcal O_F=\{z\in F:z\text{ is integral over }\mathbb Z\}OF​={z∈F:z is integral over Z}. Then Ca,Sa∈OFC_a,S_a\in\mathcal O_FCa​,Sa​∈OF​; there exist uC,vC,uS,vS∈OFu_C,v_C,u_S,v_S\in\mathcal O_FuC​,vC​,uS​,vS​∈OF​, with αk∈OF\alpha_k\in\mathcal O_Fαk​∈OF​, such that

uCCa+vCαk=1,uSSa+vSαk=1.u_C C_a+v_C\alpha_k=1, \qquad u_S S_a+v_S\alpha_k=1.uC​Ca​+vC​αk​=1,uS​Sa​+vS​αk​=1.

Furthermore, if n/gcd⁡(a,n)n/\gcd(a,n)n/gcd(a,n) is a power of two, then there exist rC,rS∈OFr_C,r_S\in\mathcal O_FrC​,rS​∈OF​ with CarC=1C_a r_C=1Ca​rC​=1 and SarS=1S_a r_S=1Sa​rS​=1. The assertion is conditional on an aaa in the stated range; in particular, when n=2n=2n=2, that range is 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