Lemma 5.7 — the -gcd keeps a common root modulo
ProvedPolyEvalDS.LargeChar.Supplement.lemma_5_7Let be an integer and let be polynomials of degree at most with every coefficient in , where . Let divide . Let be a prime with
and suppose some satisfies , that is, the reductions of and modulo both vanish at . Then
The greatest common divisor is taken in , where it is determined up to sign; the conclusion holds for either choice.
This lemma says that taking gcds over among such small polynomials does not lose a common root modulo a large prime. Iterating it over all small polynomials vanishing at gives Corollary 5.8.
Formalization Note The reduction modulo is Polynomial.map (Int.castRingHom (ZMod p)) followed by evaluation at b : ZMod p. The conclusion is stated for every that is a common divisor of and and is divisible by every common divisor of and , i.e. for every gcd.
Differences from the source:
- generalization: d the degree bound of §5, a positive integer → d : ℕ, so d = 0 is included; reason: the statement at d = 0 is the same claim for constant polynomials and is true; for d ≥ 1 the Lean statement is exactly the source's
- encoding: b ∈ F_p, p a prime → p : ℕ with hp : p.Prime and b : ZMod p; reason: ZMod p is the field F_p for p prime
- encoding: q(b) ≡ 0 mod p for q ∈ ℤ[X] and b ∈ F_p → (q.map (Int.castRingHom (ZMod p))).eval b = 0; reason: reducing the coefficients mod p and evaluating at b in ZMod p is the meaning of the congruence
- encoding: gcd_{ℤ[X]}(h, g)(b) ≡ 0 mod p → for every c ∈ ℤ[X] with c ∣ h, c ∣ g and every common divisor of h and g dividing c, (c.map (Int.castRingHom (ZMod p))).eval b = 0; reason: the gcd in the UFD ℤ[X] exists and is determined up to the units ±1, which do not change whether it vanishes at b; quantifying over every gcd avoids choosing a normalization
- encoding: (d+1)^{3d/2} → ((d:ℝ)+1) ^ ((3*(d:ℝ))/2), a real power; reason: 3d/2 is not an integer for odd d; the real power is the printed value
import Mathlib open Polynomial
namespace PolyEvalDS.LargeChar.Supplement
/-- Lemma 5.7, p. 12 (Okada, Player, Pohmann, STOC 2027 submission #463, October 2026).
Let `f, g ∈ ℤ[X]`, `f ≠ 0`, have coefficients in `{-1, 0, 1}` and degree at most `d`, and let
`h ∈ ℤ[X]` divide `f`. If `p` is a prime with `p > (d + 1)^(3d/2)` and `h(b) ≡ g(b) ≡ 0 mod p`
for some `b ∈ F_p`, then `gcd_{ℤ[X]}(h, g)(b) ≡ 0 mod p`.
Reduction mod `p` is `Polynomial.map (Int.castRingHom (ZMod p))`. The gcd in `ℤ[X]` is determined
up to sign; the conclusion is stated for every gcd `c` of `h` and `g`, i.e. every common divisor
of `h` and `g` that every common divisor of `h` and `g` divides. -/
theorem lemma_5_7 (p d : ℕ) (hp : p.Prime) (f g h : ℤ[X]) (hf0 : f ≠ 0)
(hf_deg : f.natDegree ≤ d) (hg_deg : g.natDegree ≤ d)
(hf_coeff : ∀ i, f.coeff i ∈ ({-1, 0, 1} : Set ℤ))
(hg_coeff : ∀ i, g.coeff i ∈ ({-1, 0, 1} : Set ℤ))
(hhf : h ∣ f) (b : ZMod p)
(hhb : (h.map (Int.castRingHom (ZMod p))).eval b = 0)
(hgb : (g.map (Int.castRingHom (ZMod p))).eval b = 0)
(hpd : ((d : ℝ) + 1) ^ ((3 * (d : ℝ)) / 2) < (p : ℝ)) :
∀ c : ℤ[X], c ∣ h → c ∣ g → (∀ e : ℤ[X], e ∣ h → e ∣ g → e ∣ c) →
(c.map (Int.castRingHom (ZMod p))).eval b = 0 := by sorry
end PolyEvalDS.LargeChar.Supplement