Classical reduction: when the order is even
ProvedShorWiki.not_dvd_pow_half_sub_onequantum-computingshor-algorithm
Let with and let . If is even, then
Otherwise , contradicting the minimality of the order . Together with the previous milestone this shows that the only way the reduction can fail for even is .
Formalization Note Natural-number subtraction is harmless here because .
Preamble
import Mathlib import Definitions.Def_ShorWiki_Defs open Matrix Kronecker
Formal statement
namespace ShorWiki
theorem not_dvd_pow_half_sub_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 := 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.