Skip to content

Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.

Python

refactor(Adelic): share the comparison of finite adele norms

alkor2000310803f63ffc
diff --git a/src/Lib/Adelic/Adeles/IdeleModulus.lean b/src/Lib/Adelic/Adeles/IdeleModulus.lean
index 097e4242934..607cb69e54a 100644
--- a/src/Lib/Adelic/Adeles/IdeleModulus.lean
+++ b/src/Lib/Adelic/Adeles/IdeleModulus.lean
@@ -1,6 +1,7 @@
module
public import TauCeti.RingTheory.DedekindDomain.AdicValuation.ResidueField
+import TauCeti.NumberTheory.NumberField.Global.Ideles.Norm.Compatibility
import TauCeti.NumberTheory.NumberField.Countable
import TauCeti.NumberTheory.NumberField.Global.Places.HaarCharacter
import TauCeti.NumberTheory.NumberField.Global.Places.PowerClasses
@@ -448,6 +449,20 @@ lemma adeleNorm_algebraMap (x : L) : adeleNorm K L x = Algebra.norm K x := by
rw [norm_eq_matrix_det (adeleBasis b), h_mat, norm_eq_matrix_det b, RingHom.map_det]
rfl
+/-- The algebra norm on finite adeles agrees with the product of local norms. -/
+private lemma adeleNorm_eq_finiteAdeleNorm (x : 𝔸f L) :
+ adeleNorm K L x = TauCeti.GlobalNumberFields.finiteAdeleNorm K L x := by
+ -- Both norms are continuous and extend the field norm on the dense diagonal copy of `L`.
+ exact denseRange_algebraMap_finAdele.eq (fun z ↦ by simp) (x := x)
+
+/-- A finite idele has the same module when regarded as an idele with trivial infinite part. -/
+private lemma finIdeleAbs_eq_ideleNorm {F : Type*} [Field F] [NumberField F] (x : (𝔸f F)ˣ) :
+ finIdeleAbs x = ((TauCeti.GlobalNumberFields.ideleNorm
+ (IdeleGroup.ofFiniteIdele (𝓞 F) F x) : NNReal) : ℝ) := by
+ rw [TauCeti.GlobalNumberFields.coe_ideleNorm, finIdeleAbs_apply]
+ simp
+ rfl
+
/-- For `a` a finite adele of `K`, the norm to `K` of its image in the adeles of `L` is
`a ^ [L : K]`. -/
lemma adeleNorm_finAdeleIncl (a : 𝔸f K) :
@@ -470,6 +485,41 @@ noncomputable def localNorm (w : FinPlace L) : (LocField w)ˣ →* (LocField (Fi
variable {K L}
+open scoped AdicCompletionExtension in
+/-- Let `k` be a number field below `K` and `u` the place of `k` below `w`. The completion `K_w` is
+finite over `k_u`, along `New.locMap`, the map of completions induced by `k → K`, and the local norm
+`New.localNorm k w` is the norm of this extension. -/
+lemma IsPlaceOver.finite_and_localNorm_eq_norm {K : Type} [Field K] [NumberField K]
+ (k : Type) [Field k] [NumberField k] [Algebra k K]
+ (w : FinPlace K) :
+ letI : Algebra (LocField (w.below k)) (LocField w) := (locMap (algebraMap k K) rfl).toAlgebra
+ Module.Finite (LocField (w.below k)) (LocField w) ∧
+ ∀ y : (LocField w)ˣ, localNorm k w y = y.map (Algebra.norm (LocField (w.below k))) := by
+ classical
+ let u := w.below k
+ let _ : w.asIdeal.LiesOver u.asIdeal := ⟨rfl⟩
+ let P (a : Algebra (LocField u) (LocField w)) : Prop :=
+ letI := a
+ Module.Finite (LocField u) (LocField w) ∧
+ ∀ y : (LocField w)ˣ, localNorm k w y = y.map (Algebra.norm (LocField u))
+ have h_alg : (locMap (algebraMap k K) (rfl : w.comap (algebraMap k K) = u)).toAlgebra =
+ IsDedekindDomain.HeightOneSpectrum.adicCompletionExtensionAlgebra k K u w := by
+ refine Algebra.algebra_ext _ _ fun x ↦ ?_
+ rw [RingHom.algebraMap_toAlgebra,
+ IsDedekindDomain.HeightOneSpectrum.algebraMap_adicCompletionExtensionAlgebra]
+ exact RingHom.congr_fun
+ (IsDedekindDomain.HeightOneSpectrum.eq_adicCompletionExtension_of_continuous k K u w
+ (continuous_locMap _ _) (fun z ↦ locMap_algebraMap _ _ z)) x
+ change P _
+ rw [h_alg]
+ refine ⟨inferInstance, fun y ↦ Units.ext ?_⟩
+ change adeleNorm k K (locIdele w y).val u = Algebra.norm (LocField u) y.val
+ rw [adeleNorm_eq_finiteAdeleNorm, TauCeti.GlobalNumberFields.finiteAdeleNorm_apply,
+ finprod_eq_single _ ⟨w, inferInstance⟩]
+ · rw [locIdele_apply_self]
+ · rintro ⟨v, hv⟩ hne
+ rw [locIdele_apply_of_ne (fun h ↦ hne (Subtype.ext h)), map_one]
+
lemma adeleNorm_mem_Ô {y : 𝔸f L} (hy : y ∈ Ô L) : adeleNorm K L y ∈ Ô K := by
-- `𝓞 L` is dense in `Ô L`, the set `Ô K` is closed, and norms of integers are integers
refine Set.MapsTo.closure_left ?_ (by fun_prop) isCompact_Ô.isClosed
@@ -527,8 +577,8 @@ end AdeleNorm
(`New.locIdele`), the norm at the place below has absolute value `‖y‖` and valuation `v y ^ f`,
where `f` is the residue degree.
-The local statements follow from the global one, which rests on the product formula and the
-finiteness of the class group.
+The local statements follow by applying the global compatibility of the idele module with the
+relative norm to an idele supported at one place.
-/
section NormAbsValue
@@ -544,22 +594,17 @@ variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L] [Alge
absolute values of the components, of a finite idele. -/
lemma finIdeleAbs_adeleNorm (y : (𝔸f L)ˣ) :
finIdeleAbs (Units.map (adeleNorm K L) y) = finIdeleAbs y := by
- -- The class number `n` is not zero, and `y ^ n` is a principal idele times an idele `u` whose
- -- components are units of the local integers; both sides are nonnegative and multiplicative.
- obtain ⟨_, ⟨x, rfl⟩, u, hu, hxu⟩ := Subgroup.mem_sup.1 (pow_classNumber_mem_principal_sup y)
- have h_map : Units.map (adeleNorm K L) (principalIdele x) = principalIdele (x.map (norm K)) :=
- Units.ext (adeleNorm_algebraMap K L x.val)
- -- `u` and its norm have valuation one at every place
- have h_abs_u : finIdeleAbs u = 1 := ideleAbs_finIdeleIncl_eq_one hu
- have h_abs_norm_u : finIdeleAbs (Units.map (adeleNorm K L) u) = 1 := by
- simp [finIdeleAbs_apply, norm_def, v_adeleNorm_eq_one hu]
- refine (pow_left_inj₀ ideleAbs_pos.le ideleAbs_pos.le (classNumber_ne_zero L)).1 ?_
- calc finIdeleAbs (.map (adeleNorm K L) y) ^ classNumber L
- _ = finIdeleAbs (principalIdele (x.map (norm K))) := by
- simp [← map_pow, ← hxu, h_map, h_abs_norm_u]
- -- the module of `x` is `|N x|⁻¹` (product formula), and norms are transitive
- _ = finIdeleAbs (principalIdele x * u) := by simp [Algebra.norm_norm, h_abs_u]
- _ = finIdeleAbs y ^ classNumber L := by rw [hxu, map_pow]
+ have h_norm : TauCeti.GlobalNumberFields.ideleNormMap K L
+ (IdeleGroup.ofFiniteIdele (𝓞 L) L y) =
+ IdeleGroup.ofFiniteIdele (𝓞 K) K (Units.map (adeleNorm K L) y) := by
+ apply Units.ext
+ apply Prod.ext
+ · simp [TauCeti.GlobalNumberFields.coe_ideleNormMap]
+ · simpa only [TauCeti.GlobalNumberFields.coe_ideleNormMap,
+ TauCeti.GlobalNumberFields.adeleNorm_snd, IdeleGroup.coe_ofFiniteIdele, Units.coe_map]
+ using (adeleNorm_eq_finiteAdeleNorm K L y.val).symm
+ rw [finIdeleAbs_eq_ideleNorm, finIdeleAbs_eq_ideleNorm, ← h_norm,
+ TauCeti.GlobalNumberFields.ideleNorm_ideleNormMap]
/-- The local norm from `L_w` to the completion of `K` at the place below `w` keeps the normalised
absolute value. -/
diff --git a/src/Lib/ClassField/Local/ArtinMap.lean b/src/Lib/ClassField/Local/ArtinMap.lean
index ba83bfc5dcf..7ad85a8ac93 100644
--- a/src/Lib/ClassField/Local/ArtinMap.lean
+++ b/src/Lib/ClassField/Local/ArtinMap.lean
@@ -6,7 +6,6 @@ import Mathlib.Topology.Algebra.Group.Units
import Mathlib.Topology.Algebra.Ring.Compact
import Mathlib.Topology.Connected.Separation
import Mathlib.Topology.MetricSpace.Ultra.TotallySeparated
-import TauCeti.NumberTheory.NumberField.Global.Adeles.Norm.Continuity
import TauCeti.RingTheory.Valuation.ValuationSubring
public import Lib.Adelic.Adeles.IdeleModulus
public import Lib.ClassField.GaloisCohomology.KummerCyclicClasses
@@ -357,45 +356,6 @@ lemma isLocalArtin_localArtin {p : ℕ} [Fact p.Prime] [Algebra (LocField w) (Pa
rw [← agree] at hf
exact ⟨hf, spec⟩
-open scoped AdicCompletionExtension in
-omit h [Algebra K Ω] in
-/-- Let `k` be a number field below `K` and `u` the place of `k` below `w`. The completion `K_w` is
-finite over `k_u`, along `New.locMap`, the map of completions induced by `k → K`, and the local norm
-`New.localNorm k w` is the norm of this extension. -/
-lemma finite_and_localNorm_eq_norm (k : Type) [Field k] [NumberField k] [Algebra k K]
- (w : FinPlace K) :
- letI : Algebra (LocField (w.below k)) (LocField w) := (locMap (algebraMap k K) rfl).toAlgebra
- Module.Finite (LocField (w.below k)) (LocField w) ∧
- ∀ y : (LocField w)ˣ, localNorm k w y = y.map (Algebra.norm (LocField (w.below k))) := by
- let u := w.below k
- let P (a : Algebra (LocField u) (LocField w)) : Prop :=
- letI := a
- Module.Finite (LocField u) (LocField w) ∧
- ∀ y : (LocField w)ˣ, localNorm k w y = y.map (Algebra.norm (LocField u))
- have h_alg : (locMap (algebraMap k K) (rfl : w.comap (algebraMap k K) = u)).toAlgebra =
- IsDedekindDomain.HeightOneSpectrum.adicCompletionExtensionAlgebra k K u w := by
- refine Algebra.algebra_ext _ _ fun x ↦ ?_
- rw [RingHom.algebraMap_toAlgebra,
- IsDedekindDomain.HeightOneSpectrum.algebraMap_adicCompletionExtensionAlgebra]
- exact RingHom.congr_fun
- (IsDedekindDomain.HeightOneSpectrum.eq_adicCompletionExtension_of_continuous k K u w
- (continuous_locMap _ _) (fun z ↦ locMap_algebraMap _ _ z)) x
- change P _
- rw [h_alg]
- refine ⟨inferInstance, fun y ↦ Units.ext ?_⟩
- have h_norm (x : 𝔸f K) :
- adeleNorm k K x = TauCeti.GlobalNumberFields.finiteAdeleNorm k K x :=
- denseRange_algebraMap_finAdele.eq (fun z ↦
- (adeleNorm_algebraMap k K z).trans
- (TauCeti.GlobalNumberFields.finiteAdeleNorm_algebraMap k K z).symm)
- (continuous_adeleNorm k K) (TauCeti.GlobalNumberFields.continuous_finiteAdeleNorm k K) x
- change adeleNorm k K (locIdele w y).val u = Algebra.norm (LocField u) y.val
- rw [h_norm, TauCeti.GlobalNumberFields.finiteAdeleNorm_apply,
- finprod_eq_single _ ⟨w, inferInstance⟩]
- · rw [locIdele_apply_self]
- · rintro ⟨v, hv⟩ hne
- rw [locIdele_apply_of_ne (fun h ↦ hne (Subtype.ext h)), map_one]
-
omit h in
/-- Let `j : Ω → Ω` extend `k → K`. An embedding of `K_w` in `ℚ̄_p` that induces `A` along `i`
restricts to an embedding of the completion of `k` below `w` that induces `A.comap j` along