The addition polynomial of a line #
For a Weierstrass curve W and a line y = ℓ x + ν through (x₁, y₁), Mathlib's addition
polynomial W.addPolynomial x₁ y₁ ℓ is the Weierstrass polynomial restricted to the line,
W(X, ℓ X + ν). This file records that substitution in terms of the line's intercept, and the
coefficients it forces when it factors as -(X - x₁) (X - x₂) (X - x₃). Over a field, it also
records that the line through two points with Mathlib's slope passes through both of them.
Main results #
WeierstrassCurve.Affine.addPolynomial_eq_eval: ify₁ = ℓ x₁ + ν, thenW.addPolynomial x₁ y₁ ℓ = W(X, ℓ X + ν).WeierstrassCurve.Affine.coeffs_of_addPolynomial_eq: a factorisationW.addPolynomial x₁ y₁ ℓ = -(X - x₁) (X - x₂) (X - x₃)determinesx₁ + x₂ + x₃,x₁ x₂ + x₁ x₃ + x₂ x₃andx₁ x₂ x₃fromℓ,x₁,y₁and the coefficients ofW.WeierstrassCurve.Affine.Y_eq_slope_mul_add: the line through(x₁, y₁)with slopeW.slope x₁ x₂ y₁ y₂passes through(x₂, y₂).
Substituting the line y = ℓ x + ν through (x₁, y₁) into the Weierstrass polynomial gives
the addition polynomial of (x₁, y₁) with slope ℓ.
Comparing the coefficients of X², X and 1 in a factorisation of the addition
polynomial.
The line through (x₁, y₁) with slope W.slope x₁ x₂ y₁ y₂ passes through (x₂, y₂), for
two points of W that are not negatives of each other. When the points coincide, this is the
tangent line.