Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4.1 — square roots of h modulo a split separable f

Proved
EllipticRootFinding.Online.lemma_4_1

by Shuze Chen · Nov 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

finite-fieldsnumber-theoryp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

Let FFF be a finite field of characteristic greater than 333, f∈F[X]f \in F[X]f∈F[X] split and separable, and h∈F[X]h \in F[X]h∈F[X].

  1. If h(α)h(\alpha)h(α) is a square in FFF for every root α\alphaα of fff, then there is v∈F[X]v \in F[X]v∈F[X] with deg⁡v<deg⁡f\deg v < \deg fdegv<degf and
v2≡h(modf).v^2 \equiv h \pmod f.v2≡h(modf).
  1. If β∈F\beta \in Fβ∈F is a nonsquare and h(α)h(\alpha)h(α) is a nonsquare for every root α\alphaα of fff, then there is v∈F[X]v \in F[X]v∈F[X] with deg⁡v<deg⁡f\deg v < \deg fdegv<degf and βv2≡h(modf)\beta v^2 \equiv h \pmod fβv2≡h(modf).

The lemma says when the roots of fff can be lifted to points of the curve Y2=h(X)Y^2 = h(X)Y2=h(X) (item 1) or of its quadratic twist (item 2), which is the existence half of Algorithm 2.

Formalization Note. Degrees are Polynomial.degree, so v=0v = 0v=0 when fff is a nonzero constant.

Differences from the source:

  • generalization: h is the right-hand side of the Weierstrass equation Y² = h(X) of §4 → h is an arbitrary polynomial in F[X]; reason: the statement and its interpolation proof never use the shape of h; taking h = X³ + aX + b gives the source's lemma
  • encoding: p a prime greater than 3, q = p^e, Fq (with an Fp-basis and multiplication table when given as input) → an arbitrary finite field F : Type with 3 < ringChar F and q = Fintype.card F; algorithmic items receive q as an integer and no Fp-basis; reason: same fields; the algebraic lemmas require no field presentation, and algorithmic items use the uniform field-operation model without a basis
  • encoding: degree less than deg(f); v(X)² ≡ h(X) mod f(X) → v.degree < f.degree (Polynomial.degree, degree 0 = ⊥); f ∣ v² − h and f ∣ C β · v² − h; reason: same meaning
Preamble
import Mathlib

open Polynomial
Formal statement
namespace EllipticRootFinding.Online

/-- Lemma 4.1 (p. 14), for a split separable `f` over a finite field `F` of characteristic `> 3`
and an arbitrary polynomial `h`. "Degree less than `deg f`" uses `Polynomial.degree`
(`degree 0 = ⊥`), so `v = 0` when `f` is constant. -/
theorem lemma_4_1 (F : Type) [Field F] [Fintype F] (hchar : 3 < ringChar F)
    (f h : F[X]) (hsplit : f.Splits) (hsep : f.Separable) :
    ((∀ α : F, f.IsRoot α → IsSquare (h.eval α)) →
      ∃ v : F[X], v.degree < f.degree ∧ f ∣ v ^ 2 - h) ∧
    (∀ β : F, ¬ IsSquare β →
      (∀ α : F, f.IsRoot α → ¬ IsSquare (h.eval α)) →
      ∃ v : F[X], v.degree < f.degree ∧ f ∣ C β * v ^ 2 - h) := by sorry

end EllipticRootFinding.Online
Source
Spaenlehauer, Deterministic Root-Finding over Finite Fields with Elliptic Curves, arXiv:2610.32508 (version held, sha256 c72ee273…), p. 14, Lemma 4.1
Human review
  • Endorsed by Community (Bot) · Nov 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Nov 10, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me