Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | public import Mathlib.Analysis.Complex.Circle |
| 4 | public import Mathlib.NumberTheory.NumberField.Discriminant.Defs |
| 5 | public import TauCeti.RingTheory.DedekindDomain.FiniteAdeleRing.BorelSpace |
| 6 | import Mathlib.Analysis.SpecialFunctions.Complex.Circle |
| 7 | import Mathlib.Dynamics.Ergodic.Action.Regular |
| 8 | import Mathlib.Dynamics.FixedPoints.Topology |
| 9 | import Mathlib.NumberTheory.NumberField.Discriminant.Basic |
| 10 | import Mathlib.Order.CompletePartialOrder |
| 11 | import Mathlib.RingTheory.PiTensorProduct |
| 12 | import Mathlib.Tactic.Linter.Style |
| 13 | import Mathlib.Topology.Separation.CompletelyRegular |
| 14 | import TauCeti.RingTheory.DedekindDomain.AdicValuation.ResidueField |
| 15 | import TauCeti.Topology.Algebra.Group.Units |
| 16 | import TauCeti.Topology.Instances.Matrix |
| 17 | public import Lib.Adelic.Adeles.Basic |
| 18 | public import Lib.Adelic.QuotientMeasure.Basic |
| 19 | public import Lib.General.Groups.CongruenceSubgroups |
| 20 | |
| 21 | /-! |
| 22 | # The additive character, Haar measures and the rational lattice in the adeles |
| 23 | |
| 24 | The adeles `New.𝔸` of a number field `E` are one copy of `ℂ` for each infinite place, times the |
| 25 | finite adeles `New.𝔸f`; this is the adele ring when `E` is totally complex. `New.Ô` is the ring of |
| 26 | integral finite adeles. The file defines the standard additive character and the Haar measures |
| 27 | used in Fourier analysis on `New.𝔸`. For a totally complex field `E`, it proves that `E`, embedded |
| 28 | diagonally by `New.toAdele`, is a cocompact lattice of covolume one, and so are vectors and matrices |
| 29 | over `E`. The proof uses a fundamental domain built from a fractional ideal. |
| 30 | |
| 31 | ## Main definitions and results |
| 32 | |
| 33 | * `New.ψf`: the character of the finite adeles that is trivial on `New.Ô` (`New.ψf_eq_one_of_mem`) |
| 34 | and is `𝐞 (tr a)` on `a ∈ E` (`New.ψf_coe`), where `𝐞 t = exp (2πi t)`. These two properties |
| 35 | define it, since every finite adele is an element of `E` plus an integral one. |
| 36 | * `New.stdAddChar`: its product with `𝐞 (-∑_w 2 re x_w)`. Here `x_w` is the component of the adele |
| 37 | at the infinite place `w`. |
| 38 | * `New.volume_Ô`: `volume` on the finite adeles gives `New.Ô` the mass `New.volÔ`. On a completion |
| 39 | `New.LocField w`, `volume` gives the local integers mass one (`New.volume_LocInt`). On the adeles |
| 40 | it is the product with Lebesgue measure on each `ℂ`. |
| 41 | * `New.ratAdeles`, `New.ratVectors`, `New.ratMatrices`: the rational points, vectors and matrices. |
| 42 | * `New.HasFundDomain`: a compact set contains a fundamental domain of volume one. |
| 43 | * `New.IsCovolOneLattice`: a discrete cocompact subgroup whose quotient measure has mass one. |
| 44 | |
| 45 | Notions from other files: |
| 46 | * `New.LocField`, `New.LocInt`: The completion E_w of E at the finite place w and its ring of |
| 47 | integers. |
| 48 | * `New.PlaceEmbedding E`: a choice, for each infinite place `w`, of a complex embedding `Φ w` of |
| 49 | `E` that induces `w`. The map `New.toAdele` uses these embeddings at the infinite places. |
| 50 | |
| 51 | ## Relation to the literature |
| 52 | |
| 53 | For totally complex `E` the file proves a known result: a number field is a discrete subgroup of its |
| 54 | adeles with compact quotient, here with a measure for which the covolume is one. |
| 55 | -/ |
| 56 | |
| 57 | @[expose] public section |
| 58 | |
| 59 | noncomputable section |
| 60 | |
| 61 | /-! |
| 62 | ## A fundamental domain for a fractional ideal and its volume |
| 63 | |
| 64 | `New.exists_fundDomain_prod` builds a fundamental domain `F ×ˢ O` for a number field `I` acting by |
| 65 | translations on `V × W` (in the applications: infinite part times finite part of adeles), with `F` a |
| 66 | fundamental parallelotope of a fractional ideal, and gives the volume of `F`. |
| 67 | -/ |
| 68 | |
| 69 | section FundamentalDomain |
| 70 | |
| 71 | open MeasureTheory NumberField mixedEmbedding ZSpan nonZeroDivisors |
| 72 | |
| 73 | open scoped Classical in |
| 74 | /-- Let `j : I →+ V × W` be additive on the number field `I`. Assume that the second component of |
| 75 | `j` lies in the subgroup `O` exactly on the fractional ideal `J`, and that `W` is the sum of the |
| 76 | second components and `O`. Assume also that the first component is the Minkowski embedding followed |
| 77 | by a measure-preserving linear isomorphism `e`. Then there is a bounded measurable set `F` in `V` |
| 78 | such that (a) `F` has volume `N(J) 2^(-r₂) √|disc I|`, with `r₂` the number of complex places, and |
| 79 | (b) for each `x` exactly one `a : I` has `j a + x ∈ F ×ˢ O`. -/ |
| 80 | lemma New.exists_fundDomain_prod {I V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 81 | [MeasureSpace V] [BorelSpace V] [AddCommGroup W] [Field I] [NumberField I] (j : I →+ V × W) |
| 82 | (O : AddSubgroup W) (J : (FractionalIdeal (𝓞 I)⁰ I)ˣ) (hO : ∀ a : I, (j a).2 ∈ O ↔ a ∈ J.val) |
| 83 | (h_approx : ∀ w : W, ∃ a : I, w - (j a).2 ∈ O) |
| 84 | (e : mixedSpace I ≃ₗ[ℝ] V) (he : MeasurePreserving e) |
| 85 | (h_emb : ∀ a : I, e (mixedEmbedding I a) = (j a).1) : |
| 86 | ∃ F : Set V, |
| 87 | MeasurableSet F ∧ |
| 88 | Bornology.IsBounded F ∧ |
| 89 | -- (a) |
| 90 | volume F = |
| 91 | ENNReal.ofReal J.val.absNorm * (2⁻¹ ^ InfinitePlace.nrComplexPlaces I * ‖discr I‖₊.sqrt) ∧ |
| 92 | -- (b) |
| 93 | ∀ x : V × W, ∃! a : I, j a + x ∈ F ×ˢ O := by |
| 94 | -- `F` is the fundamental domain of the lattice `J`, moved to `V` by `e`. |
| 95 | let b : Module.Basis (Module.Free.ChooseBasisIndex ℤ J) ℝ V := |
| 96 | (fractionalIdealLatticeBasis I J).map e |
| 97 | refine ⟨fundamentalDomain b, by measurability, fundamentalDomain_isBounded b, ?_, fun x ↦ ?_⟩ |
| 98 | · -- `e` preserves the measure; Mathlib has the covolumes of `J` and of the ring of integers |
| 99 | have h_preimage : e ⁻¹' fundamentalDomain b = |
| 100 | fundamentalDomain (fractionalIdealLatticeBasis I J) := by |
| 101 | simp [b, ← map_fundamentalDomain, e.injective.preimage_image] |
| 102 | rw [← he.measure_preimage (by measurability), h_preimage, |
| 103 | volume_fundamentalDomain_fractionalIdealLatticeBasis, volume_fundamentalDomain_latticeBasis] |
| 104 | · -- First move the second component into `O` by subtracting some `j a`. The elements that keep |
| 105 | -- it in `O` are those of `J`, and exactly one of them moves the first component into `F`. |
| 106 | obtain ⟨a, ha⟩ := h_approx x.2 |
| 107 | have h_span (v : V) : v ∈ Submodule.span ℤ (Set.range b) ↔ ∃ c ∈ J.val, (j c).1 = v := by |
| 108 | simp [b, ← map, ← h_emb, mem_span_fractionalIdealLatticeBasis] |
| 109 | have h_inj : Function.Injective fun c : I ↦ (j c).1 := by |
| 110 | simpa [← h_emb, Function.comp_def] using e.injective.comp (mixedEmbedding_injective I) |
| 111 | have h_unique : ∃! c : I, (j c).1 + (x - j a).1 ∈ fundamentalDomain b ∧ c ∈ J.val := by |
| 112 | obtain ⟨⟨v, hv⟩, h_mem, h_uniq⟩ := exist_unique_vadd_mem_fundamentalDomain b (x - j a).1 |
| 113 | obtain ⟨c, hc, rfl⟩ := (h_span v).1 hv |
| 114 | exact ⟨c, ⟨h_mem, hc⟩, fun d ⟨hd_mem, hd⟩ ↦ h_inj <| |
| 115 | congrArg Subtype.val (h_uniq ⟨(j d).1, (h_span _).2 ⟨d, hd, rfl⟩⟩ hd_mem)⟩ |
| 116 | -- the translate sought is `c - a` |
| 117 | refine (Equiv.subRight a).existsUnique_congr_right.1 ?_ |
| 118 | simpa [add_comm_sub, add_mem_cancel_right ha, hO] using h_unique |
| 119 | |
| 120 | end FundamentalDomain |
| 121 | |
| 122 | /-! |
| 123 | ## The standard additive character and the Haar measures on adeles |
| 124 | |
| 125 | Instances give the topological and measurable structure of the adeles, the finite adeles, the |
| 126 | completions `New.LocField w` and the unitary groups `New.U J` of complex matrices. |
| 127 | -/ |
| 128 | |
| 129 | section AdditiveCharDefs |
| 130 | |
| 131 | open NumberField MeasureTheory Measure FourierTransform Algebra AddChar QuotientAddGroup |
| 132 | |
| 133 | namespace New |
| 134 | |
| 135 | variable (E : Type*) [Field E] [NumberField E] |
| 136 | |
| 137 | /-! ### The standard additive character and the mass of the integral adeles -/ |
| 138 | |
| 139 | /-- The character `𝐞 t = exp (2πi t)` is trivial exactly at the integers. -/ |
| 140 | lemma fourierChar_eq_one_iff {t : ℝ} : 𝐞 t = 1 ↔ ∃ n : ℤ, t = n := |
| 141 | Circle.exp_eq_one.trans (by field_simp) |
| 142 | |
| 143 | /-- The number 2^{r₂}/√|disc E|, where r₂ is the number of complex places of E. When E is totally |
| 144 | complex and the infinite places carry Lebesgue measure, it is the volume of the integral finite |
| 145 | adeles for which the quotient of the adeles by E has total mass one. -/ |
| 146 | def volÔ : NNReal := 2 ^ InfinitePlace.nrComplexPlaces E / ‖NumberField.discr E‖₊.sqrt |
| 147 | |
| 148 | /-- Every class of finite adeles modulo `Ô` contains an element of `E`. -/ |
| 149 | lemma mk_algebraMap_surjective : |
| 150 | Function.Surjective ((mk' (Ô E).toAddSubgroup).comp (algebraMap E (𝔸f E) : E →+ 𝔸f E)) := by |
| 151 | rintro ⟨x⟩ |
| 152 | exact (exists_sub_mem_Ô x).imp fun a ha ↦ (eq_iff_sub_mem.mpr ha).symm |
| 153 | |
| 154 | /-- For an algebraic integer `a` of `E`, the value `𝐞 (tr a) = exp (2πi Tr_{E/ℚ} a)` is one. -/ |
| 155 | lemma fourierChar_trace_eq_one {a : E} (ha : IsIntegral ℤ a) : 𝐞 (trace ℚ E a) = 1 := |
| 156 | -- the trace of an algebraic integer is an integer |
| 157 | fourierChar_eq_one_iff.mpr ⟨trace ℤ (𝓞 E) ⟨a, ha⟩, mod_cast (coe_trace_int ⟨a, ha⟩).symm⟩ |
| 158 | |
| 159 | /-- The standard additive character of the finite adeles: ψ_f(x) = exp(2πi Tr_{E/ℚ}(a)) for any |
| 160 | a in E with x − a integral. -/ |
| 161 | def ψf : AddChar (𝔸f E) Circle := |
| 162 | -- `𝐞 ∘ tr` on `E` kills the algebraic integers, so it descends along the surjection |
| 163 | -- `E → 𝔸f E ⧸ Ô E`; compose with the quotient map `𝔸f E → 𝔸f E ⧸ Ô E`. |
| 164 | toAddMonoidHomEquiv.symm <| |
| 165 | AddMonoidHom.comp |
| 166 | (((mk' (Ô E).toAddSubgroup).comp (algebraMap E (𝔸f E))).liftOfSurjective |
| 167 | (mk_algebraMap_surjective E) |
| 168 | ⟨AddMonoidHom.mk' (fun a : E ↦ 𝐞 (trace ℚ E a)) (by aesop (add simp map_add_eq_mul)), |
| 169 | fun a ha ↦ fourierChar_trace_eq_one E (algebraMap_mem_Ô.1 (by aesop))⟩) |
| 170 | (mk' (Ô E).toAddSubgroup) |
| 171 | |
| 172 | /-- The standard additive character of `New.𝔸 E` (the adele ring when E is totally complex): the |
| 173 | product of exp(−2πi ∑_w 2 Re x_w) over the infinite places and ψ_f of the finite part. -/ |
| 174 | def stdAddChar : AddChar (𝔸 E) Circle where |
| 175 | toFun x := 𝐞 (-∑ w : InfinitePlace E, 2 * (x.1 w).re) * ψf E x.2 |
| 176 | map_zero_eq_one' := by simp |
| 177 | map_add_eq_mul' := by |
| 178 | simp [mul_add, Finset.sum_add_distrib, map_add_eq_mul] |
| 179 | grind |
| 180 | |
| 181 | variable {E} {n : Type*} (w : FinPlace E) [Fintype n] [DecidableEq n] (J : Matrix n n ℂ) |
| 182 | |
| 183 | instance : PolishSpace (U J) where |
| 184 | |
| 185 | instance : LocallyCompactSpace (U J) := inferInstance |
| 186 | |
| 187 | instance : MeasureSpace (LocField w) where |
| 188 | -- the Haar measure that gives the local ring of integers mass one |
| 189 | volume := |
| 190 | addHaarMeasure ⟨⟨LocInt w, isCompact_LocInt w⟩, |
| 191 | (Valued.isOpen_integer (LocField w)).interior_eq.substr (by simp)⟩ |
| 192 | |
| 193 | instance : IsAddHaarMeasure (volume (α := LocField w)) := isAddHaarMeasure_addHaarMeasure _ |
| 194 | |
| 195 | /-- The chosen Haar measure on the completion `E_w` gives its ring of integers mass one. -/ |
| 196 | @[simp] |
| 197 | lemma volume_LocInt : volume (LocInt w : Set (LocField w)) = 1 := addHaarMeasure_self |
| 198 | |
| 199 | /-- The number `volÔ E` is nonzero. -/ |
| 200 | @[simp] |
| 201 | lemma volÔ_ne_zero : volÔ E ≠ 0 := by simp [volÔ, discr_ne_zero] |
| 202 | |
| 203 | instance : MeasureSpace (𝔸f E) where |
| 204 | -- the Haar measure that gives `Ô E` the mass `volÔ E` |
| 205 | volume := volÔ E • addHaarMeasure ⟨⟨Ô E, isCompact_Ô⟩, by simp [isOpen_Ô.interior_eq]⟩ |
| 206 | |
| 207 | instance : IsAddHaarMeasure (volume (α := 𝔸f E)) := .nnreal_smul _ (by simp) |
| 208 | |
| 209 | /-- For the chosen Haar measure on the finite adeles of E, the ring Ô of integral finite adeles |
| 210 | has volume 2^{r₂}/√|disc E|. -/ |
| 211 | @[simp] |
| 212 | lemma volume_Ô : volume (Ô E : Set (𝔸f E)) = volÔ E := by |
| 213 | let K : TopologicalSpace.PositiveCompacts (𝔸f E) := |
| 214 | ⟨⟨Ô E, isCompact_Ô⟩, by simp [isOpen_Ô.interior_eq]⟩ |
| 215 | -- unfold the instance that defines `volume` |
| 216 | change (volÔ E • addHaarMeasure K) (K : Set (𝔸f E)) = volÔ E |
| 217 | simp [addHaarMeasure_self] |
| 218 | |
| 219 | /-! ### The finite character, and further instances -/ |
| 220 | |
| 221 | /-- On an element `a` of `E` the finite character `ψf` takes the value `exp (2πi Tr_{E/ℚ} a)`. -/ |
| 222 | lemma ψf_coe (a : E) : ψf E a = 𝐞 (trace ℚ E a) := by |
| 223 | -- `ψf` is defined by descending `𝐞 ∘ tr` along the surjection `π` |
| 224 | let π : E →+ 𝔸f E ⧸ (Ô E).toAddSubgroup := (mk' _).comp (algebraMap E (𝔸f E) : E →+ 𝔸f E) |
| 225 | simp only [ψf, AddChar.toAddMonoidHomEquiv_symm_apply, AddMonoidHom.coe_comp, Function.comp_apply] |
| 226 | exact congrArg Additive.toMul |
| 227 | (AddMonoidHom.liftOfRightInverse_comp_apply π _ _ _ a) |
| 228 | |
| 229 | /-- The finite character `ψf` is trivial on the ring `Ô E` of integral finite adeles. -/ |
| 230 | lemma ψf_eq_one_of_mem {x : 𝔸f E} (h : x ∈ Ô E) : ψf E x = 1 := by |
| 231 | simp [ψf, (eq_zero_iff (N := (Ô E).toAddSubgroup) x).mpr h] |
| 232 | |
| 233 | instance : SigmaFinite (volume (α := 𝔸f E)) := inferInstance |
| 234 | |
| 235 | deriving instance T2Space for 𝔸f E |
| 236 | |
| 237 | deriving instance SecondCountableTopology, T2Space for 𝔸 E |
| 238 | |
| 239 | deriving instance PolishSpace, LocallyCompactSpace, BorelSpace, IsTopologicalRing, |
| 240 | MeasurableSingletonClass for 𝔸 E |
| 241 | |
| 242 | instance : SigmaFinite (volume (α := 𝔸 E)) := inferInstance |
| 243 | |
| 244 | /-- The measure `volume` on `New.𝔸 E` (the adeles, when E is totally complex) is an additive Haar |
| 245 | measure. -/ |
| 246 | instance isAddHaarMeasure_𝔸 : IsAddHaarMeasure (volume (α := 𝔸 E)) := |
| 247 | prod.instIsAddHaarMeasure volume volume |
| 248 | |
| 249 | end New |
| 250 | |
| 251 | end AdditiveCharDefs |
| 252 | |
| 253 | /-! ## Rational points as a cocompact lattice of covolume one -/ |
| 254 | |
| 255 | section RationalLattice |
| 256 | |
| 257 | open NumberField MeasureTheory InfinitePlace IsTotallyComplex Metric Matrix QuotientAddGroup |
| 258 | open scoped Pointwise |
| 259 | |
| 260 | namespace New |
| 261 | |
| 262 | /-- A complex embedding `φ` is the chosen embedding `Φ` of its place or the conjugate of it. -/ |
| 263 | lemma Φ_mk_eq_or_star_eq {E : Type*} [Field E] [PlaceEmbedding E] (φ : E →+* ℂ) : |
| 264 | Φ (InfinitePlace.mk φ) = φ ∨ star (Φ (InfinitePlace.mk φ)) = φ := |
| 265 | mk_eq_iff.mp (mk_Φ _) |
| 266 | |
| 267 | /-- If the complex embeddings `φ` and `ψ` induce the same infinite place, the identity or complex |
| 268 | conjugation carries `φ` to `ψ` by a volume-preserving `ℝ`-algebra automorphism of `ℂ`. -/ |
| 269 | lemma exists_measurePreserving_algEquiv_of_mk_eq {K : Type*} [Field K] (φ ψ : K →+* ℂ) |
| 270 | (h : InfinitePlace.mk φ = InfinitePlace.mk ψ) : |
| 271 | ∃ σ : ℂ ≃ₐ[ℝ] ℂ, MeasurePreserving σ ∧ ∀ x : K, σ (φ x) = ψ x := by |
| 272 | rcases mk_eq_iff.mp h with h | h |
| 273 | · exact ⟨AlgEquiv.refl, MeasurePreserving.id _, fun x ↦ DFunLike.congr_fun h x⟩ |
| 274 | · exact ⟨Complex.conjAe, Complex.conjLIE.measurePreserving, fun x ↦ DFunLike.congr_fun h x⟩ |
| 275 | |
| 276 | variable (E : Type*) [Field E] [PlaceEmbedding E] [NumberField E] (m n : Type*) |
| 277 | {B I : Type*} [AddCommGroup B] [AddCommGroup I] [TopologicalSpace B] |
| 278 | (f : I →+ B) (C : Set B) [MeasureSpace B] |
| 279 | |
| 280 | /-! ### Rational points, fundamental domains and lattices -/ |
| 281 | |
| 282 | /-- The image of E in its adeles under the diagonal embedding, as an additive subgroup. -/ |
| 283 | def ratAdeles : AddSubgroup (𝔸 E) := (toAdele (E := E)).toAddMonoidHom.range |
| 284 | |
| 285 | /-- The additive subgroup of adelic vectors indexed by n that is the image of E^n under the |
| 286 | coordinatewise diagonal embedding. -/ |
| 287 | def ratVectors : AddSubgroup (n → 𝔸 E) := ((toAdele (E := E)).toAddMonoidHom.compLeft n).range |
| 288 | |
| 289 | /-- The additive subgroup of m×n adelic matrices that is the image of the m×n matrices over E |
| 290 | under the entrywise diagonal embedding. -/ |
| 291 | def ratMatrices : AddSubgroup (Matrix m n (𝔸 E)) := |
| 292 | (toAdele (E := E)).toAddMonoidHom.mapMatrix (m := m) (n := n).range |
| 293 | |
| 294 | /-- For an additive map `f : I →+ B` and a set `C` in `B`: `C` is compact and contains a measurable |
| 295 | set `D` of volume one such that every `x` in `B` has exactly one `a` in `I` with `f a + x ∈ D`. -/ |
| 296 | def HasFundDomain : Prop := |
| 297 | IsCompact C ∧ ∃ D ⊆ C, MeasurableSet D ∧ volume D = 1 ∧ ∀ x : B, ∃! a : I, f a + x ∈ D |
| 298 | |
| 299 | /-- A lattice of covolume one: a discrete subgroup `Λ` of `B` with `B ⧸ Λ` compact and of quotient |
| 300 | measure one, such that the translates of one compact set by `Λ` cover `B`. -/ |
| 301 | class IsCovolOneLattice (Λ : AddSubgroup B) extends DiscreteTopology Λ, CompactSpace (B ⧸ Λ), |
| 302 | IsProbabilityMeasure Λ.quotMeasure where |
| 303 | /-- Some compact set meets every coset of `Λ`. -/ |
| 304 | exists_compact_cover (Λ) : Λ.IsCocompact |
| 305 | |
| 306 | variable {f} in |
| 307 | /-- If the range of `f` is a covolume-one lattice, there is a compact set into which every point |
| 308 | can be translated by the image of an element of the source of `f`. -/ |
| 309 | lemma IsCovolOneLattice.exists_compact_cover_of_range (Λ : AddSubgroup B) [IsCovolOneLattice Λ] |
| 310 | (hf : f.range = Λ) : |
| 311 | ∃ K : Set B, IsCompact K ∧ ∀ x : B, ∃ y : I, f y + x ∈ K := by |
| 312 | obtain ⟨K, hK, h_cover⟩ := IsCovolOneLattice.exists_compact_cover Λ |
| 313 | refine ⟨K, hK, fun x ↦ ?_⟩ |
| 314 | obtain ⟨g, hg, hx⟩ := h_cover x |
| 315 | obtain ⟨y, rfl⟩ := AddMonoidHom.mem_range.mp (hf.symm ▸ hg) |
| 316 | exact ⟨y, hx⟩ |
| 317 | |
| 318 | variable {E m n f C} |
| 319 | |
| 320 | /-- A vector of adeles lies in `ratVectors E n` iff every entry lies in `ratAdeles E`. -/ |
| 321 | lemma mem_ratVectors {x : n → 𝔸 E} : x ∈ ratVectors E n ↔ ∀ i : n, x i ∈ ratAdeles E := by |
| 322 | simp [ratVectors, ratAdeles, funext_iff, Classical.skolem] |
| 323 | |
| 324 | /-- A matrix of adeles lies in `ratMatrices E m n` iff every entry lies in `ratAdeles E`. -/ |
| 325 | lemma mem_ratMatrices {x : Matrix m n (𝔸 E)} : |
| 326 | x ∈ ratMatrices E m n ↔ ∀ (i : m) (j : n), x i j ∈ ratAdeles E := by |
| 327 | simp [ratMatrices, ratAdeles, ← ext_iff, Classical.skolem, of.exists_congr_left] |
| 328 | |
| 329 | @[simp, grind .] |
| 330 | lemma toAdele_half_add_half : toAdele (2⁻¹ : E) + toAdele (2⁻¹ : E) = 1 := by |
| 331 | norm_num [← map_add] |
| 332 | |
| 333 | @[grind .] |
| 334 | lemma toAdele_inv_mul_cancel {x : E} (hx : x ≠ 0) : toAdele x⁻¹ * toAdele x = 1 := by |
| 335 | simp [← map_mul, hx] |
| 336 | |
| 337 | variable [IsTotallyComplex E] [Fintype n] [IsTopologicalAddGroup B] |
| 338 | [SecondCountableTopology B] [T2Space B] [LocallyCompactSpace B] |
| 339 | [(volume (α := B)).IsAddHaarMeasure] |
| 340 | |
| 341 | /-! ### From a fundamental domain to a lattice -/ |
| 342 | |
| 343 | omit [T2Space B] in |
| 344 | /-- If a compact set `C` contains a fundamental domain of volume one for `f : I →+ B` |
| 345 | (`HasFundDomain f C`), then for a finite index type `n` the power `C^n` contains one for the |
| 346 | coordinatewise map `(n → I) →+ (n → B)`. -/ |
| 347 | lemma HasFundDomain.pi (h : HasFundDomain f C) : |
| 348 | HasFundDomain (f.compLeft n) (Set.pi Set.univ fun _ : n ↦ C) := by |
| 349 | -- A power of the fundamental domain `D ⊆ C` is a fundamental domain in the power of `C`. |
| 350 | obtain ⟨hC, D, hDC, hD_meas, hD_vol, h_uniq⟩ := h |
| 351 | refine ⟨isCompact_univ_pi fun _ ↦ hC, .pi .univ fun _ ↦ D, Set.pi_mono fun _ _ ↦ hDC, |
| 352 | .univ_pi fun _ ↦ hD_meas, by simp [volume, hD_vol], fun x ↦ ?_⟩ |
| 353 | choose a ha ha_uniq using fun i : n ↦ h_uniq (x i) |
| 354 | exact ⟨a, fun i _ ↦ ha i, fun b hb ↦ funext fun i ↦ ha_uniq i (b i) (hb i trivial)⟩ |
| 355 | |
| 356 | /-- Let `f : I →+ B` be additive, `B` a second countable locally compact Hausdorff abelian group |
| 357 | with Haar measure. If the compact set `C` contains a measurable `D` of volume one whose translates |
| 358 | by the `f a` partition `B` (`HasFundDomain f C`), then the image of `f` is a lattice of covolume |
| 359 | one: it is discrete and cocompact, with quotient measure of mass one. -/ |
| 360 | lemma HasFundDomain.isCovolOneLattice [BorelSpace B] |
| 361 | (h : HasFundDomain f C) : IsCovolOneLattice f.range := by |
| 362 | obtain ⟨hC, D, hDC, hD_meas, hD_vol, h_uniq⟩ := h |
| 363 | -- Discreteness: `D - D` is a neighbourhood of `0` (Steinhaus) and meets the image only in `0`. |
| 364 | have h_disc : DiscreteTopology f.range := by |
| 365 | have h_nhds : D - D ∈ nhds (0 : B) := |
| 366 | volume.sub_mem_nhds_zero_of_addHaar_pos D hD_meas (by simp [hD_vol]) |
| 367 | refine discreteTopology_of_isOpen_singleton_zero ((⊥ : AddSubgroup f.range).isOpen_of_mem_nhds |
| 368 | ((mem_nhds_induced ((↑) : f.range → B) 0 _).2 ⟨D - D, h_nhds, ?_⟩)) |
| 369 | rintro ⟨_, a, rfl⟩ ⟨x, hx, y, hy, hxy : x - y = f a⟩ |
| 370 | have ha_mem : f a + y ∈ D := by rwa [← hxy, sub_add_cancel] |
| 371 | simp [(h_uniq y).unique ha_mem (show f 0 + y ∈ D by simpa)] |
| 372 | -- Every point is moved into `C` by the image; hence the quotient is the image of `C`. |
| 373 | have h_cover (x : B) : ∃ γ ∈ f.range, γ + x ∈ C := by |
| 374 | simpa using (h_uniq x).exists.imp fun a ha ↦ hDC ha |
| 375 | have h_cpt : CompactSpace (B ⧸ f.range) := by |
| 376 | have h_image : ((↑) : B → B ⧸ f.range) '' C = Set.univ := top_unique fun q _ ↦ |
| 377 | let ⟨γ, hγ, h_mem⟩ := h_cover q.out |
| 378 | ⟨γ + q.out, h_mem, by simp [hγ]⟩ |
| 379 | rw [← isCompact_univ_iff, ← h_image] |
| 380 | exact hC.image continuous_mk |
| 381 | -- Each orbit meets `D` exactly once. |
| 382 | have h_once (x : B) : ∫⁻ γ : f.range, D.indicator 1 (γ +ᵥ x) ∂.count = 1 := by |
| 383 | obtain ⟨a, ha, ha_uniq⟩ := h_uniq x |
| 384 | rw [lintegral_count, tsum_eq_single ⟨f a, a, rfl⟩] |
| 385 | · simp [f.range.vadd_def, ha] |
| 386 | · rintro ⟨_, b, rfl⟩ hb |
| 387 | exact Set.indicator_of_notMem (fun h_mem ↦ hb (by simp [ha_uniq b h_mem])) _ |
| 388 | -- Unfolding the integral of the indicator of `D`: the quotient has the volume of `D`. |
| 389 | have h_mass : f.range.quotMeasure volume Set.univ = 1 := by |
| 390 | simpa [h_once, hD_meas, Set.univ_inter, hD_vol] using |
| 391 | lintegral_addOrbitMeasure_lintegral (ν := .count) (H := f.range) (μ := volume) |
| 392 | (measurable_one.indicator hD_meas) |
| 393 | exact |
| 394 | { toDiscreteTopology := h_disc, toCompactSpace := h_cpt, |
| 395 | toIsProbabilityMeasure := ⟨h_mass⟩, exists_compact_cover := ⟨C, hC, h_cover⟩ } |
| 396 | |
| 397 | /-! ### The rational points of the adeles and finiteness in compact sets -/ |
| 398 | |
| 399 | open scoped Classical in |
| 400 | /-- Let `E` be a totally complex number field, with a chosen complex embedding `Φ v` for each |
| 401 | infinite place `v`. Some volume-preserving ℝ-linear isomorphism from the Minkowski space of `E` to |
| 402 | `InfinitePlace E → ℂ` sends the Minkowski embedding of each `x : E` to the family `(Φ v x)_v`. -/ |
| 403 | lemma exists_mixedEquiv : |
| 404 | ∃ e : mixedEmbedding.mixedSpace E ≃ₗ[ℝ] (InfinitePlace E → ℂ), |
| 405 | MeasurePreserving e ∧ ∀ x : E, e (mixedEmbedding E x) = fun v : InfinitePlace E ↦ Φ v x := by |
| 406 | -- No real places, so Minkowski space is its complex factor; conjugate at places where needed. |
| 407 | have : IsEmpty {v : InfinitePlace E // v.IsReal} := ⟨by simp [isComplex]⟩ |
| 408 | choose σ hσ hΦ using fun v : InfinitePlace E ↦ |
| 409 | exists_measurePreserving_algEquiv_of_mk_eq v.embedding (Φ v) (by simp) |
| 410 | let ι : {v : InfinitePlace E // v.IsComplex} ≃ InfinitePlace E := .subtypeUnivEquiv isComplex |
| 411 | exact ⟨.uniqueProd ≪≫ₗ .funCongrLeft ℝ ℂ ι.symm ≪≫ₗ .piCongrRight fun v ↦ (σ v).toLinearEquiv, |
| 412 | (volume_preserving_pi hσ).comp <| |
| 413 | (volume_preserving_arrowCongr' ι (.refl ℂ) (.id _)).comp ⟨measurable_snd, by simp [volume]⟩, |
| 414 | fun x ↦ funext fun v ↦ hΦ v x⟩ |
| 415 | |
| 416 | open scoped Classical in |
| 417 | /-- Let `K` be a number field and `φ : K → V` a ring homomorphism. Let `e` be a volume-preserving |
| 418 | ℝ-linear isomorphism from the Minkowski space of `K` to `V` that turns the Minkowski embedding into |
| 419 | `φ`. Then for some `R > 0` the closed ball of radius `R` in `V` times the integral finite adeles |
| 420 | `Ô K` is compact and contains a fundamental domain of volume one (`New.HasFundDomain`) for the map |
| 421 | `K → V × 𝔸f K` given by `φ` and the diagonal embedding into the finite adeles. -/ |
| 422 | lemma exists_hasFundDomain {K V : Type*} [NormedRing V] [NormedSpace ℝ V] [ProperSpace V] |
| 423 | [MeasureSpace V] [BorelSpace V] [Field K] [NumberField K] (φ : K →+* V) |
| 424 | (e : mixedEmbedding.mixedSpace K ≃ₗ[ℝ] V) (he : MeasurePreserving e) |
| 425 | (h_emb : ∀ a : K, e (mixedEmbedding K a) = φ a) : |
| 426 | ∃ R > (0 : ℝ), HasFundDomain (φ.prod (algebraMap K (𝔸f K))).toAddMonoidHom |
| 427 | (closedBall (0 : V) R ×ˢ Ô K) := by |
| 428 | -- `exists_fundDomain_prod` for the unit ideal gives a bounded `F` of volume `2 ^ (-r₂) √|disc K|` |
| 429 | -- with `F ×ˢ Ô K` a fundamental domain. |
| 430 | have h_integral (a : K) : algebraMap K (𝔸f K) a ∈ Ô K ↔ |
| 431 | a ∈ (1 : FractionalIdeal (nonZeroDivisors (𝓞 K)) K) := by |
| 432 | simp [IsIntegralClosure.isIntegral_iff (A := 𝓞 K)] |
| 433 | obtain ⟨F, h_meas, h_bounded, h_vol, h_unique⟩ : |
| 434 | ∃ F : Set V, MeasurableSet F ∧ Bornology.IsBounded F ∧ |
| 435 | volume F = ENNReal.ofReal (1 : FractionalIdeal (nonZeroDivisors (𝓞 K)) K).absNorm * |
| 436 | (2⁻¹ ^ nrComplexPlaces K * ‖NumberField.discr K‖₊.sqrt) ∧ |
| 437 | ∀ x : V × 𝔸f K, ∃! a : K, (φ a, algebraMap K (𝔸f K) a) + x ∈ F ×ˢ (Ô K : Set (𝔸f K)) := |
| 438 | exists_fundDomain_prod (φ.prod (algebraMap K (𝔸f K))).toAddMonoidHom (Ô K).toAddSubgroup 1 |
| 439 | h_integral exists_sub_mem_Ô e he h_emb |
| 440 | obtain ⟨R, hR, h_ball⟩ := h_bounded.subset_closedBall_lt 0 0 |
| 441 | refine ⟨R, hR, (isCompact_closedBall 0 R).prod isCompact_Ô, F ×ˢ Ô K, Set.prod_mono_left h_ball, |
| 442 | h_meas.prod isOpen_Ô.measurableSet, ?_, h_unique⟩ |
| 443 | -- The mass `volÔ` of `Ô K` is the inverse of the volume of `F`. |
| 444 | show volume (F ×ˢ (Ô K : Set (𝔸f K))) = 1 |
| 445 | rw [Measure.volume_eq_prod, Measure.prod_prod, h_vol, volume_Ô] |
| 446 | simp [← ENNReal.toReal_eq_one_iff, volÔ, field, discr_ne_zero] |
| 447 | |
| 448 | open scoped Classical in |
| 449 | /-- Let `E` be a totally complex number field with chosen embeddings at the infinite places. For |
| 450 | some `R > 0`, the closed ball of radius `R` in the infinite part `InfinitePlace E → ℂ` times the |
| 451 | integral finite adeles `Ô E` is compact and contains a fundamental domain of volume one |
| 452 | (`HasFundDomain`) for `E` acting on its adeles through the diagonal embedding `toAdele`. -/ |
| 453 | lemma exists_hasFundDomain_toAdele : |
| 454 | ∃ R > (0 : ℝ), HasFundDomain (toAdele : E →+* 𝔸 E).toAddMonoidHom |
| 455 | (closedBall (0 : InfinitePlace E → ℂ) R ×ˢ Ô E) := by |
| 456 | let ⟨e, he, h_emb⟩ := exists_mixedEquiv (E := E) |
| 457 | exact exists_hasFundDomain (RingHom.pi Φ : E →+* (InfinitePlace E → ℂ)) e he h_emb |
| 458 | |
| 459 | /-- For totally complex `E` the rational points `New.ratAdeles E` form a lattice of covolume one in |
| 460 | the adeles of `E`: a discrete subgroup whose compact quotient has measure one. -/ |
| 461 | instance isCovolOneLattice_ratAdeles : IsCovolOneLattice (ratAdeles E) := by |
| 462 | obtain ⟨R, -, h_dom⟩ := exists_hasFundDomain_toAdele (E := E) |
| 463 | exact h_dom.isCovolOneLattice |
| 464 | |
| 465 | /-- For totally complex `E` and finite `n` the rational vectors `New.ratVectors E n` form a lattice |
| 466 | of covolume one in the adelic vectors indexed by `n`. -/ |
| 467 | instance isCovolOneLattice_ratVectors : IsCovolOneLattice (ratVectors E n) := by |
| 468 | obtain ⟨R, -, h_dom⟩ := exists_hasFundDomain_toAdele (E := E) |
| 469 | exact h_dom.pi.isCovolOneLattice |
| 470 | |
| 471 | /-- For totally complex `E` and finite `m`, `n` the rational matrices `New.ratMatrices E m n` form |
| 472 | a lattice of covolume one in the adelic `m × n` matrices. -/ |
| 473 | instance isCovolOneLattice_ratMatrices [Fintype m] : IsCovolOneLattice (ratMatrices E m n) := by |
| 474 | obtain ⟨R, -, h_dom⟩ := exists_hasFundDomain_toAdele (E := E) |
| 475 | -- a matrix is by definition a family of rows, so the power is taken twice |
| 476 | exact h_dom.pi.pi.isCovolOneLattice |
| 477 | |
| 478 | /-- An injective additive map `f` into a Hausdorff topological group, with discrete image, sends |
| 479 | only finitely many points into a given compact set. -/ |
| 480 | lemma finite_preimage_of_discreteTopology_range {B I : Type*} [AddCommGroup B] [AddCommGroup I] |
| 481 | [TopologicalSpace B] [IsTopologicalAddGroup B] {f : I →+ B} {C : Set B} |
| 482 | (hf_inj : Function.Injective f) (h_disc : DiscreteTopology f.range) (hC : IsCompact C) : |
| 483 | (f ⁻¹' C).Finite := by |
| 484 | -- `f` tends to infinity along the cofinite filter |
| 485 | simpa using f.tendsto_coe_cofinite_of_isDiscrete hf_inj ⟨h_disc⟩ hC.compl_mem_cocompact |
| 486 | |
| 487 | omit [SecondCountableTopology B] [LocallyCompactSpace B] [(volume (α := B)).IsAddHaarMeasure] |
| 488 | [T2Space B] in |
| 489 | /-- Let `f : I →+ B` be an injective additive map whose image is a lattice of covolume one in `B` |
| 490 | (discrete, with compact quotient of measure one). Then for every compact set `C`, only finitely many |
| 491 | `a` in `I` have `f a ∈ C`. -/ |
| 492 | lemma IsCovolOneLattice.finite_preimage (h : IsCovolOneLattice f.range) |
| 493 | (hf_inj : Function.Injective f) (hC : IsCompact C) : (f ⁻¹' C).Finite := |
| 494 | finite_preimage_of_discreteTopology_range hf_inj h.toDiscreteTopology hC |
| 495 | |
| 496 | /-- For totally complex `E`, a compact set of adeles contains the diagonal images of only finitely |
| 497 | many elements of `E`. -/ |
| 498 | lemma finite_setOf_toAdele_mem {K : Set (𝔸 E)} (hK : IsCompact K) : |
| 499 | {x : E | toAdele x ∈ K}.Finite := |
| 500 | (isCovolOneLattice_ratAdeles (E := E)).finite_preimage (toAdele (E := E)).injective hK |
| 501 | |
| 502 | /-- For totally complex `E` and finite `n`, a compact set of adelic vectors indexed by `n` contains |
| 503 | the coordinatewise diagonal images of only finitely many vectors over `E`. -/ |
| 504 | lemma isCovolOneLattice_ratVectors.finite_preimage {K : Set (n → 𝔸 E)} (hK : IsCompact K) : |
| 505 | {ξ : n → E | toAdele ∘ ξ ∈ K}.Finite := |
| 506 | IsCovolOneLattice.finite_preimage (isCovolOneLattice_ratVectors (E := E) (n := n)) |
| 507 | (toAdele (E := E)).injective.comp_left hK |
| 508 | |
| 509 | /-- For totally complex `E` and finite `m`, `n`, a compact set of adelic `m × n` matrices contains |
| 510 | the entrywise diagonal images of only finitely many matrices over `E`. -/ |
| 511 | lemma finite_setOf_map_toAdele_mem [Fintype m] {K : Set (Matrix m n (𝔸 E))} (hK : IsCompact K) : |
| 512 | {A : Matrix m n E | A.map toAdele ∈ K}.Finite := |
| 513 | (isCovolOneLattice_ratMatrices (E := E) (m := m) (n := n)).finite_preimage |
| 514 | (Matrix.map_injective (toAdele (E := E)).injective) hK |
| 515 | |
| 516 | variable [StarAddMonoid B] [ContinuousStar B] |
| 517 | |
| 518 | instance : IsClosed (X := B) (selfAdjoint B) := isClosed_fixedPoints continuous_star |
| 519 | |
| 520 | end New |
| 521 | |
| 522 | end RationalLattice |
| 523 | |
| 524 | end |