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/Cyclotomic/Kolyvagin/ReciprocityComponentBounds): use IsNilpotent.isUnit_one_sub in sum_floorDiff_dvd

sangxshf83a59966b03
diff --git a/src/Lib/Cyclotomic/Kolyvagin/ReciprocityComponentBounds.lean b/src/Lib/Cyclotomic/Kolyvagin/ReciprocityComponentBounds.lean
index 8bd196f520e..53a7eec3c16 100644
--- a/src/Lib/Cyclotomic/Kolyvagin/ReciprocityComponentBounds.lean
+++ b/src/Lib/Cyclotomic/Kolyvagin/ReciprocityComponentBounds.lean
@@ -654,10 +654,9 @@ lemma sum_floorDiff_dvd (h : IsStickelbergerBound N e X)
rw [add_tsub_cancel_right]
linear_combination hx - l ^ (e + 1) * ψ l * hy + 2 * w * h_split
-- The Euler factor is a unit modulo `lⁿ⁺¹`, because `l ^ e * ψ l` is nilpotent there.
- obtain ⟨G, hG⟩ : (1 - l ^ e * ψ l : QuotSpan (l ^ (n + 1) : O)) ∣ 1 := by
- have h_dvd : (1 - l ^ e * ψ l : QuotSpan (l ^ (n + 1) : O)) ∣ 1 - (l ^ e * ψ l) ^ (n + 1) :=
- one_sub_dvd_one_sub_pow _ (n + 1)
- rwa [mul_pow, pow_right_comm, h_nil, zero_pow he_ne_zero, zero_mul, sub_zero] at h_dvd
+ obtain ⟨G, hG⟩ : (1 - l ^ e * ψ l : QuotSpan (l ^ (n + 1) : O)) ∣ 1 :=
+ (IsNilpotent.isUnit_one_sub
+ ⟨n + 1, by rw [mul_pow, pow_right_comm, h_nil, zero_pow he_ne_zero, zero_mul]⟩).dvd
have h_euler_mod :
(((1 - l ^ e * ψ l) * ((a ^ (e + 1) - 1) * X) : O) : QuotSpan (l ^ (n + 1) : O)) =
((2 * w * U + l ^ (n + 1) * (x - l ^ (e - 1) * ψ l * y) : O) :