Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Lib/SiegelWeil/Formula/WeilRange): separate the left inverse construction
alkor20002a9b44996fd1
diff --git a/src/Lib/SiegelWeil/Formula/WeilRange.lean b/src/Lib/SiegelWeil/Formula/WeilRange.leanindex 52792fd4b3b..7d93da929e6 100644--- a/src/Lib/SiegelWeil/Formula/WeilRange.lean+++ b/src/Lib/SiegelWeil/Formula/WeilRange.lean@@ -537,6 +537,19 @@ lemma New.SiegelWeil.tendsto_integral_theta_zeroTerm_sub_ ≤ B h * ‖translate h y f - f‖ₑ := h_theta h x __ ≤ B h * modulus (Prod.swap (M * 1, z (x ι)), h) := mul_right_mono h_mem+omit [WeilData E] in+/-- Extend the coordinate map of the Lagrangian to a left inverse of its frame `P.k` that+annihilates a given vector outside the Lagrangian. -/+private lemma exists_leftInv_k_mulVec_eq_zero {v : n → E} (hv : v ∉ P.lagrangian.val) :+ ∃ Y : Matrix p n E, Y * P.k = 1 ∧ Y *ᵥ v = 0 := by+ obtain ⟨φ, hφ, hvφ⟩ :=+ ((P.lᴴ * S.J).toLin'.domRestrict P.lagrangian.val).exists_extend_of_notMem hv 0+ have hY (w : n → E) (hw : w ∈ P.lagrangian.val) :+ φ.toMatrix' *ᵥ w = (P.lᴴ * S.J) *ᵥ w := by+ simpa using LinearMap.congr_fun hφ ⟨w, hw⟩+ refine ⟨φ.toMatrix', ext_iff_mulVec.mpr fun u ↦ ?_, by simpa using hvφ⟩+ simpa [← Matrix.mul_assoc] using hY _ ⟨u, rfl⟩+/-- Let `T` have nonzero rank, and let the Lagrangian `L` of `S` not contain the column `ι` of`P.k`, where `P` is a complete splitting `S = l E ^ p ⊕ k E ^ p` with isotropic frame `P.k`. Thenthe zero term along `L` of `normalisedTorus T P x f` tends to `0` as `x ι → ∞`, uniformly for `f` in@@ -548,16 +561,9 @@ lemma New.SiegelWeil.tendsto_zeroTerm_of_notMem (hm : card m ≠ 0) {L : Lagrang(h_norm_le : ∀ f ∈ C, ‖f‖ ≤ R) :Tendsto (fun z : (p → ℕ) × C ↦ Lagrangian.zeroTerm T L (normalisedTorus T P z.1 z.2))(atTop.comap fun z : (p → ℕ) × C ↦ z.1 ι) (nhds 0) := by- -- Write `L = k' E^r` and extend `l'* J` from `L` to a rational `Y` that kills column `ι` of `k`.+ -- Take a left inverse of the frame of `L` that kills column `ι` of `P.k`.obtain ⟨⟨r, P'⟩, rfl⟩ := L.completeSplitting- obtain ⟨Y, hY, hYι⟩ : ∃ Y : Matrix (Fin r) n E,- (∀ v ∈ P'.lagrangian.val, Y *ᵥ v = (P'.lᴴ * S.J) *ᵥ v) ∧ Y *ᵥ P.k.col ι = 0 := by- obtain ⟨φ, hφ, hφι⟩ :=- ((P'.lᴴ * S.J).toLin'.domRestrict P'.lagrangian.val).exists_extend_of_notMem hL_notMem 0- exact ⟨LinearMap.toMatrix' φ, fun v hv ↦ by simpa using LinearMap.congr_fun hφ ⟨v, hv⟩,- by simpa using hφι⟩- have hYk : Y * P'.k = 1 :=- ext_iff_mulVec.mpr fun v ↦ by simpa [← Matrix.mul_assoc] using hY _ ⟨v, rfl⟩+ obtain ⟨Y, hYk, hYι⟩ := exists_leftInv_k_mulVec_eq_zero P' hL_notMemhave h_left_inv : Y.map (toAdele : E → 𝔸 E) * (S.x : Matrix n n (𝔸 E)) * kAdelic P' = 1 := bysimp [kAdelic, ← Matrix.mul_assoc, ← Matrix.map_mul, hYk]obtain ⟨c, hc⟩ := exists_zeroTerm_normalisedTorus_le T P P' (Y.map toAdele * S.x.val) h_left_inv