Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Adelic): reuse the finite adele norm comparison for openness
alkor200047ea630b89fc
diff --git a/src/Lib/Adelic/Adeles/IdeleModulus.lean b/src/Lib/Adelic/Adeles/IdeleModulus.leanindex 607cb69e54a..96000d5f353 100644--- a/src/Lib/Adelic/Adeles/IdeleModulus.lean+++ b/src/Lib/Adelic/Adeles/IdeleModulus.lean@@ -2,6 +2,7 @@ modulepublic import TauCeti.RingTheory.DedekindDomain.AdicValuation.ResidueFieldimport TauCeti.NumberTheory.NumberField.Global.Ideles.Norm.Compatibility+import TauCeti.NumberTheory.NumberField.Global.Ideles.Norm.Openimport TauCeti.NumberTheory.NumberField.Countableimport TauCeti.NumberTheory.NumberField.Global.Places.HaarCharacterimport TauCeti.NumberTheory.NumberField.Global.Places.PowerClasses@@ -543,6 +544,24 @@ lemma adeleNorm_locIdele (w : FinPlace L) (y : (LocField w)ˣ) :-- Take norms and look at `v`, where the norm of `e`, a power of the idempotent, is `1`.simpa [e, adeleNorm_finAdeleIncl, hv] using congrArg (adeleNorm K L · v) e_mul+variable (K L) in+/-- The norm group in the finite ideles of a number field is open. -/+lemma isOpen_range_finite_idele_norm :+ IsOpen ((Units.map (adeleNorm K L)).range : Set (𝔸f K)ˣ) := by+ -- The pullback of the full norm group along the inclusion of finite ideles is open.+ let U := (TauCeti.GlobalNumberFields.ideleNormMap K L).toMonoidHom.range.comap+ (NumberField.IdeleGroup.ofFiniteIdele (𝓞 K) K)+ have hU : IsOpen (U : Set (𝔸f K)ˣ) :=+ (TauCeti.GlobalNumberFields.isOpen_range_ideleNormMap K L).preimage+ (NumberField.IdeleGroup.continuous_ofFiniteIdele (𝓞 K) K)+ -- The finite part of a full norm is the norm of the finite part.+ refine Subgroup.isOpen_mono ?_ hU+ rintro x ⟨z, hz⟩+ refine ⟨NumberField.IdeleGroup.toFiniteIdele (𝓞 L) L z, Units.ext ?_⟩+ change adeleNorm K L _ = x.val+ rw [adeleNorm_eq_finiteAdeleNorm]+ simpa using congrArg (fun a : NumberField.IdeleGroup (𝓞 K) K ↦ a.val.2) hz+/-- If every component of the finite idele `y` of `L` is a unit of the local integers, that is, `y`is in `idelesUnitOff ∅`, then every component of its norm to `K` has valuation `1`. -/lemma v_adeleNorm_eq_one {y : (𝔸f L)ˣ} (hy : y ∈ idelesUnitOff ∅)diff --git a/src/Lib/ClassField/Global/NormTheorems.lean b/src/Lib/ClassField/Global/NormTheorems.leanindex 2fcb5bbf2fa..361a5f3a05d 100644--- a/src/Lib/ClassField/Global/NormTheorems.lean+++ b/src/Lib/ClassField/Global/NormTheorems.lean@@ -2,7 +2,6 @@ moduleimport Mathlib.FieldTheory.Galois.Profiniteimport Mathlib.Topology.Sheaves.Presheaf-import TauCeti.NumberTheory.NumberField.Global.Ideles.Norm.Openpublic import Lib.ClassField.Local.ArtinMapimport Lib.ClassField.Global.AlbertBrauerHasseNoetherimport Lib.ClassField.Global.ArtinMap@@ -179,29 +178,6 @@ lemma index_ker_abelianLift_comp_artinMap :_ = (ker χ).index := (index_comap_of_surjective _ (mk'_surjective _)).symm_ = finrank K L := (eq_fixingSubgroup_of_isProGalois (Γ := Γ) (L := L)).right-open scoped NumberField in-/-- The norm group in the finite ideles of a number field is open. -/-private lemma isOpen_range_finite_idele_norm (K L : Type*) [Field K] [NumberField K]- [Field L] [NumberField L] [Algebra K L] :- IsOpen ((Units.map (adeleNorm K L)).range : Set (𝔸f K)ˣ) := by- -- The two finite adele norms are continuous and agree with the field norm on diagonal elements.- have h_norm : (adeleNorm K L : 𝔸f L → 𝔸f K) = TauCeti.GlobalNumberFields.finiteAdeleNorm K L :=- denseRange_algebraMap_finAdele.equalizer (continuous_adeleNorm K L)- (TauCeti.GlobalNumberFields.continuous_finiteAdeleNorm K L) (funext fun x ↦ by simp)- -- The pullback of the full norm group along the inclusion of finite ideles is open.- let U := (TauCeti.GlobalNumberFields.ideleNormMap K L).toMonoidHom.range.comap- (NumberField.IdeleGroup.ofFiniteIdele (𝓞 K) K)- have hU : IsOpen (U : Set (𝔸f K)ˣ) :=- (TauCeti.GlobalNumberFields.isOpen_range_ideleNormMap K L).preimage- (NumberField.IdeleGroup.continuous_ofFiniteIdele (𝓞 K) K)- -- The finite part of a full norm is the norm of the finite part.- refine isOpen_mono ?_ hU- rintro x ⟨z, hz⟩- refine ⟨NumberField.IdeleGroup.toFiniteIdele (𝓞 L) L z, Units.ext ?_⟩- change adeleNorm K L _ = x.val- rw [h_norm]- simpa using congrArg (fun a : NumberField.IdeleGroup (𝓞 K) K ↦ a.val.2) hz-/-- The norm group of the extension `L / K` cut out by `χ`: a finite idele `a` of `K` is killed by`χ ∘ artinMap` exactly when it is a totally positive element of `Kˣ` times the norm of a finiteidele of `L`. A case of the Artin reciprocity law. -/