The Birch and Swinnerton-Dyer conjecture: the rank of and the L-function of an elliptic curve over
DefinitionBSDThis bundle fixes, in the namespace BSD, the two quantities compared by the Birch and Swinnerton-Dyer conjecture for an elliptic curve over , as set out on pp. 1–2 of Andrew Wiles' official description of the Clay Millennium Prize Problem. Throughout, is a Weierstrass equation
(Mathlib's WeierstrassCurve ℚ); the theorems of the mission add the hypothesis that its discriminant is non-zero, so that is an elliptic curve.
The rank (BSD.rank E). The rational points , i.e. the rational solutions together with the point at infinity, form an abelian group under the chord-and-tangent law (Mathlib's W.toAffine.Point). The rank of is the rank of this group as a -module,
which by Mordell's theorem is the integer of Wiles' text.
The L-function (BSD.IsLFunction E Λ). The Hasse–Weil L-series of is Mathlib's WeierstrassCurve.LSeries: for each prime a Weierstrass equation for minimal at is reduced modulo , and the local factor is with at primes of good reduction, at split multiplicative primes, at non-split multiplicative primes and at additive primes; the product over all primes is expanded as a Dirichlet series , which converges for by Hasse's bound . This is the complete L-series of Wiles' Remark 1 (the incomplete product over in Wiles' display differs from it by finitely many factors holomorphic and non-zero at ). A function is the L-function of when
- is entire (complex-differentiable at every point of ), and
- for every with .
By the identity theorem such a is unique if it exists; that it exists is the theorem of Wiles, Taylor–Wiles and Breuil–Conrad–Diamond–Taylor recorded as a milestone of the mission.
Formalization Note No minimality or integrality is imposed on the chosen Weierstrass equation: Mathlib's L-series passes to a minimal model at each prime internally, and the group of points depends only on the curve, so both quantities are invariant under change of Weierstrass equation. Mathlib's LSeries takes the junk value at points where the Dirichlet series does not converge, which is why IsLFunction only asks for agreement on the half-plane . Mathlib's Module.finrank is for a module that is not of finite rank; by Mordell's theorem this case does not occur for elliptic curves. Neither definition assumes ; that hypothesis is carried by the theorems.
import Mathlib /-! A. Wiles, *The Birch and Swinnerton-Dyer Conjecture*, Clay Mathematics Institute Millennium Prize Problem description (2000), pp. 1–2. The two quantities compared by the conjecture, for an elliptic curve `W` over `ℚ` given by a Weierstrass equation: the rank `r` of the Mordell–Weil group `W(ℚ)`, and the analytic continuation of the Hasse–Weil L-series `L(W, s)`. The L-series itself is Mathlib's `WeierstrassCurve.LSeries`: the Dirichlet series `∑ aₙ n⁻ˢ` whose coefficients are those of the Euler product over all primes `p` of `(1 - aₚ p⁻ˢ + p¹⁻²ˢ)⁻¹` at primes of good reduction (`aₚ = p + 1 - #W̃(𝔽ₚ)`, computed on a model minimal at `p`), `(1 - p⁻ˢ)⁻¹` at split multiplicative primes, `(1 + p⁻ˢ)⁻¹` at non-split multiplicative primes and `1` at additive primes — the complete L-series `L*(C, s)` of Wiles' Remark 1. The Dirichlet series converges for `Re s > 3/2`; Mathlib's `LSeries` takes the junk value `0` where it does not converge. -/ namespace BSD open WeierstrassCurve /-- `Λ` is *the* L-function of `W`: an entire function `ℂ → ℂ` that agrees with the Hasse–Weil Dirichlet series `L(W, s)` on the half-plane `Re s > 3/2` on which the series converges. -/ structure IsLFunction (W : WeierstrassCurve ℚ) (Λ : ℂ → ℂ) : Prop where differentiable : Differentiable ℂ Λ eq_LSeries : ∀ s : ℂ, 3 / 2 < s.re → Λ s = W.LSeries s /-- The rank `r` of `W(ℚ)`: the rank of the abelian group of rational points of `W`, regarded as a `ℤ`-module (the `r` in `W(ℚ) ≃ ℤ^r ⊕ W(ℚ)_tors`). -/ noncomputable def rank (W : WeierstrassCurve ℚ) : ℕ := Module.finrank ℤ W.toAffine.Point end BSD
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
Read-back
Throughout, a Weierstrass curve over is nothing more than an ordered quintuple of rational numbers , thought of as the coefficients of the equation
Nothing in this bundle requires the discriminant of to be nonzero, requires to be an elliptic curve, or imposes any other condition on the five coefficients. Both declarations accept an arbitrary such quintuple.
BSD.IsLFunction W Λ
This is a proposition about two pieces of data: a Weierstrass curve over (any quintuple as above) and an arbitrary function . The proposition holds exactly when both of the following conditions are satisfied.
(1) Entireness. is complex-differentiable at every point of (i.e. is an entire function).
(2) Agreement on a half-plane. For every complex number with (strict inequality; is the real number ),
where is the Mathlib quantity WeierstrassCurve.LSeries W s, unfolded as follows. Nothing is asserted about on the closed half-plane beyond entireness.
Unfolding . Let be the arithmetic function WeierstrassCurve.LFunction W described below (an arithmetic function is a function on with value at ). Then
where is cast from to , is the complex power , and is the total unconditional sum: if the family is unconditionally summable in (i.e. the finite partial sums over finite sets of indices converge along the filter of finite subsets), is that sum; if it is not summable, is defined to be . No hypothesis in the bundle asserts summability at any ; at any with at which the series fails to be summable, condition (2) demands .
Unfolding (the formal Dirichlet series). Let be the ring of integers of the number field , and let range over the height-one spectrum of : the nonzero prime ideals of . For each such write for the -adic completion of (Mathlib's adicCompletion), and for its valuation subring (adicCompletionIntegers, the elements of valuation ). Let be with its five coefficients mapped into via the canonical map . Then
where is the local Euler factor (an arithmetic function with values in ) defined below, and is the total unconditional product in the ring of -valued arithmetic functions under Dirichlet convolution, taken in the topology of pointwise convergence with discrete (a net of arithmetic functions converges to iff for each , the -th coefficients are eventually equal to ). If the family is multipliable in this sense, is its product (when the product exists but is not unique, or when only finitely many factors differ from , Mathlib's specific choice conventions apply); if it is not multipliable, is the constant arithmetic function , i.e. and for .
Unfolding (the local Euler factor). Fix , and write , , for the residue field of , and for the multiplicative valuation on associated to (values in , normalised so that means is a unit of and means ).
Step (a): a minimal model. A Weierstrass curve over is called integral (relative to ) if there exists a Weierstrass curve over whose coefficients map to those of . It is called minimal if the change of variables is maximal, among all changes of variables over such that is integral, for the quantity , where if is integral and (the smallest possible value) otherwise. (Since for integral curves, maximality of the multiplicative valuation means the discriminant is "least divisible" by among integral models.) Let be for some change of variables over , chosen by the axiom of choice, such that is minimal. (Mathlib proves such a exists for every Weierstrass curve over ; which one is chosen is unspecified.) is minimal and in particular integral.
Step (b): the reduction and the point count. Let be a Weierstrass curve over , again chosen by the axiom of choice, whose coefficients map to those of (an "integral model" of ). Let be the Weierstrass curve over obtained by reducing the five coefficients of modulo . Set
where both are Mathlib's Nat.card: the cardinality of the type if it is finite, and if it is infinite. Here denotes the type of nonsingular points in affine coordinates on : it consists of one distinguished element (the point at infinity) together with all pairs such that
i.e. the pairs satisfying the Weierstrass equation at which at least one partial derivative of the Weierstrass polynomial is nonzero. (Points of that satisfy the equation but at which both partial derivatives vanish are not counted.) In particular, if were infinite then , and whenever the point type is infinite.
Step (c): the local polynomial. Define by the following case split (the first applicable case is used; the case split is classical, i.e. not required to be decidable):
- if has good reduction — meaning is minimal and (the discriminant of is a unit of ) — then with as in step (b);
- otherwise, if has split multiplicative reduction — meaning is minimal, , , and the polynomial
with coefficients computed from the chosen integral model and then reduced to , splits over (belongs to the multiplicative monoid generated by constant polynomials and monic linear polynomials , ) — then ;
- otherwise, if has multiplicative reduction — meaning is minimal, and (given the previous case failed, this is the non-split case) — then ;
- otherwise (which, being minimal, is exactly the case and , "additive reduction"), .
Here are the standard polynomial expressions in the coefficients (, , , , , ).
Step (d): the reciprocal power series. Let be the formal power series obtained from by Mathlib's invOfUnit with the unit : its constant coefficient is , and for its -th coefficient is . Since in all four cases has constant coefficient , this is the genuine multiplicative inverse in .
Step (e): substituting . is the arithmetic function ofPowerSeries q g_p:
- if : when for some , and when is not a power of ;
- if (in particular if because is infinite): is the junk value where is the constant coefficient of (here ), i.e. and for .
This completes the unfolding of , hence of , hence of condition (2).
Summary of what is not assumed by IsLFunction: no condition on (singular curves are allowed); no summability of the Dirichlet series anywhere; no convergence of the Euler product; no uniqueness statement about ; no functional equation; no condition on for other than being part of an entire function.
BSD.rank W
This is a natural number attached to any Weierstrass curve over (again any quintuple; no elliptic hypothesis). It is defined as
with the following meanings.
The module . W.toAffine is itself, regarded in affine coordinates (a notational re-labelling, not a change of data). Its type of points, W.toAffine.Point, consists of one distinguished element (the point at infinity) together with all pairs satisfying
i.e. the rational solutions of the Weierstrass equation at which at least one partial derivative is nonzero. If happens to be singular, its singular rational points (if any) are simply excluded from this type; the type is defined regardless. This type carries the standard chord–tangent abelian group law of Mathlib (negation ; the sum of two points is when they are negatives of one another and otherwise is given by the usual secant/tangent formulas), which Mathlib defines for every Weierstrass curve over a field, without requiring the curve to be elliptic. The abelian group is regarded as a -module in the usual way ().
. For a -module , Mathlib defines
as a cardinal (the supremum over all subsets such that no nontrivial finite -linear combination of distinct elements of is ; the supremum need not be attained), and
where sends a finite cardinal to the corresponding natural number and sends every infinite cardinal to . Consequently:
- if the supremum of sizes of -linearly independent subsets of is a finite number , then ;
- if that supremum is infinite (there are arbitrarily large, or an infinite, -linearly independent subset), then ;
- torsion elements (elements with for some ) never belong to a linearly independent subset, so they do not contribute;
- the definition does not require to be finitely generated, and for -modules can be nonzero for non-finitely-generated modules (e.g. ); no finiteness hypothesis of any kind is stated or used in this declaration.
Confirmed by the mission captain (proposal self-audit).