Skip to content

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

Python

fix(Lib/Shimura/ThetaGroup): place helper above docstring with section binders

Rohan Arun9e7f5a463873
diff --git a/src/Lib/Shimura/ThetaGroup.lean b/src/Lib/Shimura/ThetaGroup.lean
index e234f6d2bdb..d15bdbf22f1 100644
--- a/src/Lib/Shimura/ThetaGroup.lean
+++ b/src/Lib/Shimura/ThetaGroup.lean
@@ -402,24 +402,22 @@ structure IsThetaStructure (Lg : AddSubgroup H)
variable {Lg : AddSubgroup H} {η : H →+ (𝟙_ (Over (Spec (CommRingCat.of R))) ⟶ A)}
{N : LineBundle A.left H} {hN : N.IsLinearSystem} {c : H → AddChar H R}
-/-- Write `X t` and `X' t` for the coordinates `coordSection hN t` and `coordSection hN' t` of the
-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}
+/-- For `l ∈ Lg`, the coordinate `coordSection hN (t + l)` equals
+`c t (-l) • coordSection hN t`. -/
+private lemma IsThetaStructure.coordSection_add_of_mem
(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
+ -- `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
+/-- Write `X t` and `X' t` for the coordinates `coordSection hN t` and `coordSection hN' t` of the
+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. -/
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']
@@ -436,7 +434,7 @@ lemma IsThetaStructure.pull_eq_of_intertwines (h : IsThetaStructure Lg η hN c)
-- `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 :=
- h.coordSection_add_mem_of_mem_thetaGroup hU hl t
+ h.coordSection_add_of_mem 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`