The areas / V28. Algebraic geometry
Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Formula
55 declarations. Mathlib docs · Source
Negation and addition formulae for nonsingular points in affine coordinates
Let W be a Weierstrass curve over a field F with coefficients aᵢ. The nonsingular affine
points on W can be given negation and addition operations defined by a secant-and-tangent process.
-
Given a nonsingular affine point
P, its negation-Pis defined to be the unique third nonsingular point of intersection betweenWand the vertical line throughP. Explicitly, ifPis(x, y), then-Pis(x, -y - a₁x - a₃). -
Given two nonsingular affine points
PandQ, their additionP + Qis defined to be the negation of the unique third nonsingular point of intersection betweenWand the lineLthroughPandQ. Explicitly, letPbe(x₁, y₁)and letQbe(x₂, y₂).- If
x₁ = x₂andy₁ = -y₂ - a₁x₂ - a₃, thenLis vertical. - If
x₁ = x₂andy₁ ≠ -y₂ - a₁x₂ - a₃, thenLis the tangent ofWatP = Q, and has slopeℓ := (3x₁² + 2a₂x₁ + a₄ - a₁y₁) / (2y₁ + a₁x₁ + a₃). - Otherwise
x₁ ≠ x₂, thenLis the secant ofWthroughPandQ, and has slopeℓ := (y₁ - y₂) / (x₁ - x₂).
In the last two cases, the
X-coordinate ofP + Qis then the unique third solution of the equation obtained by substituting the lineY = ℓ(X - x₁) + y₁into the Weierstrass equation, and can be written down explicitly asx := ℓ² + a₁ℓ - a₂ - x₁ - x₂by inspecting the coefficients ofX². TheY-coordinate ofP + Q, after applying the final negation that mapsYto-Y - a₁X - a₃, is preciselyy := -(ℓ(x - x₁) + y₁) - a₁x - a₃. - If
This file defines polynomials associated to negation and addition of nonsingular affine points,
including slopes of non-vertical lines. The actual group law on nonsingular points in affine
coordinates will be defined in Mathlib/AlgebraicGeometry/EllipticCurve/Affine/Point.lean.
Main definitions
WeierstrassCurve.Affine.negY: theY-coordinate of-P.WeierstrassCurve.Affine.addX: theX-coordinate ofP + Q.WeierstrassCurve.Affine.negAddY: theY-coordinate of-(P + Q).WeierstrassCurve.Affine.addY: theY-coordinate ofP + Q.
Main statements
WeierstrassCurve.Affine.equation_neg: negation preserves the Weierstrass equation.WeierstrassCurve.Affine.nonsingular_neg: negation preserves the nonsingular condition.WeierstrassCurve.Affine.equation_add: addition preserves the Weierstrass equation.WeierstrassCurve.Affine.nonsingular_add: addition preserves the nonsingular condition.
References
[J Silverman, The Arithmetic of Elliptic Curves][silverman2009]
Tags
elliptic curve, affine, negation, doubling, addition, group law
Negation formulae in affine coordinates
Slope formulae in affine coordinates
Addition formulae in affine coordinates
Some statements about the numerator and denominator of the x-coordinate of 2*P
We add the explicit formula for the duplication map on the x-coordinate here
(see WeierstrassCurve.Affine.addX_self_of_Y_ne below)
even though this duplicates a small part of the theory of division polynomials.
In this way, we avoid importing all the division polynomial machinery.
We keep the associated API light-weight.
Maps and base changes
def WeierstrassCurve.Affine.negPolynomial E1 #
{R : Type r} → [inst : CommRing R] → WeierstrassCurve.Affine R → Polynomial (Polynomial R)
The negation polynomial -Y - a₁X - a₃ associated to the negation of a nonsingular affine point
on a Weierstrass curve.
theorem WeierstrassCurve.Affine.Y_sub_polynomialY E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R}, Polynomial.X - W'.polynomialY = W'.negPolynomial
theorem WeierstrassCurve.Affine.Y_sub_negPolynomial E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R}, Polynomial.X - W'.negPolynomial = W'.polynomialY
def WeierstrassCurve.Affine.negY E3 #
{R : Type r} → [CommRing R] → WeierstrassCurve.Affine R → R → R → R
The Y-coordinate of -(x, y) for a nonsingular affine point (x, y) on a Weierstrass curve
W.
This depends on W, and has argument order: x, y.
theorem WeierstrassCurve.Affine.negY_negY E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y : R), W'.negY x (W'.negY x y) = y
theorem WeierstrassCurve.Affine.evalEval_negPolynomial E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y : R),
Polynomial.evalEval x y W'.negPolynomial = W'.negY x y
theorem WeierstrassCurve.Affine.Y_eq_of_X_eq E0 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ → W.Equation x₂ y₂ → x₁ = x₂ → y₁ = y₂ ∨ y₁ = W.negY x₂ y₂
theorem WeierstrassCurve.Affine.Y_eq_of_Y_ne E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ → W.Equation x₂ y₂ → x₁ = x₂ → y₁ ≠ W.negY x₂ y₂ → y₁ = y₂
theorem WeierstrassCurve.Affine.equation_neg E3 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y : R),
W'.Equation x (W'.negY x y) ↔ W'.Equation x y
theorem WeierstrassCurve.Affine.nonsingular_neg E3 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y : R),
W'.Nonsingular x (W'.negY x y) ↔ W'.Nonsingular x y
def WeierstrassCurve.Affine.linePolynomial E1 #
{R : Type r} → [inst : CommRing R] → R → R → R → Polynomial R
The line polynomial ℓ(X - x) + y associated to the line Y = ℓ(X - x) + y that passes through
a nonsingular affine point (x, y) on a Weierstrass curve W with a slope of ℓ.
This does not depend on W, and has argument order: x, y, ℓ.
def WeierstrassCurve.Affine.slope E1 #
{F : Type u} → [Field F] → WeierstrassCurve.Affine F → [DecidableEq F] → F → F → F → F → F
The slope of the line through two nonsingular affine points (x₁, y₁) and (x₂, y₂) on a
Weierstrass curve W.
If x₁ ≠ x₂, then this line is the secant of W through (x₁, y₁) and (x₂, y₂), and has slope
(y₁ - y₂) / (x₁ - x₂). Otherwise, if y₁ ≠ -y₁ - a₁x₁ - a₃, then this line is the tangent of W
at (x₁, y₁) = (x₂, y₂), and has slope (3x₁² + 2a₂x₁ + a₄ - a₁y₁) / (2y₁ + a₁x₁ + a₃). Otherwise,
this line is vertical, in which case this returns the value 0.
This depends on W, and has argument order: x₁, x₂, y₁, y₂.
theorem WeierstrassCurve.Affine.slope_of_Y_eq E0 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
x₁ = x₂ → y₁ = W.negY x₂ y₂ → W.slope x₁ x₂ y₁ y₂ = 0
theorem WeierstrassCurve.Affine.slope_of_Y_ne' E0 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₂ y₁ y₂ : F},
¬y₁ = -y₂ - W.a₁ * x₂ - W.a₃ →
W.slope x₂ x₂ y₁ y₂ = (3 * x₂ ^ 2 + 2 * W.a₂ * x₂ + W.a₄ - W.a₁ * y₁) / (y₁ - (-y₁ - W.a₁ * x₂ - W.a₃))
theorem WeierstrassCurve.Affine.slope_of_Y_ne E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
x₁ = x₂ →
y₁ ≠ W.negY x₂ y₂ → W.slope x₁ x₂ y₁ y₂ = (3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)
theorem WeierstrassCurve.Affine.slope_of_X_ne E0 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
x₁ ≠ x₂ → W.slope x₁ x₂ y₁ y₂ = (y₁ - y₂) / (x₁ - x₂)
theorem WeierstrassCurve.Affine.slope_of_Y_ne_eq_evalEval E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
x₁ = x₂ →
y₁ ≠ W.negY x₂ y₂ →
W.slope x₁ x₂ y₁ y₂ = -Polynomial.evalEval x₁ y₁ W.polynomialX / Polynomial.evalEval x₁ y₁ W.polynomialY
def WeierstrassCurve.Affine.addPolynomial E1 #
{R : Type r} → [inst : CommRing R] → WeierstrassCurve.Affine R → R → R → R → Polynomial R
The addition polynomial obtained by substituting the line Y = ℓ(X - x) + y into the polynomial
W(X, Y) associated to a Weierstrass curve W. If such a line intersects W at another
nonsingular affine point (x', y') on W, then the roots of this polynomial are precisely x,
x', and the X-coordinate of the addition of (x, y) and (x', y').
This depends on W, and has argument order: x, y, ℓ.
theorem WeierstrassCurve.Affine.C_addPolynomial E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y ℓ : R),
Polynomial.C (W'.addPolynomial x y ℓ) =
(Polynomial.X - Polynomial.C (WeierstrassCurve.Affine.linePolynomial x y ℓ)) *
(W'.negPolynomial - Polynomial.C (WeierstrassCurve.Affine.linePolynomial x y ℓ)) +
W'.polynomial
theorem WeierstrassCurve.Affine.addPolynomial_eq E0 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x y ℓ : R),
W'.addPolynomial x y ℓ =
-{ a := 1, b := -ℓ ^ 2 - W'.a₁ * ℓ + W'.a₂,
c := 2 * x * ℓ ^ 2 + (W'.a₁ * x - 2 * y - W'.a₃) * ℓ + (-W'.a₁ * y + W'.a₄),
d := -x ^ 2 * ℓ ^ 2 + (2 * x * y + W'.a₃ * x) * ℓ - (y ^ 2 + W'.a₃ * y - W'.a₆) }.toPoly
def WeierstrassCurve.Affine.addX E3 #
{R : Type r} → [CommRing R] → WeierstrassCurve.Affine R → R → R → R → R
The X-coordinate of (x₁, y₁) + (x₂, y₂) for two nonsingular affine points (x₁, y₁) and
(x₂, y₂) on a Weierstrass curve W, where the line through them has a slope of ℓ.
This depends on W, and has argument order: x₁, x₂, ℓ.
def WeierstrassCurve.Affine.negAddY E3 #
{R : Type r} → [CommRing R] → WeierstrassCurve.Affine R → R → R → R → R → R
The Y-coordinate of -((x₁, y₁) + (x₂, y₂)) for two nonsingular affine points (x₁, y₁) and
(x₂, y₂) on a Weierstrass curve W, where the line through them has a slope of ℓ.
This depends on W, and has argument order: x₁, x₂, y₁, ℓ.
def WeierstrassCurve.Affine.addY E3 #
{R : Type r} → [CommRing R] → WeierstrassCurve.Affine R → R → R → R → R → R
The Y-coordinate of (x₁, y₁) + (x₂, y₂) for two nonsingular affine points (x₁, y₁) and
(x₂, y₂) on a Weierstrass curve W, where the line through them has a slope of ℓ.
This depends on W, and has argument order: x₁, x₂, y₁, ℓ.
theorem WeierstrassCurve.Affine.addPolynomial_slope E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ →
W.Equation x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂) =
-((Polynomial.X - Polynomial.C x₁) * (Polynomial.X - Polynomial.C x₂) *
(Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
theorem WeierstrassCurve.Affine.C_addPolynomial_slope E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ →
W.Equation x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
Polynomial.C (W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)) =
-(Polynomial.C (Polynomial.X - Polynomial.C x₁) * Polynomial.C (Polynomial.X - Polynomial.C x₂) *
Polynomial.C (Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
theorem WeierstrassCurve.Affine.derivative_addPolynomial_slope E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ →
W.Equation x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
Polynomial.derivative (W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)) =
-((Polynomial.X - Polynomial.C x₁) * (Polynomial.X - Polynomial.C x₂) +
(Polynomial.X - Polynomial.C x₁) * (Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
(Polynomial.X - Polynomial.C x₂) * (Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
theorem WeierstrassCurve.Affine.nonsingular_negAdd_of_eval_derivative_ne_zero E1 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {x₁ x₂ y₁ ℓ : R},
W'.Equation (W'.addX x₁ x₂ ℓ) (W'.negAddY x₁ x₂ y₁ ℓ) →
Polynomial.eval (W'.addX x₁ x₂ ℓ) (Polynomial.derivative (W'.addPolynomial x₁ y₁ ℓ)) ≠ 0 →
W'.Nonsingular (W'.addX x₁ x₂ ℓ) (W'.negAddY x₁ x₂ y₁ ℓ)
theorem WeierstrassCurve.Affine.equation_add_iff E0 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (x₁ x₂ y₁ ℓ : R),
W'.Equation (W'.addX x₁ x₂ ℓ) (W'.negAddY x₁ x₂ y₁ ℓ) ↔
Polynomial.eval (W'.addX x₁ x₂ ℓ) (W'.addPolynomial x₁ y₁ ℓ) = 0
theorem WeierstrassCurve.Affine.equation_negAdd E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ →
W.Equation x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
W.Equation (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))
theorem WeierstrassCurve.Affine.equation_add E3 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Equation x₁ y₁ →
W.Equation x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
W.Equation (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))
theorem WeierstrassCurve.Affine.nonsingular_negAdd E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Nonsingular x₁ y₁ →
W.Nonsingular x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
W.Nonsingular (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))
theorem WeierstrassCurve.Affine.nonsingular_add E3 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ y₁ y₂ : F},
W.Nonsingular x₁ y₁ →
W.Nonsingular x₂ y₂ →
¬(x₁ = x₂ ∧ y₁ = W.negY x₂ y₂) →
W.Nonsingular (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))
theorem WeierstrassCurve.Affine.addX_eq_addX_negY_sub E2 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ : F} (y₁ y₂ : F),
x₁ ≠ x₂ →
W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) =
W.addX x₁ x₂ (W.slope x₁ x₂ y₁ (W.negY x₂ y₂)) - (y₁ - W.negY x₁ y₁) * (y₂ - W.negY x₂ y₂) / (x₂ - x₁) ^ 2
The formula x(P₁ + P₂) = x(P₁ - P₂) - ψ(P₁)ψ(P₂) / (x(P₂) - x(P₁))²,
where ψ(x,y) = 2y + a₁x + a₃.
theorem WeierstrassCurve.Affine.cyclic_sum_Y_mul_X_sub_X E2 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ : F} (y₁ y₂ : F),
x₁ ≠ x₂ →
have x₃ := W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂);
y₁ * (x₂ - x₃) + y₂ * (x₃ - x₁) + W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂) * (x₁ - x₂) = 0
The formula y(P₁)(x(P₂) - x(P₃)) + y(P₂)(x(P₃) - x(P₁)) + y(P₃)(x(P₁) - x(P₂)) = 0,
assuming that P₁ + P₂ + P₃ = O.
theorem WeierstrassCurve.Affine.addY_sub_negY_addY E2 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ x₂ : F} (y₁ y₂ : F),
x₁ ≠ x₂ →
have x₃ := W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂);
have y₃ := W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂);
y₃ - W.negY x₃ y₃ = ((y₂ - W.negY x₂ y₂) * (x₁ - x₃) - (y₁ - W.negY x₁ y₁) * (x₂ - x₃)) / (x₂ - x₁)
The formula ψ(P₁ + P₂) = (ψ(P₂)(x(P₁) - x(P₃)) - ψ(P₁)(x(P₂) - x(P₃))) / (x(P₂) - x(P₁)),
where ψ(x,y) = 2y + a₁x + a₃.
theorem WeierstrassCurve.Affine.addX_of_X_ne E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x₁ y₁ x₂ y₂ : F},
x₁ ≠ x₂ →
W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂) =
((y₁ - y₂) ^ 2 + W.a₁ * (y₁ - y₂) * (x₁ - x₂) - (W.a₂ + x₁ + x₂) * (x₁ - x₂) ^ 2) / (x₁ - x₂) ^ 2
The explicit formula for the x-coordinate of P + Q when P ≠ ±Q.
theorem WeierstrassCurve.Affine.den_duplication_eq E0 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {x y : R},
W'.Equation x y →
4 * x ^ 3 + WeierstrassCurve.b₂ W' * x ^ 2 + 2 * WeierstrassCurve.b₄ W' * x + WeierstrassCurve.b₆ W' =
(2 * y + W'.a₁ * x + W'.a₃) ^ 2
The polynomial on the left is the denominator of the rational expression for the x-coordinate
of twice the point (x, y). This is the same as W'.Ψ₂Sq evaluated at x.
The statement corresponds to W'.C_Ψ₂Sq after evaluation (but note that C_Ψ₂Sq
is not available in this file).
theorem WeierstrassCurve.Affine.den_duplication_eq_zero_iff E0 #
∀ {R : Type r} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} [IsReduced R] {x y : R},
W'.Equation x y →
(4 * x ^ 3 + WeierstrassCurve.b₂ W' * x ^ 2 + 2 * WeierstrassCurve.b₄ W' * x + WeierstrassCurve.b₆ W' = 0 ↔
y = W'.negY x y)
The denominator in the rational expression for the x-coordinate of twice the point (x, y)
vanishes if and only if the point is equal to its negative.
theorem WeierstrassCurve.Affine.den_duplication_ne_zero_or_num_duplication_ne_zero E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} {x y : F},
W.Nonsingular x y →
4 * x ^ 3 + WeierstrassCurve.b₂ W * x ^ 2 + 2 * WeierstrassCurve.b₄ W * x + WeierstrassCurve.b₆ W ≠ 0 ∨
x ^ 4 - WeierstrassCurve.b₄ W * x ^ 2 - 2 * WeierstrassCurve.b₆ W * x - WeierstrassCurve.b₈ W ≠ 0
If (x, y) is a nonsingular point on W in affine coordinates, then the x-coordinate
of its double is well-defined as a point on the projective line: in the corresponding rational
expression, at least one of the numerator and denominator does not vanish.
theorem WeierstrassCurve.Affine.addX_self_of_Y_ne E1 #
∀ {F : Type u} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] {x y : F},
W.Equation x y →
y ≠ W.negY x y →
W.addX x x (W.slope x x y y) =
(x ^ 4 - WeierstrassCurve.b₄ W * x ^ 2 - 2 * WeierstrassCurve.b₆ W * x - WeierstrassCurve.b₈ W) /
(4 * x ^ 3 + WeierstrassCurve.b₂ W * x ^ 2 + 2 * WeierstrassCurve.b₄ W * x + WeierstrassCurve.b₆ W)
The explicit duplication formula for the x-coordinate when 2*P ≠ 0.
theorem WeierstrassCurve.Affine.map_negPolynomial E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S),
(W'.map f).negPolynomial = Polynomial.map (Polynomial.mapRingHom f) W'.negPolynomial
theorem WeierstrassCurve.Affine.map_negY E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S)
(x y : R), (W'.map f).negY (f x) (f y) = f (W'.negY x y)
theorem WeierstrassCurve.Affine.map_linePolynomial E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (x y ℓ : R),
WeierstrassCurve.Affine.linePolynomial (f x) (f y) (f ℓ) =
Polynomial.map f (WeierstrassCurve.Affine.linePolynomial x y ℓ)
theorem WeierstrassCurve.Affine.map_addPolynomial E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S)
(x y ℓ : R), (W'.map f).addPolynomial (f x) (f y) (f ℓ) = Polynomial.map f (W'.addPolynomial x y ℓ)
theorem WeierstrassCurve.Affine.map_addX E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S)
(x₁ x₂ ℓ : R), (W'.map f).addX (f x₁) (f x₂) (f ℓ) = f (W'.addX x₁ x₂ ℓ)
theorem WeierstrassCurve.Affine.map_negAddY E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S)
(x₁ y₁ x₂ ℓ : R), (W'.map f).negAddY (f x₁) (f x₂) (f y₁) (f ℓ) = f (W'.negAddY x₁ x₂ y₁ ℓ)
theorem WeierstrassCurve.Affine.map_addY E0 #
∀ {R : Type r} {S : Type s} [inst : CommRing R] [inst_1 : CommRing S] {W' : WeierstrassCurve.Affine R} (f : R →+* S)
(x₁ y₁ x₂ ℓ : R), (W'.map f).addY (f x₁) (f x₂) (f y₁) (f ℓ) = f (W'.addY x₁ x₂ y₁ ℓ)
theorem WeierstrassCurve.Affine.map_slope E0 #
∀ {F : Type u} {K : Type v} [inst : Field F] [inst_1 : Field K] {W : WeierstrassCurve.Affine F} [inst_2 : DecidableEq F]
[inst_3 : DecidableEq K] (f : F →+* K) (x₁ x₂ y₁ y₂ : F),
(W.map f).slope (f x₁) (f x₂) (f y₁) (f y₂) = f (W.slope x₁ x₂ y₁ y₂)
theorem WeierstrassCurve.Affine.baseChange_negPolynomial E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B),
(W'.baseChange B).negPolynomial = Polynomial.map (Polynomial.mapRingHom ↑f) (W'.baseChange A).negPolynomial
theorem WeierstrassCurve.Affine.baseChange_negY E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B) (x y : A), (W'.baseChange B).negY (f x) (f y) = f ((W'.baseChange A).negY x y)
theorem WeierstrassCurve.Affine.baseChange_addPolynomial E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B) (x y ℓ : A),
(W'.baseChange B).addPolynomial (f x) (f y) (f ℓ) = Polynomial.map (↑f) ((W'.baseChange A).addPolynomial x y ℓ)
theorem WeierstrassCurve.Affine.baseChange_addX E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B) (x₁ x₂ ℓ : A), (W'.baseChange B).addX (f x₁) (f x₂) (f ℓ) = f ((W'.baseChange A).addX x₁ x₂ ℓ)
theorem WeierstrassCurve.Affine.baseChange_negAddY E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B) (x₁ y₁ x₂ ℓ : A),
(W'.baseChange B).negAddY (f x₁) (f x₂) (f y₁) (f ℓ) = f ((W'.baseChange A).negAddY x₁ x₂ y₁ ℓ)
theorem WeierstrassCurve.Affine.baseChange_addY E1 #
∀ {R : Type r} {S : Type s} {A : Type u} {B : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing A]
[inst_3 : CommRing B] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : Algebra R A]
[inst_6 : Algebra S A] [IsScalarTower R S A] [inst_8 : Algebra R B] [inst_9 : Algebra S B] [IsScalarTower R S B]
(f : A →ₐ[S] B) (x₁ y₁ x₂ ℓ : A),
(W'.baseChange B).addY (f x₁) (f x₂) (f y₁) (f ℓ) = f ((W'.baseChange A).addY x₁ x₂ y₁ ℓ)
theorem WeierstrassCurve.Affine.baseChange_slope E1 #
∀ {R : Type r} {S : Type s} {F : Type u} {K : Type v} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Field F]
[inst_3 : Field K] {W' : WeierstrassCurve.Affine R} [inst_4 : Algebra R S] [inst_5 : DecidableEq F]
[inst_6 : DecidableEq K] [inst_7 : Algebra R F] [inst_8 : Algebra S F] [IsScalarTower R S F] [inst_10 : Algebra R K]
[inst_11 : Algebra S K] [IsScalarTower R S K] (f : F →ₐ[S] K) (x₁ x₂ y₁ y₂ : F),
(W'.baseChange K).slope (f x₁) (f x₂) (f y₁) (f y₂) = f ((W'.baseChange F).slope x₁ x₂ y₁ y₂)