Quadratic twist:
ProvedPrescribedPointCount.natCard_point_add_natCard_point_quadraticTwist_eqLet be an odd prime, let be such that the short Weierstrass curve is nonsingular, and let be a quadratic nonresidue (in particular ). The quadratic twist of by , the curve , then satisfies
Equivalently, the Frobenius traces satisfy , where . This identity is the sign-correction step of the complex multiplication method: a construction that produces a curve of trace is converted into one of trace by twisting, and it reduces existence questions for prescribed traces to one sign at a time.
Formalization Note. Both curves are built with WeierstrassCurve.mk 0 0 0 · ·, i.e. . Nonsingularity of the twist is not assumed: it follows from . The hypothesis ¬ IsSquare d already excludes , since is a square. Point counts are Nat.card ·.toAffine.Point, affine rational points plus the point at infinity.
import Mathlib
namespace PrescribedPointCount
theorem natCard_point_add_natCard_point_quadraticTwist_eq (p : ℕ) [Fact p.Prime] (hp : p ≠ 2)
(a b d : ZMod p) (hd : ¬ IsSquare d)
(hE : (WeierstrassCurve.mk 0 0 0 a b).IsElliptic) :
Nat.card (WeierstrassCurve.mk 0 0 0 a b).toAffine.Point +
Nat.card (WeierstrassCurve.mk 0 0 0 (d ^ 2 * a) (d ^ 3 * b)).toAffine.Point =
2 * (p + 1) := by sorry
end PrescribedPointCountConfirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.