Skip to content

Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.

Python

refactor(Lib/Shimura/ThetaGroup): extract coordinate shift along subgroup

Rohan Arun0e7846b593a8
diff --git a/src/Lib/Shimura/ThetaGroup.lean b/src/Lib/Shimura/ThetaGroup.lean
index 9dc1fa6114a..e234f6d2bdb 100644
--- a/src/Lib/Shimura/ThetaGroup.lean
+++ b/src/Lib/Shimura/ThetaGroup.lean
@@ -406,6 +406,20 @@ variable {Lg : AddSubgroup H} {η : H →+ (𝟙_ (Over (Spec (CommRingCat.of R)
theta structures `h` and `h'`. Assume that the coordinates of `N` span `H⁰(N)` (`h_span`). Let
`U s` send `X t` to `c s t • X (s + t)`, and let `T : H⁰(N') → H⁰(N)` be a lift of `f : A ⟶ A'` with
`T (X' s) = U s (T (X' 0))` for all `s`. Then `f^* N' = N` as linear systems. -/
+/-- Shift `coordSection hN t` by `l ∈ Lg` along `U t` using `hU` and `h.coordSection_eq_of_mem`. -/
+private lemma coordSection_add_mem_of_mem_thetaGroup
+ {R : Type} [CommRing R] {H : Type} [AddCommGroup H] [Fintype H]
+ {X : Over (Spec (CommRingCat.of R))} [AddObj X]
+ {Lg : AddSubgroup H} {η : H →+ (𝟙_ (Over (Spec (CommRingCat.of R))) ⟶ X)}
+ {N : LineBundle X.left H} {hN : N.IsLinearSystem} {c : H → AddChar H R}
+ (h : IsThetaStructure Lg η hN c) {U : H → Module.End R (N.H0 R)}
+ (hU : ∀ s t : H, U s (coordSection hN t) = c s t • coordSection hN (s + t))
+ {l : H} (hl : l ∈ Lg) (t : H) :
+ coordSection hN (t + l) = c t (-l) • coordSection hN t := by
+ have h_Ut : c t (-l) • U t (coordSection hN l) = c t (-l) • U t (coordSection hN 0) := by
+ rw [h.coordSection_eq_of_mem l hl]
+ simpa [hU, ← map_add_eq_mul, smul_smul] using h_Ut
+
lemma IsThetaStructure.pull_eq_of_intertwines (h : IsThetaStructure Lg η hN c) [Finite H]
(h_span : span R (range (coordSection hN)) = ⊤)
{A' : Over (Spec (CommRingCat.of R))} [AddObj A']
@@ -421,11 +435,8 @@ lemma IsThetaStructure.pull_eq_of_intertwines (h : IsThetaStructure Lg η hN c)
-- sends `X' s` to `a • X s`. To find `a`, apply the sum `P` of the `U (-l)`, `l ∈ Lg`, to
-- `T (X' 0)`. First apply `U t` to `X l = X 0`.
have h_shift (l : H) (hl : l ∈ Lg) (t : H) :
- coordSection hN (t + l) = c t (-l) • coordSection hN t := by
- -- `U t` sends `X l = X 0` to `c t l • X (t + l)` and to `c t 0 • X t = X t`
- have h_Ut : c t (-l) • U t (coordSection hN l) = c t (-l) • U t (coordSection hN 0) := by
- rw [h.coordSection_eq_of_mem l hl]
- simpa [hU, ← map_add_eq_mul, smul_smul] using h_Ut
+ coordSection hN (t + l) = c t (-l) • coordSection hN t :=
+ h.coordSection_add_mem_of_mem_thetaGroup hU hl t
let P : End R (N.H0 R) := ∑ l : Lg, U (-l)
-- by `h_shift`, `P` multiplies `X t` by `∑ l, c t l ^ 2`, which is `0` for `t ∉ Lg`
-- (`h.sum_sq_eq_zero`); for `t ∈ Lg` the coordinate `X t` is `X 0`