Classical reduction: when the order is even
ProvedShorWiki.dvd_pow_half_sub_one_mul_add_onequantum-computingshor-algorithm
Let with , and let be the order of modulo . If is even, then
This is the difference-of-squares factorisation of , on which the classical reduction of factoring to order finding rests.
Formalization Note The statement is in natural numbers; since , involves no truncated subtraction.
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem dvd_pow_half_sub_one_mul_add_one (N a : ℕ) (ha : 1 < a) (haN : a < N)
(hcop : Nat.Coprime a N) (heven : Even (ord N a)) :
N ∣ (a ^ (ord N a / 2) - 1) * (a ^ (ord N a / 2) + 1) := 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)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.