Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
doc(Lib/Weil/Construction): add docstrings in FiniteMultiplier
sangxshf0f373f775b4
diff --git a/src/Lib/Weil/Construction/FiniteMultiplier.lean b/src/Lib/Weil/Construction/FiniteMultiplier.leanindex e13e63d57d5..ad42ffdcd2e 100644--- a/src/Lib/Weil/Construction/FiniteMultiplier.lean+++ b/src/Lib/Weil/Construction/FiniteMultiplier.lean@@ -165,13 +165,16 @@ def traceOneAdele : 𝔸f E := (WeilData.traceOne : E)/-- The number ½, viewed as a finite adele of E. -/def half {E : Type*} [Field E] [NumberField E] : 𝔸f E := (2⁻¹ : E)+/-- The value of the character `ψ₀ = selfDualAddChar E` at `z` is `ψf (j α ᾱ z)`. -/lemma selfDualAddChar_apply (z : 𝔸f E) : selfDualAddChar E z = ψf E(algebraMap E (𝔸f E) j * α.val * star α.val * z) :=rfl+/-- The character `ψ₀ = selfDualAddChar E` has norm `1` at every finite adele `z`. -/@[simp]lemma norm_selfDualAddChar (z : 𝔸f E) : ‖selfDualAddChar E z‖ = 1 := norm_coe _+/-- The character `ψ₀ = selfDualAddChar E` of the finite adeles is continuous. -/@[fun_prop]lemma continuous_selfDualAddChar : Continuous (selfDualAddChar E) :=continuous_ψf.subtypeVal.comp (continuous_const_mul _)@@ -197,20 +200,25 @@ lemma forall_selfDualAddChar_mul_eq_one_iff (z : 𝔸f E) :rw [h_val, hc, WeilData.self_dual, ← WithZero.exp_add, neg_add_cancel, WithZero.exp_zero]simp [mem_Ô, ← mul_assoc, h_unit]+/-- The finite adele `c₀` is integral, that is, lies in `Ô E`. -/lemma traceOneAdele_mem : traceOneAdele ∈ Ô E := algebraMap_mem_Ô.mpr isIntegral_traceOne+/-- The finite adele `c₀` satisfies `c₀ + c̄₀ = 1`. -/@[simp]lemma traceOneAdele_add_star : traceOneAdele + star traceOneAdele = (1 : 𝔸f E) := bysimp [traceOneAdele, WeilData.traceOne, ← map_add, ← add_div]omit [WeilData E] in+/-- Twice the finite adele `½` is `1`. -/lemma two_mul_half : 2 * half = (1 : 𝔸f E) := by norm_num [half, two_mul, ← map_add]omit [WeilData E] in+/-- The finite adele `½` is fixed by the involution `star`. -/lemma star_half : star (half : 𝔸f E) = half := by simp [half]attribute [grind .] traceOneAdele_add_star two_mul_half star_half+/-- The character `ψ₀ = selfDualAddChar E` is trivial on the integral finite adeles `Ô E`. -/lemma selfDualAddChar_eq_one_of_mem {o : 𝔸f E} (ho : o ∈ Ô E) : selfDualAddChar E o = 1 := bysimpa using (forall_selfDualAddChar_mul_eq_one_iff o).2 ho 1 (one_mem _)@@ -229,9 +237,12 @@ lemma selfDualAddChar_congr {a b o : 𝔸f E} (t : 𝔸f E) (ho : o ∈ Ô E)y = αx and is a sign on the lattice Ô^ι. -/def semichar (x : ι → 𝔸f E) : ℂ := selfDualAddChar E (traceOneAdele * half * star x ⬝ᵥ x)+/-- For every finite adelic vector `x`, the number `semichar x` is of finite order, that is, a+root of unity. -/lemma isOfFinOrder_semichar (x : ι → 𝔸f E) : IsOfFinOrder (semichar x) := bysimpa only [semichar, selfDualAddChar_apply] using isOfFinOrder_ψf _+/-- If `x* x = 0`, then `semichar x = 1`. -/lemma semichar_eq_one_of_dotProduct_self_eq_zero {x : ι → 𝔸f E} (hx : star x ⬝ᵥ x = 0) :semichar x = 1 := by simp [semichar, hx]@@ -240,9 +251,11 @@ open scoped Classical indef finVac (x : ι → 𝔸f E) : ℂ :=if x ∈ stdLattice E ι then selfDualAddChar E (traceOneAdele * half * star x ⬝ᵥ x) else 0+/-- On the lattice `Ô ^ ι`, the finite vacuum `finVac` is equal to `semichar`. -/lemma finVac_of_mem {x : ι → 𝔸f E} (hx : x ∈ stdLattice E ι) : finVac x = semichar x :=ite_eq_left hx+/-- Off the lattice `Ô ^ ι`, the finite vacuum `finVac` is `0`. -/lemma finVac_of_notMem {x : ι → 𝔸f E} (hx : x ∉ stdLattice E ι) : finVac x = 0 := ite_eq_right hxvariable (E ι)@@ -288,8 +301,11 @@ endvariable {E ι : Type*} [Field E] [CMType E]+/-- A finite adelic vector lies in the standard lattice `Ô ^ ι` if and only if each of its+coordinates lies in `Ô`. -/lemma mem_stdLattice {x : ι → 𝔸f E} : x ∈ stdLattice E ι ↔ ∀ i : ι, x i ∈ Ô E := .rfl+/-- The standard lattice `Ô ^ ι` is compact. -/lemma isCompact_stdLattice : IsCompact (stdLattice E ι).carrier :=isCompact_pi_infinite fun _ ↦ isCompact_Ô@@ -314,6 +330,7 @@ lemma star_mulVec_dotProduct_mulVec [DecidableEq ι] (g : Gf E ι) (x y : ι →simpa using U.form_mulVec_mulVec g x yomit [Fintype ι] in+/-- The standard lattice `Ô ^ ι` is stable under multiplication by elements `r` of `Ô`. -/lemma smul_mem_stdLattice {x : ι → 𝔸f E} {r : 𝔸f E} (hr : r ∈ Ô E) (hx : x ∈ stdLattice E ι) :r • x ∈ stdLattice E ι := fun i ↦ mul_mem hr (hx i)@@ -471,6 +488,8 @@ entries in the subring this implies `u Λ = Λ ∩ g⁻¹ Λ`. -/def IsSaturating (S : Subring B) (g u : Bˣ) : Prop :=↑u ∈ S ∧ g.val * u ∈ S ∧ ∃ l ∈ S, ∃ m ∈ S, ↑u⁻¹ = l + m * g+/-- If `u` saturates `g` over `S` (`New.IsSaturating`), and `x` and `g x` lie in `S`, then+`u⁻¹ x` lies in `S`. -/lemma IsSaturating.inv_mul_mem (h : IsSaturating S g u) {x : B} (hx : x ∈ S)(hgx : g.val * x ∈ S) : u⁻¹.val * x ∈ S := byobtain ⟨-, -, l, hl, m, hm, hlm⟩ := h@@ -497,11 +516,15 @@ lemma IsSaturating.mul_of_mem (h : IsSaturating S g u) {k k' : Bˣ} (hk : k.valexact ⟨mul_mem hk'_inv hu, by simpa [mul_assoc] using mul_mem hk hgu, l * k', mul_mem hl hk',m * k⁻¹, mul_mem hm hk_inv, by simp [hlm, add_mul, mul_assoc]⟩+/-- If a unit `g` lies in the subring `S`, then `1` saturates `g` over `S`+(`New.IsSaturating`). -/lemma IsSaturating.of_mem (hg : ↑g ∈ S) : IsSaturating S g 1 :=⟨one_mem S, by simpa using hg, 1, one_mem S, 0, zero_mem S, by simp⟩+/-- If `u` saturates `g` over `S` (`New.IsSaturating`), then `u` lies in `S`. -/lemma IsSaturating.val_mem (h : IsSaturating S g u) : u.val ∈ S := h.1+/-- If `u` saturates `g` over `S` (`New.IsSaturating`), then `g u` lies in `S`. -/lemma IsSaturating.mul_val_mem (h : IsSaturating S g u) : g.val * u.val ∈ S := h.2.1open MeasureTheory Matrix ComplexConjugate NumberField GeneralLinearGroup WeilData stdLattice Valued@@ -510,6 +533,7 @@ open MeasureTheory Matrix ComplexConjugate NumberField GeneralLinearGroup WeilDavariable [Field E] [NumberField E] [Fintype ι] [DecidableEq ι] [Fintype κ](g : GL ι (𝔸f E)) {u b b' k k' : GL ι (𝔸f E)} {w : FinPlace E}+/-- A matrix lies in the subring `S.matrix` if and only if all its entries lie in `S`. -/@[local simp]lemma mem_subring_matrix_iff {x : Matrix ι ι B} : x ∈ S.matrix ↔ ∀ i j : ι, x i j ∈ S := .rfl@@ -670,11 +694,15 @@ lemma chiFin_congr {x y : (𝔸f E)ˣ} (h_val : ∀ w : FinPlace E, v (x.val w)g, with uÔ^ι = Ô^ι ∩ g⁻¹Ô^ι. -/def glMultiplier : ℂ := chiFin (GeneralLinearGroup.det (saturatingElem g).val)+/-- If `u` saturates `b` over the matrices with entries in `Ô E` (`New.IsSaturating`), then+`Δ_f b = glMultiplier b` is `χ_f (det u)`, where `χ_f = chiFin`. -/lemma IsSaturating.glMultiplier_eq (h : IsSaturating (Ô E).matrix b u) :glMultiplier b = chiFin u.det := byrefine chiFin_congr fun w ↦ ?_simpa [← evalAt_apply, RingHom.map_det] using (h.map_evalAt w).v_det_saturatingElem+/-- For `k` in the integral subgroup `GL_ι(Ô)`, one has `χ_f (det k) = 1`, where+`χ_f = chiFin`. -/lemma chiFin_det_eq_one_of_mem (hk : k ∈ intGL ι (Ô E)) : chiFin k.det = 1 := byrefine (chiFin_congr fun w ↦ ?_).trans chiFin.map_onesimpa [← evalAt_apply, RingHom.map_det] using (mem_intGL_iff_det.1 (mem_intGL_Ô.1 hk w)).2@@ -915,6 +943,8 @@ lemma finMultiplier_eq_one_of_mem {k : Gf E ι} (hk : k ∈ stdLevel E ι) : finhave h_sat : IsSaturating (Ô E).matrix k.val 1 := .of_mem (mem_stdLevel.1 hk)simp [finMultiplier, h_sat.glMultiplier_eq]+/-- The multiplier `Δ_f g = finMultiplier g` is nonzero for every `g` in the finite adelic+unitary group `Gf E ι`. -/lemma finMultiplier_ne_zero (g : Gf E ι) : finMultiplier g ≠ 0 := (chiFin.toHomUnits _).ne_zero/-- Let E be a CM field with Weil data and g an element of the finite adelic unitary group (gᴴg = 1@@ -927,6 +957,8 @@ lemma norm_finMultiplier_sq (g : Gf E ι) :norm_glMultiplier_sq g.valvariable {E : Type*} [Field E] [NumberField E] [IsCMField E] in+/-- For `g` in the finite adelic unitary group `Gf E ι`, the finite idele `det g` has idele norm+`1`. -/lemma Gf.finIdeleAbs_det (g : Gf E ι) : finIdeleAbs g.val.det = 1 := byhave h_det : (g.val.det : 𝔸f E) ∈ unitary (𝔸f E) := (U.det (by simp) g).prop-- The idele with finite part `det g` is `1` at the infinite places, so it is unitary too.