Skip to content

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

Python

prove the cancellation lemma by the explicit rewrites instead of simp

sangxsh2303de11daa3
diff --git a/src/New/OneLift/ComparisonOperator/GluedForms.lean b/src/New/OneLift/ComparisonOperator/GluedForms.lean
index 5fbc4e6873e..fe1be260dac 100644
--- a/src/New/OneLift/ComparisonOperator/GluedForms.lean
+++ b/src/New/OneLift/ComparisonOperator/GluedForms.lean
@@ -153,8 +153,10 @@ omit [DecidableEq n] in
private lemma reduction_genIntAdele_mul_eq_zero_iff {x : Ô E} {z : 𝔸f E}
(hx : (x : 𝔸f E) = O.genIdele.val * z) :
O.chosenModulusSq.reduction (O.genIntAdele * x) = 0 ↔ z ∈ Ô E := by
- rw [reduction_levelModulus_eq_zero_iff, Subring.coe_mul, hx]
- simp [sq, mul_assoc]
+ rw [reduction_levelModulus_eq_zero_iff]
+ change O.genIdele⁻¹.val ^ 2 * (O.genIdele.val * (x : 𝔸f E)) ∈ Ô E ↔ _
+ rw [hx, sq, mul_assoc O.genIdele⁻¹.val, ← mul_assoc O.genIdele⁻¹.val O.genIdele.val,
+ Units.inv_mul, one_mul, ← mul_assoc, Units.inv_mul, one_mul]
namespace DividedSplitting