Skip to content

Commit 36a9746

Browse files
committed
feat(AlgebraicGeometry/EllipticCurve/LFunction): define the L-Function of an elliptic curve (leanprover-community#37771)
This PR defines the L-Function of an elliptic curve. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent eac2032 commit 36a9746

3 files changed

Lines changed: 91 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,7 @@ public import Mathlib.AlgebraicGeometry.EllipticCurve.IsomOfJ
13301330
public import Mathlib.AlgebraicGeometry.EllipticCurve.Jacobian.Basic
13311331
public import Mathlib.AlgebraicGeometry.EllipticCurve.Jacobian.Formula
13321332
public import Mathlib.AlgebraicGeometry.EllipticCurve.Jacobian.Point
1333+
public import Mathlib.AlgebraicGeometry.EllipticCurve.LFunction
13331334
public import Mathlib.AlgebraicGeometry.EllipticCurve.ModelsWithJ
13341335
public import Mathlib.AlgebraicGeometry.EllipticCurve.NormalForms
13351336
public import Mathlib.AlgebraicGeometry.EllipticCurve.Projective.Basic
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/-
2+
Copyright (c) 2026 Thomas Browning. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Thomas Browning
5+
-/
6+
module
7+
8+
public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point
9+
public import Mathlib.AlgebraicGeometry.EllipticCurve.Reduction
10+
public import Mathlib.NumberTheory.ArithmeticFunction.LFunction
11+
public import Mathlib.NumberTheory.LSeries.Basic
12+
public import Mathlib.NumberTheory.NumberField.Completion.FinitePlace
13+
public import Mathlib.RingTheory.PowerSeries.Inverse
14+
15+
/-!
16+
# The L-function of a Weierstrass curve
17+
18+
In this file, we define the L-function of a Weierstrass curve.
19+
20+
## Main definitions
21+
22+
* `WeierstrassCurve.LFunction`: the L-function of a Weierstrass equation.
23+
24+
## References
25+
26+
* [J Silverman, *The Arithmetic of Elliptic Curves*][silverman2009]
27+
-/
28+
29+
@[expose] public section
30+
31+
namespace WeierstrassCurve
32+
33+
section LocalField
34+
35+
variable (R : Type*) [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] {K : Type*}
36+
[Field K] [Algebra R K] [IsFractionRing R K] (W : WeierstrassCurve K)
37+
38+
open Classical Polynomial in
39+
/-- The local polynomial associated to a Weierstrass curve `W` over a nonarchimedean local field.
40+
In the case of good reduction it is given by `1 - a T + q T ^ 2` where `q` is the cardinality of the
41+
residue field `κ` and `a = q + 1 - |W(κ)|`. Note that `q` (and also `|W(κ)|`) is defined via
42+
`Nat.card`, so `q` has junk value `0` when the residue field is infinite. -/
43+
noncomputable def localPolynomial : ℤ[X] :=
44+
letI W' := W.minimal R
45+
letI q : ℤ := Nat.card (IsLocalRing.ResidueField R)
46+
letI a : ℤ := q + 1 - (Nat.card (W'.reduction R).toAffine.Point)
47+
if W'.HasGoodReduction R then 1 - C a * X + C q * X ^ 2
48+
else if W'.HasSplitMultiplicativeReduction R then 1 - X
49+
else if W'.HasMultiplicativeReduction R then 1 + X
50+
else 1
51+
52+
/-- The local power series associated to a Weierstrass curve over a nonarchimedean local field. -/
53+
noncomputable def localPowerSeries : PowerSeries ℤ :=
54+
PowerSeries.invOfUnit (W.localPolynomial R) 1
55+
56+
/-- The local Euler factor associated to a Weierstrass curve over a nonarchimedean local field. -/
57+
noncomputable def localEulerFactor : ArithmeticFunction ℤ :=
58+
.ofPowerSeries (Nat.card (IsLocalRing.ResidueField R)) (W.localPowerSeries R)
59+
60+
end LocalField
61+
62+
section NumberField
63+
64+
open ArithmeticFunction IsDedekindDomain NumberField
65+
66+
variable {K : Type*} [Field K] [NumberField K] (W : WeierstrassCurve K)
67+
68+
/-- The L-function of a Weierstrass curve `W` over a number field `K` as a formal Dirichlet series.
69+
70+
For each prime ideal `p` of the ring of integers of `K` with norm `‖p‖` residue field `κ_p`,
71+
we define the local polynomial `fₚ(T)` as:
72+
* `fₚ = 1 - aₚ T + ‖p‖ T ^ 2` where `aₚ = ‖p‖ + 1 - |W(κ_p)|` if `W` has good reduction at `p`,
73+
* `fₚ = 1 - T` if `W` has split multiplicative reduction at `p`,
74+
* `fₚ = 1 + T` if `W` has nonsplit multiplicative reduction at `p`,
75+
* `fₚ = 1` if `W` has additive reduction at `p`.
76+
Then the L-function of `W` is the formal Dirichlet series defined as the product of `1 / fₚ(‖p‖⁻ˢ)`
77+
as `p` ranges over all prime ideals of the ring of integers of `K`.
78+
-/
79+
noncomputable def LFunction : ArithmeticFunction ℤ :=
80+
eulerProduct fun p : HeightOneSpectrum (𝓞 K) ↦
81+
(W.baseChange (p.adicCompletion K)).localEulerFactor (p.adicCompletionIntegers K)
82+
83+
/-- The L-series of a Weierstrass curve over a number field. -/
84+
protected noncomputable def LSeries (W : WeierstrassCurve K) (s : ℂ) :=
85+
LSeries ((↑) ∘ W.LFunction) s
86+
87+
end NumberField
88+
89+
end WeierstrassCurve

Mathlib/Tactic/Linter/DirectoryDependency.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ def overrideAllowedImportDirs : NamePrefixRel := .ofArray #[
592592
(`Mathlib.Algebra.Lie, `Mathlib.RepresentationTheory),
593593
(`Mathlib.Algebra.Module.ZLattice, `Mathlib.Analysis),
594594
(`Mathlib.Algebra.Notation, `Mathlib.Algebra.Notation),
595+
(`Mathlib.AlgebraicGeometry.EllipticCurve, `Mathlib.Probability), -- For L-functions
595596
(`Mathlib.AlgebraicGeometry.Sites, `Mathlib.AlgebraicTopology), -- Homotopical methods for sheaf cohomology
596597
(`Mathlib.AlgebraicGeometry.Sites, `Mathlib.NumberTheory), -- For arithmetic applications
597598
(`Mathlib.Deprecated, `Mathlib.Deprecated),

0 commit comments

Comments
 (0)