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/Adelic/QuotientMeasure): unfold orbit measures in a product

alkor2000680188476bca
diff --git a/src/Lib/Adelic/QuotientMeasure/Basic.lean b/src/Lib/Adelic/QuotientMeasure/Basic.lean
index ce0b8aae94d..2ead498cd4c 100644
--- a/src/Lib/Adelic/QuotientMeasure/Basic.lean
+++ b/src/Lib/Adelic/QuotientMeasure/Basic.lean
@@ -274,6 +274,15 @@ lemma measurePreserving_orbitMeasure [IsInvInvariant ν] [c : HasCutoff ν X] :
MeasurePreserving (fun p : X × H ↦ p.2 • p.1) ((orbitMeasure ν μ).prod ν) μ :=
(isCutoff_chosenCutoff ν).measurePreserving
+/-- Unfold the orbit measure in the second factor of a product, keeping the first variable fixed. -/
+@[to_additive measurePreserving_prod_addOrbitMeasure]
+lemma measurePreserving_prod_orbitMeasure [IsInvInvariant ν] [HasCutoff ν X]
+ {Z : Type*} [MeasurableSpace Z] (m : Measure Z) [SFinite m] :
+ MeasurePreserving (fun p : (Z × X) × H ↦ (p.1.1, p.2 • p.1.2))
+ ((m.prod (orbitMeasure ν μ)).prod ν) (m.prod μ) :=
+ ((MeasurePreserving.id m).prod measurePreserving_orbitMeasure).comp
+ (measurePreserving_prodAssoc m (orbitMeasure ν μ) ν)
+
/-- Let the action of H on X have a cutoff for the inversion invariant measure ν and let the
invariant measure μ be positive on nonempty open sets. An H-stable property that holds almost
everywhere for the quotient measure `New.orbitMeasure` holds on a dense subset of X. -/
diff --git a/src/Lib/Adelic/QuotientMeasure/UnfoldingInStages.lean b/src/Lib/Adelic/QuotientMeasure/UnfoldingInStages.lean
index 13347efb8e4..cb193da3fa7 100644
--- a/src/Lib/Adelic/QuotientMeasure/UnfoldingInStages.lean
+++ b/src/Lib/Adelic/QuotientMeasure/UnfoldingInStages.lean
@@ -102,9 +102,8 @@ lemma New.integral_quotMeasure_stages [T2Space H] {Z : Type*} [MeasurableSpace Z
have h_unfold : MeasurePreserving (fun p : (Z × H) × Λ ↦ e p.2 • (i p.1.2 * T p.1.1))
((m.prod (Λ.quotMeasure ν)).prod count) μ := by
-- Unfold `Λ \ H` to `H` in the second factor by `(a, l) ↦ l • a`, then apply `hT`.
- simpa [Function.comp_def, MeasurableEquiv.prodAssoc, Subgroup.smul_def, e, mul_assoc] using
- hT.comp (((MeasurePreserving.id m).prod measurePreserving_orbitMeasure).comp
- (measurePreserving_prodAssoc m (Λ.quotMeasure ν) count))
+ simpa [Function.comp_def, Subgroup.smul_def, e, mul_assoc] using
+ hT.comp (measurePreserving_prod_orbitMeasure (ν := count (α := Λ)) m)
have h_dist :
IdentDistrib F (fun p : Z × H ↦ F (i p.2 * T p.1)) (Γ.quotMeasure μ)
(m.prod (Λ.quotMeasure ν)) :=
diff --git a/src/Lib/SiegelWeil/RallisInner/Doubling.lean b/src/Lib/SiegelWeil/RallisInner/Doubling.lean
index 95f349a79e4..010c055b799 100644
--- a/src/Lib/SiegelWeil/RallisInner/Doubling.lean
+++ b/src/Lib/SiegelWeil/RallisInner/Doubling.lean
@@ -499,9 +499,8 @@ lemma measurePreserving_quotMeasure_unfold (S : Space E n s) :
MeasurePreserving (fun p : (G E s × G E s) × S.Γ ↦ (p.1.1, p.1.1⁻¹ * (p.2 * p.1.2)))
((S.quotMeasure.prod S.quotMeasure).prod .count) (S.quotMeasure.prod volume) :=
-- Reassociate, map `(g, γ)` to `γ * g`, then translate the second component by `g'⁻¹`.
- (measurePreserving_prod_inv_mul S.quotMeasure volume).comp <|
- ((MeasurePreserving.id S.quotMeasure).prod measurePreserving_orbitMeasure).comp
- (measurePreserving_prodAssoc S.quotMeasure S.quotMeasure Measure.count)
+ (measurePreserving_prod_inv_mul S.quotMeasure volume).comp
+ (measurePreserving_prod_orbitMeasure (ν := Measure.count (α := S.Γ)) S.quotMeasure)
omit [WeilData E] in
/-- If `‖y g‖ * height g ^ l ≤ B` and `‖y' g‖ * height g ^ l ≤ B'` for all `g`, then a constant `C`