Lean formalization of the Riemann Hypothesis (Alpöge, 2026-11-20) being cleaned up by members of the Lean community.
Python
refactor(New/UpperBound/Seesaw/Cut): extract off-modulus local integrality helper
Rohan Arun7e022a5791ef
diff --git a/src/New/UpperBound/Seesaw/Cut.lean b/src/New/UpperBound/Seesaw/Cut.leanindex aa0f4fe72c4..ddf8421e271 100644--- a/src/New/UpperBound/Seesaw/Cut.lean+++ b/src/New/UpperBound/Seesaw/Cut.lean@@ -87,6 +87,18 @@ structure IsStageCut (j : ℕ) (hj : j ≤ 2 * D.ϱ + 1) (T : Finset (Gf D.E (D.coverMultiplicity (D.gradingY j hj).besselFin (stdLevel D.E (D.Y j)) T x ≠ 0open scoped Pointwise in+/-- For `C : Set (Gf D.E (D.Y j))` supported on `ϑ.Q ∪ star '' ϑ.Q`, any point of+`C * (stdLevel D.E (D.Y j) : Set (Gf D.E (D.Y j)))` lies in `localIntGL (D.Y j) w` at every+place `w` outside `ϑ.Q` and its conjugate. -/+private lemma atPlace_mul_stdLevel_mem_localIntGL {j : ℕ}+ {C : Set (Gf D.E (D.Y j))} (hC_supp : C ⊆ Gf.supportedOn (D.Y j) (ϑ.Q : Set (FinPlace D.E)))+ {x : Gf D.E (D.Y j)} (hx : x ∈ C * (stdLevel D.E (D.Y j) : Set (Gf D.E (D.Y j))))+ {w : FinPlace D.E} (hw : ¬(w ∈ ϑ.Q ∨ star w ∈ ϑ.Q)) :+ x.atPlace w ∈ localIntGL (D.Y j) w := by+ rcases hx with ⟨c, hc, z, hz, rfl⟩+ obtain ⟨hw_q, hw_star⟩ := not_or.1 hw+ simp [mem_supportedOn.1 (hC_supp hc) w hw_q hw_star, mem_stdLevel_iff.1 hz]+/-- For every `j ≤ 2 D.ϱ + 1` there is a finite set `T` of classes of `Gf D.E (D.Y j)` modulo`levelY ϑ j` with `IsStageCut ϑ j hj T`. Let `R_j` be the finite Bessel subgroup`(D.gradingY j hj).besselFin`, and let `stdLevel` be the lattice stabiliser. The multiplicity of a@@ -104,10 +116,8 @@ lemma exists_isStageCut (j : ℕ) (hj : j ≤ 2 * D.ϱ + 1) :(D.gradingY j hj).exists_finite_representatives (Q := (ϑ.Q : Set (FinPlace D.E)))(twistIdele ϑ) j fun w hw ↦ (valued_twistIdele ϑ w).trans (ite_eq_right hw)have h_off : ∀ x ∈ C * (stdLevel D.E (D.Y j) : Set (Gf D.E (D.Y j))), ∀ w : FinPlace D.E,- ¬(w ∈ ϑ.Q ∨ star w ∈ ϑ.Q) → x.atPlace w ∈ localIntGL (D.Y j) w := by- rintro _ ⟨c, hc, z, hz, rfl⟩ w hw- obtain ⟨hw, hw_star⟩ := not_or.1 hw- simp [mem_supportedOn.1 (hC_supp hc) w hw hw_star, mem_stdLevel_iff.1 hz]+ ¬(w ∈ ϑ.Q ∨ star w ∈ ϑ.Q) → x.atPlace w ∈ localIntGL (D.Y j) w :=+ fun _ hx _ hw ↦ ϑ.atPlace_mul_stdLevel_mem_localIntGL hC_supp hx hwhave h_int : ∀ x ∈ C * (stdLevel D.E (D.Y j) : Set (Gf D.E (D.Y j))),x ∈ localLevel (D.Y j) {w : FinPlace D.E | ↑ϑ.normQ ∉ w.asIdeal} := fun x hx w hw ↦h_off x hx w fun hwQ ↦ hw (D.normQ_mem_and_notMem_of_mem_Q ϑ hwQ).1