Documentation

Mathlib.AlgebraicGeometry.EllipticCurve.Projective.Point

Nonsingular points and the group law in projective coordinates #

Let W be a Weierstrass curve over a field F. The nonsingular projective points of W can be endowed with an group law, which is uniquely determined by the formulae in Mathlib/AlgebraicGeometry/EllipticCurve/Projective/Formula.lean and follows from an equivalence with the nonsingular points W⟮F⟯ in affine coordinates.

This file defines the group law on nonsingular projective points.

Main definitions #

Main statements #

Implementation notes #

Note that W(X, Y, Z) and its partial derivatives are independent of the point representative, and the nonsingularity condition already implies (x, y, z) ≠ (0, 0, 0), so a nonsingular projective point on W can be given by [x : y : z] and the nonsingular condition on any representative.

A nonsingular projective point representative can be converted to a nonsingular point in affine coordinates using WeiestrassCurve.Projective.Point.toAffine, which lifts to a map on nonsingular projective points using WeiestrassCurve.Projective.Point.toAffineLift. Conversely, a nonsingular point in affine coordinates can be converted to a nonsingular projective point using WeierstrassCurve.Projective.Point.fromAffine or WeierstrassCurve.Affine.Point.toProjective.

Whenever possible, all changes to documentation and naming of definitions and theorems should be mirrored in Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian/Point.lean.

References #

[J Silverman, The Arithmetic of Elliptic Curves][silverman2009]

Tags #

elliptic curve, projective, point, group law

Negation on projective point representatives #

