Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
module
public import Lib.General.Groups.CongruenceSubgroups
/-!
# The action x ↦ hxg⁻¹ on matrices as a map of unitary groups
`New.U.kroneckerHom` sends `(g, h)` in `U S × U T` to the Kronecker product `h ⊗ₖ g⁻¹ᵀ`, the matrix
of `x ↦ h x g⁻¹` on matrices indexed by pairs (row, column). Here `New.U J` is the group of
invertible `g` with `gᴴ J g = J`.
* `Matrix.GeneralLinearGroup.kronecker`: Mathlib's Kronecker product of two invertible matrices,
as an invertible matrix.
* `New.U.kroneckerHom`: the homomorphism of unitary groups.
* `New.map_kronecker`: applying a ring homomorphism entrywise commutes with the Kronecker product.
## Relation to the literature
Known; see `Lib.Weil.DualPair.ThetaLiftConvergence` for sources.
-/
@[expose] public section
open Matrix Kronecker
variable {m n R : Type*} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n]
attribute [local simp] Matrix.GeneralLinearGroup.kronecker
/-- For SK = 1 and J = T ⊗ Kᵀ, the homomorphism (g, h) ↦ h ⊗ (g⁻¹)ᵀ from U(S) × U(T) to U(J). -/
@[simps! apply_coe_val]
noncomputable def New.U.kroneckerHom [CommRing R] [StarRing R] {S K : Matrix n n R}
{T : Matrix m m R} {J : Matrix (m × n) (m × n) R} (hS : S * K = 1) (h : J = T ⊗ₖ Kᵀ) :
U S × U T →* U J :=
MonoidHom.mk'
(fun p ↦
⟨Matrix.GeneralLinearGroup.kronecker p.2 (transposeGL p.1⁻¹), by
-- For `p = (x, y)`: the Kronecker product of `yᴴ T y = T` and the inverse transpose of
-- `xᴴ S x = S`.
simpa [mem_unitaryGroupOf_iff, star_eq_conjTranspose, inv_eq_right_inv hS, h,
conjTranspose_nonsing_inv, conjTranspose_kronecker,
conjTranspose_transpose_eq_transpose_conjTranspose, ← mul_kronecker_mul,
Matrix.mul_inv_rev] using!
congr($(mem_unitaryGroupOf_iff.1 p.2.2) ⊗ₖ $(mem_unitaryGroupOf_iff.1 p.1.2)⁻¹ᵀ)⟩)
(fun _ _ ↦ Subtype.ext <| Units.ext <| by simp [← mul_kronecker_mul])
/-- Applying a ring homomorphism `f` entrywise commutes with the Kronecker product:
(A ⊗ B).map f = A.map f ⊗ B.map f. -/
lemma New.map_kronecker {a b c d R S : Type*} [Ring R] [Ring S] (f : R →+* S) (A : Matrix a b R)
(B : Matrix c d R) :
(A ⊗ₖ B).map f = A.map f ⊗ₖ B.map f := by
aesop