Documentation

CslibFrontier.Foundations.AlgebraicGeometry.EllipticCurve.PointCount

Point counts of Weierstrass curves over finite fields #

Over a finite field F of odd characteristic, completing the square turns the equation of a Weierstrass curve W into Y² = g(X) with the monic cubic g = X³ + (b₂/4) X² + (b₄/2) X + b₆/4. The fibre of the affine curve over x then has 1 + χ(g(x)) points, where χ is the quadratic character of F, and summing over x gives #E(F) = q + 1 + ∑ₓ χ(g(x)) for q = #F.

Main definitions #

Main results #

References #

Finiteness and the point count #

The points of a Weierstrass curve over a finite ring form a finite type.

The number of points is one (the point at infinity) plus the number of nonsingular affine points.

theorem WeierstrassCurve.Affine.natCard_point_eq_one_add_equation {R : Type u_1} [CommRing R] [Finite R] (W : Affine R) (hΔ : Δ W ≠ 0) :
Nat.card W.Point = 1 + Nat.card { xy : R × R // W.Equation xy.1 xy.2 }

For Δ ≠ 0, the number of points is one plus the number of affine solutions of the Weierstrass equation.

Curves Y² = g(X) for a monic cubic g #

noncomputable def WeierstrassCurve.cubicPoly {R : Type u_1} [CommRing R] (α β γ : R) :

The monic cubic X³ + α X² + β X + γ.

def WeierstrassCurve.ofCubic {R : Type u_1} [CommRing R] (α β γ : R) :

The Weierstrass curve Y² = X³ + α X² + β X + γ.

Instances For
    @[simp]
    theorem WeierstrassCurve.ofCubic_a₁ {R : Type u_1} [CommRing R] (α β γ : R) :
    (ofCubic α β γ).a₁ = 0
    @[simp]
    theorem WeierstrassCurve.ofCubic_a₂ {R : Type u_1} [CommRing R] (α β γ : R) :
    (ofCubic α β γ).a₂ = α
    @[simp]
    theorem WeierstrassCurve.ofCubic_a₃ {R : Type u_1} [CommRing R] (α β γ : R) :
    (ofCubic α β γ).a₃ = 0
    @[simp]
    theorem WeierstrassCurve.ofCubic_a₄ {R : Type u_1} [CommRing R] (α β γ : R) :
    (ofCubic α β γ).a₄ = β
    @[simp]
    theorem WeierstrassCurve.ofCubic_a₆ {R : Type u_1} [CommRing R] (α β γ : R) :
    (ofCubic α β γ).a₆ = γ
    theorem WeierstrassCurve.eval_cubicPoly {R : Type u_1} [CommRing R] (α β γ x : R) :
    Polynomial.eval x (cubicPoly α β γ) = x ^ 3 + α * x ^ 2 + β * x + γ
    theorem WeierstrassCurve.monic_cubicPoly {R : Type u_1} [CommRing R] (α β γ : R) :
    (cubicPoly α β γ).Monic
    theorem WeierstrassCurve.natDegree_cubicPoly {R : Type u_1} [CommRing R] (α β γ : R) [Nontrivial R] :
    (cubicPoly α β γ).natDegree = 3
    theorem WeierstrassCurve.cubicPoly_ne_zero {R : Type u_1} [CommRing R] (α β γ : R) [Nontrivial R] :
    cubicPoly α β γ ≠ 0
    noncomputable def WeierstrassCurve.cubicCharSum {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] (α β γ : F) :

    The character sum ∑ₓ χ(x³ + α x² + β x + γ) of the quadratic character χ of F.

    Completing the square #

    theorem WeierstrassCurve.Δ_ofCubic {F : Type u_1} [Field F] (W : WeierstrassCurve F) (h2 : 2 ≠ 0) :
    (ofCubic (W.b₂ / 4) (W.b₄ / 2) (W.b₆ / 4)).Δ = W.Δ

    Completing the square preserves the discriminant: when 2 ≠ 0, the curve Y² = X³ + (b₂/4) X² + (b₄/2) X + b₆/4 has the discriminant of W.

    theorem WeierstrassCurve.equation_iff_sq_eq {F : Type u_1} [Field F] (W : WeierstrassCurve F) (h2 : 2 ≠ 0) (x y : F) :
    W.toAffine.Equation x y ↔ (2 * y + W.a₁ * x + W.a₃) ^ 2 = 4 * Polynomial.eval x (cubicPoly (W.b₂ / 4) (W.b₄ / 2) (W.b₆ / 4))

    Completing the square: W.Equation x y ↔ (2y + a₁x + a₃)² = 4 g(x) with g = X³ + (b₂/4) X² + (b₄/2) X + b₆/4.

    The point count #

    theorem WeierstrassCurve.natCard_fiber {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] (hF : ringChar F ≠ 2) (W : WeierstrassCurve F) (x : F) :
    ↑(Nat.card { y : F // W.toAffine.Equation x y }) = 1 + (quadraticChar F) (Polynomial.eval x (cubicPoly (W.b₂ / 4) (W.b₄ / 2) (W.b₆ / 4)))

    The fibre of the affine curve over x has 1 + χ(g(x)) points, where g = X³ + (b₂/4) X² + (b₄/2) X + b₆/4.

    theorem WeierstrassCurve.natCard_equation {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] (hF : ringChar F ≠ 2) (W : WeierstrassCurve F) :
    ↑(Nat.card { xy : F × F // W.toAffine.Equation xy.1 xy.2 }) = ↑(Fintype.card F) + cubicCharSum (W.b₂ / 4) (W.b₄ / 2) (W.b₆ / 4)

    The number of affine solutions of the Weierstrass equation is q + ∑ₓ χ(g(x)).

    theorem WeierstrassCurve.natCard_point_eq {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] (hF : ringChar F ≠ 2) (W : WeierstrassCurve F) [W.IsElliptic] :
    ↑(Nat.card W.toAffine.Point) = ↑(Fintype.card F) + 1 + cubicCharSum (W.b₂ / 4) (W.b₄ / 2) (W.b₆ / 4)

    Point count. An elliptic curve over a finite field F of odd characteristic has q + 1 + ∑ₓ χ(g(x)) points, where g = X³ + (b₂/4) X² + (b₄/2) X + b₆/4.

    Over ZMod 2 every Weierstrass curve has between 1 and 5 points.