Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1: integer squared norm equals squared weight

Open
QAlgorithms.Papers.Independent.Intakethird100.P85.integerNorm_weight

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

prove2quantum

Let u∈D[ω]du\in\mathbb D[\omega]^du∈D[ω]d, with d≥0d\ge0d≥0 and D=Z[1/2]\mathbb D=\mathbb Z[1/2]D=Z[1/2]. Write each coordinate uniquely as uj=ajω3+bjω2+cjω+dju_j=a_j\omega^3+b_j\omega^2+c_j\omega+d_juj​=aj​ω3+bj​ω2+cj​ω+dj​, with dyadic real coefficients. Define ∥u∥2=∑j∣uj∣2\|u\|^2=\sum_j|u_j|^2∥u∥2=∑j​∣uj​∣2 and ∥u∥weight2=∑j(aj2+bj2+cj2+dj2)\|u\|_{\mathrm{weight}}^2=\sum_j(a_j^2+b_j^2+c_j^2+d_j^2)∥u∥weight2​=∑j​(aj2​+bj2​+cj2​+dj2​). If ∥u∥2\|u\|^2∥u∥2 is an integer, then

∥u∥weight2=∥u∥2.\|u\|_{\mathrm{weight}}^2=\|u\|^2.∥u∥weight2​=∥u∥2.

The identity relates coefficient weight to the usual complex norm without assuming unit normalization. The empty vector is included.

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 1, PDF p.2: squared weight equals an integer squared norm.
Vectors are presented in their unique dyadic omega-power coordinates. -/
theorem integerNorm_weight (d : ℕ) (a : Fin d → DyadicCoordinates)
    (integerNorm : ∃ m : ℤ, vectorNormSq (fun i => dyadicValue (a i).val) = (m : ℝ)) :
    (∑ i, coordinateWeight (a i).val) = vectorNormSq (fun i => dyadicValue (a i).val) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P85

end
Source
Exact synthesis of multiqubit Clifford+T circuits, arXiv:1212.0506v3, PDF p. 2, Lemma 1: integer squared norm equals squared weight
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. For every natural number ddd and every family of real quadruples ai=(ai0,ai1,ai2,ai3)a_i=(a_{i0},a_{i1},a_{i2},a_{i3})ai​=(ai0​,ai1​,ai2​,ai3​), indexed by 0≤i<d0\le i<d0≤i<d, suppose each coordinate is dyadic: for every i,ji,ji,j, there exist z∈Zz\in\mathbb Zz∈Z and h∈Nh\in\mathbb Nh∈N with aij=z/2ha_{ij}=z/2^haij​=z/2h. If there exists an integer mmm such that

∑i=0d−1∣ai0ω3+ai1ω2+ai2ω+ai3∣2=m,\sum_{i=0}^{d-1}\left|a_{i0}\omega^3+a_{i1}\omega^2+a_{i2}\omega+a_{i3}\right|^2=m,i=0∑d−1​​ai0​ω3+ai1​ω2+ai2​ω+ai3​​2=m,

then

∑i=0d−1∑j=03aij2=∑i=0d−1∣ai0ω3+ai1ω2+ai2ω+ai3∣2.\sum_{i=0}^{d-1}\sum_{j=0}^{3}a_{ij}^2 = \sum_{i=0}^{d-1}\left|a_{i0}\omega^3+a_{i1}\omega^2+a_{i2}\omega+a_{i3}\right|^2.i=0∑d−1​j=0∑3​aij2​=i=0∑d−1​​ai0​ω3+ai1​ω2+ai2​ω+ai3​​2.

The quantifier includes d=0d=0d=0, when both sums are empty and equal to zero.

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