Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Every eigenvalue of UUU is an rrr-th root of unity ωrk\omega_r^kωrk​

Proved
ShorWiki.mulModGate_eigenvalue_root_of_unity

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

quantum-computingshor-algorithm

Let 1<a<N1 < a < N1<a<N with gcd⁡(a,N)=1\gcd(a,N)=1gcd(a,N)=1, r=ord⁡N(a)r = \operatorname{ord}_N(a)r=ordN​(a), n=⌈log⁡2N⌉n = \lceil\log_2 N\rceiln=⌈log2​N⌉, and let UUU be the modular-multiplication gate on nnn qubits. If μ∈C\mu \in \mathbb Cμ∈C is an eigenvalue of UUU, then

μ=ωrk=e2πik/rfor some 0≤k<r.\mu = \omega_r^k = e^{2\pi i k / r} \quad \text{for some } 0 \le k < r .μ=ωrk​=e2πik/rfor some 0≤k<r.

The phases that phase estimation can return are therefore exactly the fractions k/rk/rk/r, which is what makes the order rrr visible in the measurement.

Preamble
import Mathlib
import Definitions.Def_ShorWiki_Defs

open Matrix Kronecker
Formal statement
namespace ShorWiki

theorem mulModGate_eigenvalue_root_of_unity (N a : ℕ) (ha : 1 < a) (haN : a < N)
    (hcop : Nat.Coprime a N) (μ : ℂ)
    (hμ : Module.End.HasEigenvalue (Matrix.toLin' (mulModGate N a (regBits N))) μ) :
    ∃ k < ord N a, μ = omega (ord N a) ^ k := by sorry

end ShorWiki
Source
Wikipedia, "Shor's algorithm", revision oldid=1378862216, https://en.wikipedia.org/w/index.php?title=Shor%27s_algorithm&oldid=1378862216, section "Quantum phase estimation" (PDF p. 4)
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · 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