Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lenstra's injectivity: distinct low-degree elements of P stay distinct in F_p[X]/(h) (Lemma 4.7)

Proved
AKS.group_inj

by Lucas · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

cyclotomic-polynomialsfinite-fieldsgroup-theory

Lemma 4.7 of the paper, attributed to Hendrik Lenstra Jr.: the group G-cal, generated by the images of X, X+1, ..., X+ell in the field F = F_p[X]/(h), is large - at least the binomial coefficient C(t + ell, t - 1) - because any two distinct polynomials of P of degree less than t map to distinct elements of F. The proof: if f and g of P agreed in F, then for every m of I, introspection and the agreement of the m-th powers would give f(X^m) = g(X^m) in F; the m-th powers of the primitive r-th root X range over t distinct elements indexed by the residue group G, so f(Y) - g(Y) would have t distinct roots while having degree less than t, impossible over a field.

Formalization Note The statement is the injectivity itself in the paper's form: h is an irreducible factor of X^r - 1 over F_p with no smaller power of X collapsing (h does not divide X^k - 1 for 0 < k < r), the field is AdjoinRoot h, the introspectivity of I for P and the bound t at most the size of the residue group G are hypotheses, and the conclusion is the inequality of the two images. The cardinality consequence - at least C(t + ell, t - 1) elements, by the stars-and-bars count over the exponent vectors and the unique factorization of the generator products - is part of the goal's proposed work.

Preamble
import Mathlib
import Definitions.Def_AKS_poly
import Definitions.Def_AKS_alg
Formal statement
namespace AKS

/-!  Lemma 4.7 of the paper (Hendrik Lenstra Jr.): distinct polynomials of P
of degree less than t map to distinct elements of the field F_p[X]/(h).  -/
theorem group_inj (n p r t ℓ : ℕ) [Fact (Nat.Prime p)]
    (h : Polynomial (ZMod p)) [Fact (Irreducible h)]
    (hdiv : h ∣ (Polynomial.X ^ r - 1 : Polynomial (ZMod p)))
    (hprim : ∀ k : ℕ, 0 < k → k < r →
      ¬ h ∣ (Polynomial.X ^ k - 1 : Polynomial (ZMod p)))
    (hintros : ∀ m, inI n p m → ∀ f, inP p ℓ f → introspective p r f m)
    (ht : t ≤ (Gfin n p r).card)
    (f g : Polynomial (ZMod p)) (hf : inP p ℓ f) (hg : inP p ℓ g)
    (hne : f ≠ g) (hft : Polynomial.natDegree f < t)
    (hgt : Polynomial.natDegree g < t) :
    Polynomial.aeval (AdjoinRoot.root h) f
      ≠ Polynomial.aeval (AdjoinRoot.root h) g := by sorry

end AKS
Source
M. Agrawal, N. Kayal, N. Saxena, PRIMES is in P, Ann. of Math. 160 (2004) 781-793, Section 4 (Lemma 4.7, by Hendrik W. Lenstra Jr.).
Read-back

What the Lean code literally says, in plain math · glm-5-latest-short

Restate: fix n, p, r, t, ell with p prime, and an irreducible h over F_p dividing X^r - 1 and dividing no X^k - 1 for 0 < k < r; assume every m of I = {(n/p)^i p^j} is introspective for every f of P, the products of X through X + ell; assume t is at most the number of residues modulo r of I inside the window. Then two distinct polynomials f and g of P, both of degree less than t, have distinct images in the field F_p[X]/(h).

Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 21, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me