/- 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. -/ module public import FormalConjecturesForMathlib.RepresentationTheory.Homological.ContCohomology.Sha public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point public import Mathlib.NumberTheory.NumberField.Completion.FinitePlace public 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. 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

    J. S. Milne, Elliptic Curves, 2nd ed., Chapter IV, Remark 1.11, p. 111, explains the use of a separable closure over imperfect fields.

@[expose] public section@[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 := R:Type u_1S:Type u_2F:Type u_3inst✝⁷:CommRing Rinst✝⁶:CommRing Sinst✝⁵:Field FW':Affine Rinst✝⁴:DecidableEq Finst✝³:Algebra R Sinst✝²:Algebra R Finst✝¹:Algebra S Finst✝:IsScalarTower R S FP:(W'⁄F).Point⊢ (map (AlgHom.id S F)) P = P R:Type u_1S:Type u_2F:Type u_3inst✝⁷:CommRing Rinst✝⁶:CommRing Sinst✝⁵:Field FW':Affine Rinst✝⁴:DecidableEq Finst✝³:Algebra R Sinst✝²:Algebra R Finst✝¹:Algebra S Finst✝:IsScalarTower R S F⊢ (map (AlgHom.id S F)) zero = zeroR:Type u_1S:Type u_2F:Type u_3inst✝⁷:CommRing Rinst✝⁶:CommRing Sinst✝⁵:Field FW':Affine Rinst✝⁴:DecidableEq Finst✝³:Algebra R Sinst✝²:Algebra R Finst✝¹:Algebra S Finst✝:IsScalarTower R S Fx✝:Fy✝:Fh✝:(W'⁄F).Nonsingular x✝ y✝⊢ (map (AlgHom.id S F)) (some x✝ y✝ h✝) = some x✝ y✝ h✝ R:Type u_1S:Type u_2F:Type u_3inst✝⁷:CommRing Rinst✝⁶:CommRing Sinst✝⁵:Field FW':Affine Rinst✝⁴:DecidableEq Finst✝³:Algebra R Sinst✝²:Algebra R Finst✝¹:Algebra S Finst✝:IsScalarTower R S F⊢ (map (AlgHom.id S F)) zero = zeroR:Type u_1S:Type u_2F:Type u_3inst✝⁷:CommRing Rinst✝⁶:CommRing Sinst✝⁵:Field FW':Affine Rinst✝⁴:DecidableEq Finst✝³:Algebra R Sinst✝²:Algebra R Finst✝¹:Algebra S Finst✝:IsScalarTower R S Fx✝:Fy✝:Fh✝:(W'⁄F).Nonsingular x✝ y✝⊢ (map (AlgHom.id S F)) (some x✝ y✝ h✝) = some x✝ y✝ h✝ All goals completed! 🐙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 := rflnamespace WeierstrassCurve.Affineopen ContinuousCohomology IsDedekindDomain NumberFieldvariable {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' := K:Type u_1inst✝:Field KW:Affine K⊢ (let __spread.0 := (Point.map ↑1).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) = 1 K:Type u_1inst✝:Field KW:Affine Kx✝:(W⁄(AlgebraicClosure K)).Point⊢ (let __spread.0 := (Point.map ↑1).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) x✝ = 1 x✝; All goals completed! 🐙 map_mul' σ τ := K:Type u_1inst✝:Field KW:Affine Kσ:Field.absoluteGaloisGroup Kτ:Field.absoluteGaloisGroup K⊢ (let __spread.0 := (Point.map ↑(σ * τ)).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) = (let __spread.0 := (Point.map ↑σ).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) * let __spread.0 := (Point.map ↑τ).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ } K:Type u_1inst✝:Field KW:Affine Kσ:Field.absoluteGaloisGroup Kτ:Field.absoluteGaloisGroup Kx✝:(W⁄(AlgebraicClosure K)).Point⊢ (let __spread.0 := (Point.map ↑(σ * τ)).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) x✝ = ((let __spread.0 := (Point.map ↑σ).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) * let __spread.0 := (Point.map ↑τ).toIntLinearMap; { toLinearMap := __spread.0, cont := ⋯ }) x✝; All goals completed! 🐙 }

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 1end WeierstrassCurve.Affine