The Shafarevich–Tate group of an elliptic curve over a number field
DefinitionRank2Sha_TateShafarevichLet be a number field with algebraic closure and absolute Galois group , and let be a Weierstrass curve over . The group of nonsingular points over , with the discrete topology, carries the action of on coordinates.
The Shafarevich–Tate group of over is
where runs over all places of , finite and infinite, is the completion of at , and acts on through a restriction map . The finite places are indexed by the nonzero prime ideals of the ring of integers of .
When is an elliptic curve this is the classical Shafarevich–Tate group, which classifies the principal homogeneous spaces of over that have a point over every completion.
Formalization Note The classical definition restricts to . The two kernels agree, because is an isomorphism; this comparison is not part of the definition and is not formalized here. The definition also applies to a singular Weierstrass curve, where it concerns the nonsingular locus. The code is copied without change from formal-conjectures.
/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import Definitions.Def_Rank2Sha_ContCohomologySha
import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point
import Mathlib.NumberTheory.NumberField.Completion.FinitePlace
import Mathlib.NumberTheory.NumberField.Completion.InfinitePlace
/-!
# The Tate–-Shafarevich group of an elliptic curve over a number field
The non-singular points over an algebraic closure of a field `K` carry a discrete Galois
representation. For a number field, the *Tate–Shafarevich group* is the intersection of the kernels
of restriction to all infinite and finite completions, where finite places are indexed by the
non-zero prime ideals of the ring of integers of `K`. The coefficient module remains the geometric
points over the separable closure of `K`, with its action restricted to each local Galois group.
## References
* [Silverman2009] Joseph H. Silverman, *The Arithmetic of Elliptic Curves*, 2nd ed., Graduate Texts
in Mathematics 106, Springer (2009), [doi](https://doi.org/10.1007/978-0-387-09494-6).
Chapter X, §4, pp. 331–333, especially the definition on p. 332, gives the classical
Tate–-Shafarevich group over a number field, using local geometric points.
* [J. S. Milne, Arithmetic Duality Theorems](https://www.jmilne.org/math/Books/ADTnot.pdf)
* [J. S. Milne, Elliptic Curves](https://www.jmilne.org/math/Books/EC2.pdf), 2nd ed., Chapter IV,
Remark 1.11, p. 111, explains the use of a separable closure over imperfect fields.
-/
@[simp]
lemma Field.absoluteGaloisGroup.one_toAlgHom {K : Type*} [Field K] :
(1 : Field.absoluteGaloisGroup K).toAlgHom = AlgHom.id K (AlgebraicClosure K) := rfl
@[simp]
lemma Field.absoluteGaloisGroup.mul_toAlgHom {K : Type*} [Field K]
(σ τ : Field.absoluteGaloisGroup K) :
(σ * τ).toAlgHom = σ.toAlgHom.comp τ.toAlgHom := rfl
@[simp]
lemma WeierstrassCurve.Affine.Point.map_id' {R S F : Type*} [CommRing R] [CommRing S]
[Field F] {W' : WeierstrassCurve.Affine R} [DecidableEq F] [Algebra R S] [Algebra R F]
[Algebra S F] [IsScalarTower R S F] (P : (W'.baseChange F).Point) :
WeierstrassCurve.Affine.Point.map (AlgHom.id S F) P = P := by
cases P <;> rfl
lemma ContinuousLinearMap.mk_apply {R S M M₂ : Type*} [Semiring R] [Semiring S]
{σ : R →+* S} [TopologicalSpace M] [AddCommMonoid M] [TopologicalSpace M₂]
[AddCommMonoid M₂] [Module R M] [Module S M₂] (toLinearMap : M →ₛₗ[σ] M₂)
(cont : Continuous toLinearMap.toFun) (m : M) :
ContinuousLinearMap.mk toLinearMap cont m = toLinearMap m := rfl
namespace WeierstrassCurve.Affine
open ContinuousCohomology IsDedekindDomain NumberField
variable {K : Type*} [Field K] (W : Affine K)
/-- The geometric non-singular points as a topological space. -/
local instance : TopologicalSpace (W⁄(AlgebraicClosure K)).Point := ⊥
/-- The geometric non-singular points equipped with the discrete topology. -/
local instance : DiscreteTopology (W⁄(AlgebraicClosure K)).Point := ⟨rfl⟩
open scoped Classical in
/-- The natural Galois action on geometric non-singular points with their discrete topology.
This uses `AlgebraicClosure K` to match `Field.absoluteGaloisGroup`. For number fields, which are
perfect, an algebraic closure is also a separable closure. Over an imperfect field, the coefficient
module for the usual Galois cohomology of an elliptic curve should use `SeparableClosure K` instead.
TODO: use `SeparableClosure K` for the coefficient field when the API for absolute Galois groups
supports this directly. The automorphism group of the algebraic closure itself gives the usual
absolute Galois group by restriction to the separable closure. -/
noncomputable def galoisRepresentation : TopRep ℤ <| Field.absoluteGaloisGroup K := .of <|
.ofMonoidHom {
toFun σ := { __ := (Affine.Point.map (W' := W) σ.toAlgHom).toIntLinearMap }
map_one' := by ext; simp
map_mul' σ τ := by ext; simp [ContinuousLinearMap.mk_apply _, Point.map_map] }
/-- The subgroup of the first continuous Galois cohomology group consisting of classes whose
restrictions vanish at every infinite and finite place. When `W.IsElliptic`, this is the classical
Tate--Shafarevich group of `W` over `K`. The construction also applies to the nonsingular locus
of a singular Weierstrass curve. -/
noncomputable def tateShafarevich [NumberField K] :
AddSubgroup <| continuousCohomology 1 W.galoisRepresentation :=
ContinuousCohomology.tateShafarevich
(fun v : InfinitePlace K ↦ v.Completion) W.galoisRepresentation 1 ⊓
ContinuousCohomology.tateShafarevich
(fun v : HeightOneSpectrum <| 𝓞 K ↦ v.adicCompletion K) W.galoisRepresentation 1
end WeierstrassCurve.Affine
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Conventions used below. For a field , is Mathlib's fixed algebraic closure of and is its group of -algebra automorphisms with composition as multiplication and the Krull topology. For a ring homomorphism of fields, is the continuous homomorphism Field.absoluteGaloisGroup.map, defined through one specific -embedding produced by Mathlib's choice-based IsAlgClosed.lift and characterised by . For a family of fields with -algebra structures , an object of TopRep ℤ G_K and , is the subgroup of Def_Rank2Sha_ContCohomologySha, where is Mathlib's continuous cohomology (homogeneous continuous cochains) and the coefficient group is the same at every , with acting through .
A Weierstrass curve over a commutative ring (type WeierstrassCurve.Affine R, a synonym for WeierstrassCurve R) is a tuple , standing for . No condition on the discriminant is part of the data. For an -algebra which is a field, denotes the type of points of the base change of to : the point at infinity , together with the pairs that satisfy the equation and are nonsingular, meaning that at least one of the two partial derivatives and is nonzero at . Mathlib makes an abelian group with identity under the chord-and-tangent law; this is defined whether or not the discriminant of is nonzero. For an -algebra homomorphism of fields, is the group homomorphism with and .
Field.absoluteGaloisGroup.one_toAlgHom. For every field , the identity element of , viewed as a -algebra homomorphism , is the identity map. Registered as a simplification lemma; it holds by definition.
Field.absoluteGaloisGroup.mul_toAlgHom. For every field and all , the product , viewed as a -algebra homomorphism , is the composite . Registered as a simplification lemma; it holds by definition.
WeierstrassCurve.Affine.Point.map_id'. Let and be commutative rings and a field, with decidable equality on , algebra structures , , forming a commuting triangle, and let be a Weierstrass curve over . Then for every point (points of the base change of to as described above), the map induced by the identity -algebra homomorphism sends to . Registered as a simplification lemma.
ContinuousLinearMap.mk_apply. Let and be semirings, a ring homomorphism, and additive commutative monoids carrying topologies, with an -module and an -module. For every -semilinear map , every proof that is continuous, and every , the continuous semilinear map built from and that proof, evaluated at , equals . It holds by definition.
First local instance (topology on geometric points). Let be any field and any Weierstrass curve over . The set is given the discrete topology. The instance is local to the file.
Second local instance. With and as above, the topology just defined on is recorded as discrete. The instance is local to the file.
WeierstrassCurve.Affine.galoisRepresentation. Let be any field (any characteristic, perfect or not) and any Weierstrass curve over , with no assumption that its discriminant is nonzero. The definition is the object of TopRep ℤ G_K whose underlying group is with its group law and the discrete topology, and on which acts by
Each such map is a group homomorphism, continuous because the topology is discrete; the identity of acts as the identity and acts as the action of composed with that of (both proved in the definition, using the two lemmas above). Decidable equality on , needed for the group law, is supplied classically. The coefficient field is the algebraic closure ; when is imperfect this is not a separable closure, and the module is still . When the discriminant of is zero, the module is the group of nonsingular points of the singular cubic over .
WeierstrassCurve.Affine.tateShafarevich. Let be a number field and any Weierstrass curve over , again with no assumption on its discriminant. Write for the object galoisRepresentation above. The definition is the additive subgroup of given by
where:
- is Mathlib's type of infinite places of : the absolute values on of the form for some ring homomorphism . Every real place and every complex place is included (a pair of complex-conjugate embeddings gives one place). For , is the completion of with respect to that absolute value, with its canonical -algebra structure. For a complex place this completion is isomorphic to .
- is the set of all nonzero prime ideals of the ring of integers (Mathlib's height-one spectrum). For each , is the completion of with respect to the -adic valuation, with its canonical -algebra structure.
Unfolding the two subgroups: a class lies in if and only if, for every infinite place and every nonzero prime of ,
where is the map on continuous cohomology induced by the continuous homomorphism with the identity on coefficients. In each local group the coefficient module is itself, with discrete topology and with acting through ; the group does not appear. Each is built from one specific -embedding fixed by Mathlib's choice; the definition uses that one embedding per place and does not quantify over embeddings.