§5, p. 1498 — the order of x mod n is the lcm of its orders mod the prime powers p_i^{α_i}
ProvedShorAlgorithms.Reduction.orderOf_eq_lcmchinese-remainder-theoremnumber-theoryorder-findingp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1
Let be the prime factorization of , let be a unit modulo with order , and let be the order of . Then
This reduces questions about the order modulo to the orders modulo the prime powers, where the unit groups are cyclic when is odd.
Formalization Note The are localOrder n u p for p ∈ n.primeFactors, and the lcm is Finset.lcm over n.primeFactors (equal to when ). The hypothesis replaces Shor's standing " odd"; oddness is not needed here, while must be excluded because ZMod 0 is .
Preamble
import Mathlib import Definitions.Def_ShorAlgorithms_Reduction_localOrder
Formal statement
namespace ShorAlgorithms.Reduction
/-- Shor (1997), §5, p. 1498: with `n = ∏ p_i^{α_i}` and `r_i` the order of `x (mod p_i^{α_i})`,
the order `r` of `x (mod n)` is the least common multiple of all the `r_i`. -/
theorem orderOf_eq_lcm (n : ℕ) (hn : 0 < n) (u : (ZMod n)ˣ) :
orderOf u = n.primeFactors.lcm (localOrder n u) := by sorry
end ShorAlgorithms.Reduction
Source
Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM J. Comput. 26(5) (1997), p. 1498, §5, "Suppose that n = ∏_{i=1}^k p_i^{α_i} is the prime factorization of n. Let r_i be the order of x (mod p_i^{α_i}). Then r is the least common multiple of all the r_i."
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.