The chord through two points of a Weierstrass curve near the origin #
The w-expansion of WeierstrassCurve.formalW lives in the coordinates z = -x/y, w = -1/y
obtained from the affine coordinates of W by x = z / w, y = -1 / w. In those coordinates
the point at infinity is the origin, and the curve is parametrised near it by z ↦ (z, w(z)),
where w(z) solves the transformed Weierstrass equation. The (z, w) here are therefore not
the affine coordinates of W; everything below happens in the transformed chart.
The substitution turns an affine line of W into a relation w = λ z + ν, so the chord through
the two parameters z₁ and z₂ is described by a slope and an intercept, as power series in
R⟦z₁, z₂⟧ — variables indexed by Unit ⊕ Unit, as in Mathlib's formal-group-law conventions.
Substituting w = λ z + ν into the transformed equation leaves a cubic in z, whose three roots
are the parameters of the three points in which the chord meets the curve; the third of them is
formalThirdRoot.
Together these are the data of the chord construction: the formal group law of W is obtained
from formalThirdRoot by composing with the formal inverse, which is left to a later file.
Main definitions #
WeierstrassCurve.formalSlope: the slopeλ(z₁, z₂) = (w(z₂) - w(z₁)) / (z₂ - z₁)of the chord, defined through its coefficients rather than as a quotient.WeierstrassCurve.formalIntercept: the interceptν(z₁, z₂) = w(z₁) - λ(z₁, z₂) z₁.WeierstrassCurve.formalThirdRoot: the parameterz₃(z₁, z₂)of the third point in which the chord meets the curve, obtained from Vieta's formulas.
Main results #
WeierstrassCurve.coeff_formalSlope,WeierstrassCurve.formalIntercept_defandWeierstrassCurve.formalThirdRoot_def: the defining formulas, as named lemmas. Rewrite with these rather than unfolding the definitions.WeierstrassCurve.formalSlope_mul_X_add: the defining propertyλ z₂ + w(z₁) = λ z₁ + w(z₂)of the slope over a commutative semiring. Over a ring this becomesλ · (z₂ - z₁) = w(z₂) - w(z₁), which justifies calling it a divided difference.WeierstrassCurve.rename_swap_formalSlope,_formalIntercept,_formalThirdRoot: all three series are invariant under exchanging the two parameters, so the chord depends on the two points and not on their order. This is what makes the eventual group law commutative.WeierstrassCurve.formalIntercept_eq_inr: the intercept computed from the second point.WeierstrassCurve.constantCoeff_formalSlope,_formalIntercept,_formalThirdRoot: all three series vanish at the origin.WeierstrassCurve.subst_formalThirdRoot_formalW: the third point really lies on the chord — reading thew-expansion atformalThirdRootreturns the chord line read there. This is what makes the third root the parameter of an intersection point rather than merely a root of the cubic.
Implementation notes #
formalSlope is defined by the coefficient formula rather than as a quotient of power series:
z₂ - z₁ is not a unit in R⟦z₁, z₂⟧, so the divided difference has to be written down
directly and formalSlope_mul_X_add recovers the property that names it.
The slope, its defining relation and the constant coefficient of the third-root denominator
need no subtraction, so they are stated over a CommSemiring, matching formalW. The
intercept and third-root constructions use subtraction and are stated over a CommRing.
References #
Provenance #
Adapted from Michael Stoll's EllipticCurves project
(github.com/MichaelStollBayreuth/EllipticCurves, Apache-2.0, revision 66889eada51a),
EllipticCurves/WeierstrassFormalGroup/Chord.lean, its Chord section down to the third-root
series together with the swap-invariance block — declarations slopeSeries, coeff_slopeSeries,
slopeSeries_mul_sub, interceptSeries, interceptSeries_eq, constantCoeff_slopeSeries,
constantCoeff_interceptSeries, thirdRootSeries, constantCoeff_thirdRootSeries,
rename_swap_slopeSeries, rename_swap_interceptSeries and rename_swap_thirdRootSeries.
The source's rename_swap_invOfUnit is not ported: it is the general
MvPowerSeries.ringHom_invOfUnit specialised to rename Sum.swap, and is used as such.
The source's wSeries and vSeries are formalW and formalU, so neither is re-ported and
everything here is stated over the existing w-expansion API. Where
the source writes MvPowerSeries.rename (fun _ => i), this file uses the equal Mathlib map
PowerSeries.toMvPowerSeries i.
The on-line section is adapted from the same project's
EllipticCurves/WeierstrassFormalGroup/GroupLaw.lean, its Domain section — declarations
line_at_thirdRoot and subst_thirdRootSeries_wSeries. Four of that section's steps are not
ported. X_inl_ne_X_inr is not needed at all: the cancellation runs through
MvPowerSeries.X_sub_X_mem_nonZeroDivisors, which never separates the two variables. The other
three this repository already has — line_left and line_right are formalIntercept_def and
formalIntercept_eq_inr with the terms moved across the equals sign, and wsAt_rename is
subst_formalW_wEquation read through Mathlib's PowerSeries.toMvPowerSeries_eq_subst; all
three are inlined at their single use site. The source's LowVanish hypotheses have no counterpart
here at all, since eq_of_wEquation_mvPowerSeries takes vanishing constant coefficients
directly.
The source guards line_at_thirdRoot with set_option maxRecDepth 4000 in. That is not ported:
TauCeti's CI forbids set_option under TauCeti/, and the proof elaborates at the default
depth here, so the guard was never load-bearing for this statement.
The slope of the chord #
The slope of the chord through the points with parameters z₁ and z₂, that is, the
divided difference λ(z₁, z₂) = (w(z₂) - w(z₁)) / (z₂ - z₁).
It is defined through its coefficients: the coefficient of z₁ ^ i * z₂ ^ j is the coefficient
of z ^ (i + j + 1) in w(z). See formalSlope_mul_X_add for the property this encodes.
Instances For
The defining formula for formalSlope: the coefficient of z₁ ^ i * z₂ ^ j in the slope is
the coefficient of z ^ (i + j + 1) in w(z).
The slope of the chord vanishes at the origin.
The slope is unchanged by exchanging the two parameters: it depends on the pair of points and not on their order.
The defining property of the slope, without subtraction:
λ(z₁, z₂) * z₂ + w(z₁) = λ(z₁, z₂) * z₁ + w(z₂).
Over a ring this is the divided-difference identity
λ(z₁, z₂) * (z₂ - z₁) = w(z₂) - w(z₁).
The denominator 1 + a₂λ + a₄λ² + a₆λ³ of Vieta's formula for the third root is 1 at the
origin. Over a commutative ring this makes it a unit, allowing formalThirdRoot to divide by it.
The intercept of the chord #
The intercept ν(z₁, z₂) = w(z₁) - λ(z₁, z₂) z₁ of the chord through the points with
parameters z₁ and z₂.
Equations
Instances For
The defining formula for formalIntercept, in terms of the first point.
The intercept computed from the second point is the same series.
The intercept of the chord vanishes at the origin.
The intercept is unchanged by exchanging the two parameters.
The third point of the chord #
The parameter z₃(z₁, z₂) of the third point in which the chord through the points with
parameters z₁ and z₂ meets the curve.
Substituting w = λ z + ν into the transformed Weierstrass equation gives a cubic in z whose
roots are the three parameters, so by Vieta's formulas
z₃ = -z₁ - z₂ - (a₁λ + a₂ν + a₃λ² + 2a₄λν + 3a₆λ²ν) / (1 + a₂λ + a₄λ² + a₆λ³),
the denominator being a unit because λ has vanishing constant coefficient.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The defining formula for formalThirdRoot, as read off Vieta's formulas.
The parameter of the third point of the chord vanishes at the origin.
The third point of the chord is unchanged by exchanging the two parameters. This is what makes the formal group law commutative.
The two-variable family that substitutes formalThirdRoot for the single variable of a
one-variable series. Stated here, beside formalThirdRoot itself, because the substitution it
witnesses is used from this file onwards.
The third point lies on the chord #
Vieta's formulas produce formalThirdRoot from the coefficients of the chord cubic, which by
itself says nothing about where the curve meets that chord: it is an identity between series, not
a statement that the point with parameter z₃ lies on the line w = λ z + ν. It does, and the
argument is the classical one — the cubic already has z₁ and z₂ among its roots, so cancelling
z₁ - z₂ from the difference of the two identities pins the third.
That cancellation needs no hypothesis on R. The difference of two distinct variables is a
non-zero-divisor of MvPowerSeries (Unit ⊕ Unit) R over an arbitrary commutative ring
(MvPowerSeries.X_sub_X_mem_nonZeroDivisors), because the coefficient recursion behind it never
cancels anything in R.
The third intersection point lies on the chord. Reading the w-expansion at the third
root gives the chord line read there: w(z₃(z₁, z₂)) = λ(z₁, z₂) · z₃(z₁, z₂) + ν(z₁, z₂).
This is what makes formalThirdRoot the parameter of an actual third intersection point rather
than merely the third root of a cubic, and it is the identity the addition series is built on.
Base change #
The chord data is built from formalW and the coefficients by ring operations, so it commutes
with base change; WExpansion.lean has the corresponding statement for the w-expansion itself.
The slope of the chord commutes with base change.
The intercept of the chord commutes with base change.
The parameter of the third point of the chord commutes with base change.