At least half of the square roots of mod are
ProvedGNFS.card_sqrt_ne_pm_ge_halfinteger-factorizationnumber-theory
Let be an odd natural number with at least two distinct prime factors, and let be a unit of . Let
Then
So if is a uniformly random square root of modulo , then with probability at least we have , and is a nontrivial factor of .
Formalization Note The hypotheses (odd, at least two distinct prime factors, a unit) are the standard setting of the source's "probability at least " claim. The conclusion fails for prime powers, e.g. .
Preamble
import Mathlib import Definitions.Def_GNFS_defs open Polynomial IntermediateField
Formal statement
namespace GNFS
theorem card_sqrt_ne_pm_ge_half (n : ℕ) [NeZero n] (hodd : Odd n)
(hk : 2 ≤ n.primeFactors.card) (x : ZMod n) (hx : IsUnit x) :
(Finset.univ.filter fun y : ZMod n => y ^ 2 = x ^ 2).card ≤
2 * (Finset.univ.filter fun y : ZMod n => y ^ 2 = x ^ 2 ∧ y ≠ x ∧ y ≠ -x).card := by sorry
end GNFSSource
Wikipedia, "General number field sieve" (revision oldid=1377718368, https://en.wikipedia.org/w/index.php?title=General_number_field_sieve&oldid=1377718368), section 'Method — Postprocessing'
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.