def WeierstrassCurve.Projective.neg {R : Type r} [CommRing R] (W' : Projective R) (P : Fin 3R) :
Fin 3R

The negation of a projective point representative on a Weierstrass curve.

Equations
theorem WeierstrassCurve.Projective.neg_X {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.neg P 0 = P 0
theorem WeierstrassCurve.Projective.neg_Y {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.neg P 1 = W'.negY P
theorem WeierstrassCurve.Projective.neg_Z {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.neg P 2 = P 2
theorem WeierstrassCurve.Projective.neg_smul {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) (u : R) :
W'.neg (u P) = u W'.neg P
theorem WeierstrassCurve.Projective.neg_smul_equiv {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) {u : R} (hu : IsUnit u) :
W'.neg (u P) W'.neg P
theorem WeierstrassCurve.Projective.neg_equiv {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : P Q) :
W'.neg P W'.neg Q
theorem WeierstrassCurve.Projective.neg_of_Z_eq_zero {R : Type r} [CommRing R] {W' : Projective R} [NoZeroDivisors R] {P : Fin 3R} (hP : W'.Equation P) (hPz : P 2 = 0) :
W'.neg P = -P 1 ![0, 1, 0]
theorem WeierstrassCurve.Projective.neg_of_Z_ne_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hPz : P 2 0) :
W.neg P = P 2 ![P 0 / P 2, W.toAffine.negY (P 0 / P 2) (P 1 / P 2), 1]
theorem WeierstrassCurve.Projective.nonsingular_neg {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.Nonsingular P) :
theorem WeierstrassCurve.Projective.addZ_neg {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.addZ P (W'.neg P) = 0
theorem WeierstrassCurve.Projective.addX_neg {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.addX P (W'.neg P) = 0
theorem WeierstrassCurve.Projective.negAddY_neg {R : Type r} [CommRing R] {W' : Projective R} {P : Fin 3R} (hP : W'.Equation P) :
W'.negAddY P (W'.neg P) = W'.dblZ P
theorem WeierstrassCurve.Projective.addY_neg {R : Type r} [CommRing R] {W' : Projective R} {P : Fin 3R} (hP : W'.Equation P) :
W'.addY P (W'.neg P) = -W'.dblZ P
theorem WeierstrassCurve.Projective.addXYZ_neg {R : Type r} [CommRing R] {W' : Projective R} {P : Fin 3R} (hP : W'.Equation P) :
W'.addXYZ P (W'.neg P) = -W'.dblZ P ![0, 1, 0]

The negation of a projective point class on a Weierstrass curve W.

If P is a projective point representative on W, then W.negMap ⟦P⟧ is definitionally equivalent to W.neg P.

Equations
theorem WeierstrassCurve.Projective.negMap_eq {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
theorem WeierstrassCurve.Projective.negMap_of_Z_eq_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.Nonsingular P) (hPz : P 2 = 0) :
theorem WeierstrassCurve.Projective.negMap_of_Z_ne_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hPz : P 2 0) :
W.negMap P = ![P 0 / P 2, W.toAffine.negY (P 0 / P 2) (P 1 / P 2), 1]

Addition on projective point representatives #

noncomputable def WeierstrassCurve.Projective.add {R : Type r} [CommRing R] (W' : Projective R) (P Q : Fin 3R) :
Fin 3R

The addition of two projective point representatives on a Weierstrass curve.

Equations
theorem WeierstrassCurve.Projective.add_of_equiv {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : P Q) :
W'.add P Q = W'.dblXYZ P
theorem WeierstrassCurve.Projective.add_smul_of_equiv {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : P Q) {u v : R} (hu : IsUnit u) (hv : IsUnit v) :
W'.add (u P) (v Q) = u ^ 4 W'.add P Q
theorem WeierstrassCurve.Projective.add_self {R : Type r} [CommRing R] {W' : Projective R} (P : Fin 3R) :
W'.add P P = W'.dblXYZ P
theorem WeierstrassCurve.Projective.add_of_eq {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : P = Q) :
W'.add P Q = W'.dblXYZ P
theorem WeierstrassCurve.Projective.add_of_not_equiv {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : ¬P Q) :
W'.add P Q = W'.addXYZ P Q
theorem WeierstrassCurve.Projective.add_smul_of_not_equiv {R : Type r} [CommRing R] {W' : Projective R} {P Q : Fin 3R} (h : ¬P Q) {u v : R} (hu : IsUnit u) (hv : IsUnit v) :
W'.add (u P) (v Q) = (u * v) ^ 2 W'.add P Q
theorem WeierstrassCurve.Projective.add_smul_equiv {R : Type r} [CommRing R] {W' : Projective R} (P Q : Fin 3R) {u v : R} (hu : IsUnit u) (hv : IsUnit v) :
W'.add (u P) (v Q) W'.add P Q
theorem WeierstrassCurve.Projective.add_equiv {R : Type r} [CommRing R] {W' : Projective R} {P P' Q Q' : Fin 3R} (hP : P P') (hQ : Q Q') :
W'.add P Q W'.add P' Q'
theorem WeierstrassCurve.Projective.add_of_Z_eq_zero {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q) (hPz : P 2 = 0) (hQz : Q 2 = 0) :
W.add P Q = P 1 ^ 4 ![0, 1, 0]
theorem WeierstrassCurve.Projective.add_of_Z_eq_zero_left {R : Type r} [CommRing R] {W' : Projective R} [NoZeroDivisors R] {P Q : Fin 3R} (hP : W'.Equation P) (hPz : P 2 = 0) (hQz : Q 2 0) :
W'.add P Q = (P 1 ^ 2 * Q 2) Q
theorem WeierstrassCurve.Projective.add_of_Z_eq_zero_right {R : Type r} [CommRing R] {W' : Projective R} [NoZeroDivisors R] {P Q : Fin 3R} (hQ : W'.Equation Q) (hPz : P 2 0) (hQz : Q 2 = 0) :
W'.add P Q = -(Q 1 ^ 2 * P 2) P
theorem WeierstrassCurve.Projective.add_of_Y_eq {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Equation P) (hPz : P 2 0) (hQz : Q 2 0) (hx : P 0 * Q 2 = Q 0 * P 2) (hy : P 1 * Q 2 = Q 1 * P 2) (hy' : P 1 * Q 2 = W.negY Q * P 2) :
W.add P Q = W.dblU P ![0, 1, 0]
theorem WeierstrassCurve.Projective.add_of_Y_ne {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P 2 0) (hQz : Q 2 0) (hx : P 0 * Q 2 = Q 0 * P 2) (hy : P 1 * Q 2 Q 1 * P 2) :
W.add P Q = addU P Q ![0, 1, 0]
theorem WeierstrassCurve.Projective.add_of_Y_ne' {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P 2 0) (hQz : Q 2 0) (hx : P 0 * Q 2 = Q 0 * P 2) (hy : P 1 * Q 2 W.negY Q * P 2) :
W.add P Q = W.dblZ P ![W.toAffine.addX (P 0 / P 2) (Q 0 / Q 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), W.toAffine.addY (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), 1]
theorem WeierstrassCurve.Projective.add_of_X_ne {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P 2 0) (hQz : Q 2 0) (hx : P 0 * Q 2 Q 0 * P 2) :
W.add P Q = W.addZ P Q ![W.toAffine.addX (P 0 / P 2) (Q 0 / Q 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), W.toAffine.addY (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), 1]
theorem WeierstrassCurve.Projective.nonsingular_add {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q) :
W.Nonsingular (W.add P Q)
noncomputable def WeierstrassCurve.Projective.addMap {R : Type r} [CommRing R] (W' : Projective R) (P Q : PointClass R) :

The addition of two projective point classes on a Weierstrass curve W.

If P and Q are two projective point representatives on W, then W.addMap ⟦P⟧ ⟦Q⟧ is definitionally equivalent to W.add P Q.

Equations
theorem WeierstrassCurve.Projective.addMap_eq {R : Type r} [CommRing R] {W' : Projective R} (P Q : Fin 3R) :
theorem WeierstrassCurve.Projective.addMap_of_Z_eq_zero_left {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} {Q : PointClass F} (hP : W.Nonsingular P) (hQ : W.NonsingularLift Q) (hPz : P 2 = 0) :
W.addMap P Q = Q
theorem WeierstrassCurve.Projective.addMap_of_Z_eq_zero_right {F : Type u} [Field F] {W : Projective F} {P : PointClass F} {Q : Fin 3F} (hP : W.NonsingularLift P) (hQ : W.Nonsingular Q) (hQz : Q 2 = 0) :
W.addMap P Q = P
theorem WeierstrassCurve.Projective.addMap_of_Y_eq {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Nonsingular P) (hQ : W.Equation Q) (hPz : P 2 0) (hQz : Q 2 0) (hx : P 0 * Q 2 = Q 0 * P 2) (hy' : P 1 * Q 2 = W.negY Q * P 2) :
theorem WeierstrassCurve.Projective.addMap_of_Z_ne_zero {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P 2 0) (hQz : Q 2 0) (hxy : ¬(P 0 * Q 2 = Q 0 * P 2 P 1 * Q 2 = W.negY Q * P 2)) :
W.addMap P Q = ![W.toAffine.addX (P 0 / P 2) (Q 0 / Q 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), W.toAffine.addY (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (W.toAffine.slope (P 0 / P 2) (Q 0 / Q 2) (P 1 / P 2) (Q 1 / Q 2)), 1]

Nonsingular projective points #

A nonsingular projective point on a Weierstrass curve W.

  • point : PointClass R

    The projective point class underlying a nonsingular projective point on W.

  • nonsingular : W'.NonsingularLift self.point

    The nonsingular condition underlying a nonsingular projective point on W.

theorem WeierstrassCurve.Projective.Point.ext_iff {R : Type r} {inst✝ : CommRing R} {W' : Projective R} {x y : W'.Point} :
x = y x.point = y.point
theorem WeierstrassCurve.Projective.Point.ext {R : Type r} {inst✝ : CommRing R} {W' : Projective R} {x y : W'.Point} (point : x.point = y.point) :
x = y
theorem WeierstrassCurve.Projective.Point.mk_point {R : Type r} [CommRing R] {W' : Projective R} {P : PointClass R} (h : W'.NonsingularLift P) :
{ point := P, nonsingular := h }.point = P
theorem WeierstrassCurve.Projective.Point.zero_def {R : Type r} [CommRing R] {W' : Projective R} [Nontrivial R] :
0 = { point := ![0, 1, 0], nonsingular := }
theorem WeierstrassCurve.Projective.Point.mk_ne_zero {R : Type r} [CommRing R] {W' : Projective R} [Nontrivial R] {X Y : R} (h : W'.NonsingularLift ![X, Y, 1]) :
{ point := ![X, Y, 1], nonsingular := h } 0

The natural map from a nonsingular point on a Weierstrass curve in affine coordinates to its corresponding nonsingular projective point.

Equations
theorem WeierstrassCurve.Projective.Point.fromAffine_some {R : Type r} [CommRing R] {W' : Projective R} [Nontrivial R] {X Y : R} (h : W'.toAffine.Nonsingular X Y) :
fromAffine (Affine.Point.some h) = { point := ![X, Y, 1], nonsingular := }
@[deprecated WeierstrassCurve.Projective.Point.fromAffine_some_ne_zero (since := "2025-03-01")]

Alias of WeierstrassCurve.Projective.Point.fromAffine_some_ne_zero.

The negation of a nonsingular projective point on a Weierstrass curve W.

Given a nonsingular projective point P on W, use -P instead of neg P.

Equations
noncomputable def WeierstrassCurve.Projective.Point.add {F : Type u} [Field F] {W : Projective F} (P Q : W.Point) :

The addition of two nonsingular projective points on a Weierstrass curve W.

Given two nonsingular projective points P and Q on W, use P + Q instead of add P Q.

Equations
theorem WeierstrassCurve.Projective.Point.add_def {F : Type u} [Field F] {W : Projective F} (P Q : W.Point) :
P + Q = P.add Q

Equivalence between projective and affine coordinates #

noncomputable def WeierstrassCurve.Projective.Point.toAffine {F : Type u} [Field F] (W : Projective F) (P : Fin 3F) :

The natural map from a nonsingular projective point representative on a Weierstrass curve to its corresponding nonsingular point in affine coordinates.

Equations
theorem WeierstrassCurve.Projective.Point.toAffine_of_Z_eq_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hPz : P 2 = 0) :
toAffine W P = 0
theorem WeierstrassCurve.Projective.Point.toAffine_of_Z_ne_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.Nonsingular P) (hPz : P 2 0) :
theorem WeierstrassCurve.Projective.Point.toAffine_smul {F : Type u} [Field F] {W : Projective F} (P : Fin 3F) {u : F} (hu : IsUnit u) :
toAffine W (u P) = toAffine W P
theorem WeierstrassCurve.Projective.Point.toAffine_of_equiv {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (h : P Q) :
theorem WeierstrassCurve.Projective.Point.toAffine_neg {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.Nonsingular P) :
toAffine W (W.neg P) = -toAffine W P
theorem WeierstrassCurve.Projective.Point.toAffine_add {F : Type u} [Field F] {W : Projective F} {P Q : Fin 3F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q) :
toAffine W (W.add P Q) = toAffine W P + toAffine W Q

The natural map from a nonsingular projective point on a Weierstrass curve W to its corresponding nonsingular point in affine coordinates.

If hP is the nonsingular condition underlying a nonsingular projective point P on W, then toAffineLift ⟨hP⟩ is definitionally equivalent to toAffine W P.

Equations
theorem WeierstrassCurve.Projective.Point.toAffineLift_eq {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.NonsingularLift P) :
{ point := P, nonsingular := hP }.toAffineLift = toAffine W P
theorem WeierstrassCurve.Projective.Point.toAffineLift_of_Z_eq_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} (hP : W.NonsingularLift P) (hPz : P 2 = 0) :
{ point := P, nonsingular := hP }.toAffineLift = 0
theorem WeierstrassCurve.Projective.Point.toAffineLift_of_Z_ne_zero {F : Type u} [Field F] {W : Projective F} {P : Fin 3F} {hP : W.NonsingularLift P} (hPz : P 2 0) :
{ point := P, nonsingular := hP }.toAffineLift = Affine.Point.some
theorem WeierstrassCurve.Projective.Point.toAffineLift_some {F : Type u} [Field F] {W : Projective F} {X Y : F} (h : W.NonsingularLift ![X, Y, 1]) :
{ point := ![X, Y, 1], nonsingular := h }.toAffineLift = Affine.Point.some

The addition-preserving equivalence between the type of nonsingular projective points on a Weierstrass curve W and the type of nonsingular points W⟮F⟯ in affine coordinates.

Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.

Maps and base changes #

@[simp]
theorem WeierstrassCurve.Projective.map_neg {R : Type r} {S : Type s} [CommRing R] [CommRing S] {W' : Projective R} (f : R →+* S) (P : Fin 3R) :
(map W' f).toProjective.neg (f P) = f W'.neg P
@[simp]
theorem WeierstrassCurve.Projective.map_add {F : Type u} {K : Type v} [Field F] [Field K] {W : Projective F} (f : F →+* K) {P Q : Fin 3F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q) :
(map W f).toProjective.add (f P) (f Q) = f W.add P Q
theorem WeierstrassCurve.Projective.baseChange_neg {R : Type r} {S : Type s} {A : Type u} {B : Type v} [CommRing R] [CommRing S] [CommRing A] [CommRing B] {W' : Projective R} [Algebra R S] [Algebra R A] [Algebra S A] [IsScalarTower R S A] [Algebra R B] [Algebra S B] [IsScalarTower R S B] (f : A →ₐ[S] B) (P : Fin 3A) :
(baseChange W' B).toProjective.neg (f P) = f (baseChange W' A).toProjective.neg P
theorem WeierstrassCurve.Projective.baseChange_add {R : Type r} {S : Type s} {F : Type u} {K : Type v} [CommRing R] [CommRing S] [Field F] [Field K] {W' : Projective R} [Algebra R S] [Algebra R F] [Algebra S F] [IsScalarTower R S F] [Algebra R K] [Algebra S K] [IsScalarTower R S K] (f : F →ₐ[S] K) {P Q : Fin 3F} (hP : (baseChange W' F).toProjective.Nonsingular P) (hQ : (baseChange W' F).toProjective.Nonsingular Q) :
(baseChange W' K).toProjective.add (f P) (f Q) = f (baseChange W' F).toProjective.add P Q