Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(Lib/General/Groups): map Gram matrices of rectangular frames
alkor2000c1164d1a1004
diff --git a/src/Lib/General/Groups/CongruenceSubgroups.lean b/src/Lib/General/Groups/CongruenceSubgroups.leanindex cc5e1ad15fd..55187ef3c7f 100644--- a/src/Lib/General/Groups/CongruenceSubgroups.lean+++ b/src/Lib/General/Groups/CongruenceSubgroups.lean@@ -284,9 +284,11 @@ section Unitaryvariable {m n R S : Type*} [Fintype n] [CommRing R] [CommRing S] [StarRing R] [StarRing S]-/-- A ring map f that commutes with the involutions carries zᴴ B z to (f z)ᴴ (f B) (f z). -/+/-- A ring map f that commutes with the involutions carries zᴴ B z to (f z)ᴴ (f B) (f z),+including for a rectangular matrix z. -/lemma map_conjTranspose_mul_mul (f : R →+* S) (hf : ∀ x : R, f (star x) = star (f x))- (z B : Matrix n n R) : (zᴴ * B * z).map f = (z.map f)ᴴ * B.map f * z.map f := by+ (z : Matrix n m R) (B : Matrix n n R) :+ (zᴴ * B * z).map f = (z.map f)ᴴ * B.map f * z.map f := bysimp [conjTranspose_map _ hf]/-- The Gram matrix of XY for the form J is Yᴴ (Xᴴ J X) Y. -/diff --git a/src/Lib/SiegelWeil/SingularForms/CentreCoefficients.lean b/src/Lib/SiegelWeil/SingularForms/CentreCoefficients.leanindex 92338673011..7e518a7c8f8 100644--- a/src/Lib/SiegelWeil/SingularForms/CentreCoefficients.lean+++ b/src/Lib/SiegelWeil/SingularForms/CentreCoefficients.lean@@ -256,8 +256,11 @@ matrix x_vᴴ diag(s) x_v is the component at v of xᴴ ε x, where ε = `stdForform with signs s. -/lemma gram_atRealPlace (v : InfinitePlace E) :(atRealPlace x v)ᴴ * signMatrix s * atRealPlace x v = atRealPlace (xᴴ * stdForm E s * x) v := by- ext i j- simp [Matrix.mul_apply, stdForm, signMatrix, diagonal, Prod.fst_sum]+ have h_form : (stdForm E s).map (evalInf v) = signMatrix s := by+ simp [stdForm, signMatrix]+ have h_eval := map_conjTranspose_mul_mul (evalInf v) (fun _ ↦ rfl) x (stdForm E s)+ rw [h_form] at h_eval+ exact h_eval.symmend New.Exchange