Classical reduction: are nontrivial factors when
ProvedShorWiki.gcd_pow_half_nontrivialquantum-computingshor-algorithm
Let with and let . Suppose is even and . Then both
are nontrivial factors of :
This is the success criterion of Shor's algorithm: an even order with splits by a single gcd computation.
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem gcd_pow_half_nontrivial (N a : ℕ) (ha : 1 < a) (haN : a < N)
(hcop : Nat.Coprime a N) (heven : Even (ord N a))
(hndvd : ¬ N ∣ a ^ (ord N a / 2) + 1) :
(1 < Nat.gcd N (a ^ (ord N a / 2) - 1) ∧ Nat.gcd N (a ^ (ord N a / 2) - 1) < N) ∧
(1 < Nat.gcd N (a ^ (ord N a / 2) + 1) ∧ Nat.gcd N (a ^ (ord N a / 2) + 1) < N) := 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 "Classical reduction" (PDF p. 3) and restated algorithm, step 6
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.