Negation and addition formulae for nonsingular points in projective coordinates #
Let W
be a Weierstrass curve over a field F
. The nonsingular projective points on W
can be
given negation and addition operations defined by an analogue of the secant-and-tangent process in
Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
, but the polynomials involved are
homogeneous, so any instances of division become multiplication in the Z
-coordinate. Most
computational proofs are immediate from their analogous proofs for affine coordinates.
This file defines polynomials associated to negation, doubling, and addition of projective point
representatives. The group operations and the group law on actual nonsingular projective points will
be defined in Mathlib/AlgebraicGeometry/EllipticCurve/Projective/Point.lean
.
Main definitions #
WeierstrassCurve.Projective.negY
: theY
-coordinate of-P
.WeierstrassCurve.Projective.dblZ
: theZ
-coordinate of2 • P
.WeierstrassCurve.Projective.dblX
: theX
-coordinate of2 • P
.WeierstrassCurve.Projective.negDblY
: theY
-coordinate of-(2 • P)
.WeierstrassCurve.Projective.dblY
: theY
-coordinate of2 • P
.WeierstrassCurve.Projective.addZ
: theZ
-coordinate ofP + Q
.WeierstrassCurve.Projective.addX
: theX
-coordinate ofP + Q
.WeierstrassCurve.Projective.negAddY
: theY
-coordinate of-(P + Q)
.WeierstrassCurve.Projective.addY
: theY
-coordinate ofP + Q
.
Implementation notes #
The definitions of WeierstrassCurve.Projective.dblX
, WeierstrassCurve.Projective.negDblY
,
WeierstrassCurve.Projective.addZ
, WeierstrassCurve.Projective.addX
, and
WeierstrassCurve.Projective.negAddY
are given explicitly by large polynomials that are homogeneous
of degree 4
. Clearing the denominators of their corresponding affine rational functions in
Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
would give polynomials that are
homogeneous of degrees 5
, 6
, 6
, 8
, and 8
respectively, so their actual definitions are off
by powers of certain polynomial factors that are homogeneous of degree 1
or 2
. These factors
divide their corresponding affine polynomials only modulo the homogeneous Weierstrass equation, so
their large quotient polynomials are calculated explicitly in a computer algebra system. All of this
is done to ensure that the definitions of both WeierstrassCurve.Projective.dblXYZ
and
WeierstrassCurve.Projective.addXYZ
are homogeneous of degree 4
.
Whenever possible, all changes to documentation and naming of definitions and theorems should be
mirrored in Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian/Formula.lean
.
References #
J Silverman, The Arithmetic of Elliptic Curves
Tags #
elliptic curve, projective, negation, doubling, addition, group law
Negation formulae in projective coordinates #
Doubling formulae in projective coordinates #
The unit associated to a representative of 2 • P
for a projective point representative P
on
a Weierstrass curve W
that is 2
-torsion.
More specifically, the unit u
such that W.add P P = u • ![0, 1, 0]
where P = W.neg P
.
Equations
- W.dblU P = (MvPolynomial.eval P) W.polynomialX ^ 3 / P 2 ^ 2
Instances For
The X
-coordinate of a representative of 2 • P
for a projective point representative P
on a
Weierstrass curve.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Y
-coordinate of a representative of -(2 • P)
for a projective point representative P
on a Weierstrass curve.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Y
-coordinate of a representative of 2 • P
for a projective point representative P
on a
Weierstrass curve.
Instances For
The coordinates of a representative of 2 • P
for a projective point representative P
on a
Weierstrass curve.
Instances For
Addition formulae in projective coordinates #
The unit associated to a representative of P + Q
for two projective point representatives P
and Q
on a Weierstrass curve W
that are not 2
-torsion.
More specifically, the unit u
such that W.add P Q = u • ![0, 1, 0]
where P x / P z = Q x / Q z
but P ≠ W.neg P
.
Instances For
The Z
-coordinate of a representative of P + Q
for two distinct projective point
representatives P
and Q
on a Weierstrass curve.
If the representatives of P
and Q
are equal, then this returns the value 0
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The X
-coordinate of a representative of P + Q
for two distinct projective point
representatives P
and Q
on a Weierstrass curve.
If the representatives of P
and Q
are equal, then this returns the value 0
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Y
-coordinate of a representative of -(P + Q)
for two distinct projective point
representatives P
and Q
on a Weierstrass curve.
If the representatives of P
and Q
are equal, then this returns the value 0
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Y
-coordinate of a representative of P + Q
for two distinct projective point
representatives P
and Q
on a Weierstrass curve.
If the representatives of P
and Q
are equal, then this returns the value 0
.
Instances For
The coordinates of a representative of P + Q
for two distinct projective point representatives
P
and Q
on a Weierstrass curve.
If the representatives of P
and Q
are equal, then this returns the value ![0, 0, 0]
.