Skip to main content
KetQat

Appearance

Proof · intermediate

Proof that factoring reduces to order finding

A nontrivial square root of 1 gives a factor by a gcd. Failure forces the 2-adic valuations of the orders modulo each prime-power factor to coincide, and by the Chinese remainder theorem and cyclicity each valuation takes any given value with probability at most 1/2, independently.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Two standard facts from elementary number theory are used (Appendix 4 of Nielsen and Chuang): the Chinese remainder theorem, by which a↦(a mod p1α1,…,a mod pmαm)a \mapsto (a \bmod p_1^{\alpha_1}, \dots, a \bmod p_m^{\alpha_m}) is a group isomorphism ZN∗≅Zp1α1∗×⋯×Zpmαm∗\Z_N^\ast \cong \Z_{p_1^{\alpha_1}}^\ast \times \cdots \times \Z_{p_m^{\alpha_m}}^\ast; and the fact that for an odd prime pp the group Zpα∗\Z_{p^\alpha}^\ast is cyclic, of order φ(pα)=pα−1(p−1)\varphi(p^\alpha) = p^{\alpha-1}(p-1).

The gcd step. Suppose rr is even and b=ar/2≢−1b = a^{r/2} \not\equiv -1. Also b≢1b \not\equiv 1, since r/2<rr/2 < r and rr is the least exponent with ar≡1a^r \equiv 1. Then N∣b2−1=(b−1)(b+1)N \mid b^2 - 1 = (b-1)(b+1) while N∤b−1N \nmid b - 1 and N∤b+1N \nmid b + 1. So NN shares a factor with b−1b - 1 but is not contained in it: 1<gcd⁡(b−1,N)<N1 < \gcd(b-1, N) < N, and likewise for b+1b + 1.

Failure forces equal valuations. Let rjr_j be the order of aa modulo pjαjp_j^{\alpha_j}, so that r=lcm⁡(r1,…,rm)r = \operatorname{lcm}(r_1, \dots, r_m), and let djd_j be the exponent of the largest power of 2 dividing rjr_j; let dd be that of rr, so d=max⁡jdjd = \max_j d_j. The procedure fails when rr is odd or ar/2≡−1a^{r/2} \equiv -1.

  • If rr is odd, every rjr_j is odd and d1=⋯=dm=0d_1 = \dots = d_m = 0.
  • If rr is even and ar/2≡−1(modN)a^{r/2} \equiv -1 \pmod N, then ar/2≡−1≢1a^{r/2} \equiv -1 \not\equiv 1 modulo each pjαjp_j^{\alpha_j} (as pjp_j is odd), so rj∤r/2r_j \nmid r/2. Since rj∣rr_j \mid r, this means rjr_j contains the full power 2d2^{d}, i.e. dj=dd_j = d for every jj.

In both cases all djd_j are equal.

Each valuation is spread out. By the Chinese remainder theorem, aa uniform on ZN∗\Z_N^\ast means that the components aj=a mod pjαja_j = a \bmod p_j^{\alpha_j} are independent and uniform on Zpjαj∗\Z_{p_j^{\alpha_j}}^\ast, and djd_j depends only on aja_j. Fix jj, let gg be a generator of the cyclic group Zpjαj∗\Z_{p_j^{\alpha_j}}^\ast of order φj\varphi_j, and let 2D2^{D} be the largest power of 2 dividing φj\varphi_j; D≥1D \ge 1 because pj−1p_j - 1 is even. The element gkg^{k} has order φj/gcd⁡(k,φj)\varphi_j/\gcd(k, \varphi_j), whose 2-adic exponent is DD when kk is odd and less than DD when kk is even. As kk ranges uniformly over {0,…,φj−1}\{0, \dots, \varphi_j - 1\} exactly half the values are odd, so Pr⁡[dj=D]=1/2\Pr[d_j = D] = 1/2 and consequently Pr⁡[dj=c]≤1/2\Pr[d_j = c] \le 1/2 for every value cc.

Conclusion. Conditioning on a1a_1 and using independence,

Pr⁡[failure]≤Pr⁡[d2=d1,…,dm=d1]=Ea1[∏j=2mPr⁡[dj=d1∣a1]]≤12m−1.\Pr[\text{failure}] \le \Pr[d_2 = d_1, \dots, d_m = d_1] = \mathbb{E}_{a_1}\Big[\prod_{j=2}^{m}\Pr[d_j = d_1 \mid a_1]\Big] \le \frac{1}{2^{m-1}} .

For m≥2m \ge 2 this is at most 1/21/2. The structure of the argument follows the proof of Theorem 5.3 in Nielsen and Chuang; counting the conditioning on d1d_1 explicitly gives the exponent m−1m - 1.

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Every step re-derived: gcd step from b^2 = 1 with b not +-1; failure forces equal 2-adic valuations of the r_j (both cases); for a generator g of the cyclic group Z*_{p^alpha} (odd p), g^k has full 2-adic order exactly when k is odd, so each valuation value has probability at most 1/2; CRT independence gives 1/2^(m-1). Numerical check: exhaustive enumeration over all odd N < 1200 with m >= 2 confirmed the bound with minimum 1/2 at N = 21. Bound and its corrected exponent compared with arXiv:2308.05047, Appendix eq. (A26). Nielsen-Chuang Appendix 4 (A4.3 Reduction of factoring to order-finding) confirmed in the publisher's table of contents.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision 39760c451e2d9ba1. Source file knowledge/records/proof/factoring-reduces-to-order-finding.md in the content repository (readable there once it is public).