Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Lib/Shimura/ThetaNormality): add weighted-shift submodule membership lemma
Rohan Arun81720b14c331
diff --git a/src/Lib/Shimura/ThetaNormality/NormalGeneration.lean b/src/Lib/Shimura/ThetaNormality/NormalGeneration.leanindex 890dd285ea2..9d5bf0caa3d 100644--- a/src/Lib/Shimura/ThetaNormality/NormalGeneration.lean+++ b/src/Lib/Shimura/ThetaNormality/NormalGeneration.lean@@ -164,6 +164,20 @@ private lemma IsAppellHumbert.isUnit_natCard_dualLattice_quotient_of_nsmul_memmk_surjective.forall.mpr fun a ↦ (eq_zero_iff _).mpr (hN_kills a a.property)exact isUnit_of_dvd_unit (card_dvd_exponent_nsmul_rank' _ kills).natCast (mod_cast hN.pow _)+/-- In an `O`-submodule `M` of `V → ℂ`, if `(Nat.card G : O) • (a / q) • y` expands as+`d • ∑ s, e s • (u s / q) • T s` with `Nat.card G` a unit of `O`, each `T s ∈ M`, and each+`u s / q` in the image of `algebraMap O ℂ`, then `(a / q) • y ∈ M`. -/+private lemma smul_mem_of_div_mem_range {O : Type*} [CommRing O] [Algebra O ℂ] {V G : Type}+ [Fintype G] {M : Submodule O (V → ℂ)} {d : ℕ} {e : G → O} {T : G → V → ℂ} {u : G → ℂ}+ {y : V → ℂ} {a q : ℂ} (h_card : IsUnit (Nat.card G : O))+ (h_expand : (Nat.card G : O) • (a / q) • y = d • ∑ s : G, e s • (u s / q) • T s)+ (hT : ∀ r : G, T r ∈ M) (hq : ∀ r : G, ∃ b : O, algebraMap O ℂ b = u r / q) :+ (a / q) • y ∈ M := by+ choose b hb using hq+ rw [← M.smul_mem_iff_of_isUnit h_card, h_expand]+ refine nsmul_mem (sum_mem fun r _ ↦ ?_) _+ simp [← hb, M.smul_mem, hT r]+/-- Let `O` be a valuation ring with fraction field `ℂ`, and `f`, `g` finite families of thetafunctions. Suppose that (a) a natural number that is a unit of `O` kills the dual lattice modulo`L`, (b) neither family is zero, and (c) the weights `c` are such that, for `a` in the dual lattice,@@ -247,23 +261,16 @@ lemma IsAppellHumbert.exists_proportional_orbit_lattice {O : Type*} [CommRing O]obtain ⟨k₀, t, g_ne, g_max⟩ := exists_max hglet γ : ℂ := (A t (g k₀)).val z / (A s (f i₀)).val zrefine ⟨γ, div_ne_zero g_ne f_ne, fun M hM ↦ ?_⟩- -- `(x z / q) • y ∈ M` follows from `expand`, since the order of `G` is a unit of `O`- have smul_mem (x : B.thetaSpace χ) (hx : x.val ∈ M) (y : B.thetaSpace χ) {q : ℂ}- (hq : ∀ r : G, ∃ b : O, algebraMap O ℂ b = (A r y).val z / q) :- (x.val z / q) • y.val ∈ M := by- choose b hb using hq- rw [← M.smul_mem_iff_of_isUnit card_unit, expand]- refine nsmul_mem (sum_mem fun r _ ↦ ?_) _- simp [← hb, M.smul_mem, hM _ r.out.property _ hx]have A_mem (r : G) (x : B.thetaSpace χ) (hx : x.val ∈ M) : (A r x).val ∈ M :=hM _ (-r.out).property _ hxrefine ⟨fun hg_mem j ↦ ?_, fun hf_mem j ↦ ?_⟩· -- take `x = A t (g k₀)`, `y = f j` and `q = A s (f i₀) z`, so that `x z / q = γ`- exact smul_mem (A t (g k₀)) (A_mem t (g k₀) (hg_mem k₀)) (f j) (f_max j)+ exact smul_mem_of_div_mem_range card_unit (expand (A t (g k₀)) (f j) _)+ (fun r ↦ hM _ r.out.property _ (A_mem t (g k₀) (hg_mem k₀))) (f_max j)· -- take `x = A s (γ • f i₀)`, `y = g j` and `q = A t (g k₀) z`, so that `x z / q = 1`have h_ratio : γ * (A s (f i₀)).val z / (A t (g k₀)).val z = 1 := by simp [γ, f_ne, g_ne]- simpa [h_ratio] using- smul_mem (A s (γ • f i₀)) (A_mem s (γ • f i₀) (hf_mem i₀)) (g j) (g_max j)+ simpa [h_ratio] using smul_mem_of_div_mem_range card_unit (expand (A s (γ • f i₀)) (g j) _)+ (fun r ↦ hM _ r.out.property _ (A_mem s (γ • f i₀) (hf_mem i₀))) (g_max j)end New