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): reuse the proper-action orbit cutoff
CollinYuanjieRen58493b2ac23f
diff --git a/src/Lib/Adelic/QuotientMeasure/Basic.lean b/src/Lib/Adelic/QuotientMeasure/Basic.leanindex ce0b8aae94d..3e5a84624e6 100644--- a/src/Lib/Adelic/QuotientMeasure/Basic.lean+++ b/src/Lib/Adelic/QuotientMeasure/Basic.lean@@ -4,6 +4,7 @@ public import Mathlib.MeasureTheory.Group.ModularCharacterpublic import Mathlib.Probability.IdentDistribpublic import Mathlib.Analysis.CStarAlgebra.Classespublic import Mathlib.Topology.Algebra.ProperAction.Basic+import TauCeti.MeasureTheory.Group.OrbitCutoff.Discreteimport TauCeti.MeasureTheory.Measure.Haar.Uniqueimport Mathlib.Dynamics.Ergodic.Action.Regularimport Mathlib.Topology.Algebra.ProperAction.Torsor@@ -355,57 +356,44 @@ lemma tsum_toReal_smul_of_tsum_eq_one {I : Type*} {f : I → ℝ≥0∞} (h :rw [← tsum_toReal_eq h_fin, h, toReal_one]simp [tsum_mul_right, ← Complex.ofReal_tsum, h_real]+/-! ### Existence of cutoffs -/++section+variable [AddGroup H] [AddAction H X] [MeasurableAdd H] [MeasurableVAdd₂ H X]+ {ν : Measure H} [SFinite (α := H) ν] [IsAddRightInvariant ν]++/-- A proper additive action admits an orbit cutoff. Apply the multiplicative theorem to+the same action through the type synonym `Multiplicative H`. -/+instance hasAddCutoff_of_proper [TopologicalSpace H] [TopologicalSpace X] [SigmaCompactSpace X]+ [T2Space X] [OpensMeasurableSpace X] [ProperVAdd H X] [IsFiniteMeasureOnCompacts ν]+ [NeZero ν] : HasAddCutoff ν X := by+ let μ : Measure (Multiplicative H) := ν+ let : MeasurableMul (Multiplicative H) :=+ ⟨measurable_const_add (M := H), measurable_add_const (M := H)⟩+ let : MeasurableSMul₂ (Multiplicative H) X := ⟨‹MeasurableVAdd₂ H X›.measurable_vadd⟩+ let : ProperSMul (Multiplicative H) X := ⟨‹ProperVAdd H X›.isProperMap_vadd_pair⟩+ let : μ.IsMulRightInvariant := ⟨‹ν.IsAddRightInvariant›.map_add_right_eq_self⟩+ let : SFinite μ := ‹SFinite ν›+ let : IsFiniteMeasureOnCompacts μ := ‹IsFiniteMeasureOnCompacts ν›+ let : NeZero μ := ‹NeZero ν›+ obtain ⟨β, hβ⟩ := (hasOrbitCutoff_of_properSMul (ν := μ) (X := X)).exists_isOrbitCutoff+ exact ⟨β, hβ.measurable, hβ.lintegral_smul⟩+end+variable (Γ N : Subgroup G) [DiscreteTopology Γ] [Group H] [MulAction H X] [MeasurableMul H][MeasurableSMul₂ H X]{ν : Measure H} [SFinite (α := H) ν] [IsMulRightInvariant ν] [TopologicalSpace H]-/-! ### Existence of cutoffs -/--open scoped Classical in/-- A proper action of `H` on a σ-compact Hausdorff space `X` has a cutoff (a measurable weight withintegral one over each orbit) for every nonzero s-finite right-invariant measure `ν` on `H` that is-finite on compact sets. -/-@[to_additive hasAddCutoff_of_proper]+finite on compact sets. Tau Ceti constructs the weight using the first set in a compact exhaustion+whose orbit preimage has positive measure. -/+@[to_additive existing hasAddCutoff_of_proper]instance hasCutoff_of_proper [TopologicalSpace X] [c : SigmaCompactSpace X] [T2Space X][OpensMeasurableSpace X] [ProperSMul H X] [IsFiniteMeasureOnCompacts ν] [NeZero ν] :HasCutoff ν X := by- -- Exhaust `X` by compact sets `K n` and let `t n x = ν {h | h • x ∈ K n}`, finite by properness- -- and constant on orbits. On the orbit of `x` take the least `n` with `t n x > 0`; the cutoff is- -- `(t n x)⁻¹` on `K n` and `0` elsewhere.- obtain ⟨K, hK, h_cover⟩ : ∃ K : ℕ → Set X, (∀ n, IsCompact (K n)) ∧ ⋃ n, K n = univ :=- c.isSigmaCompact_univ- let t (n : ℕ) (x : X) : ℝ≥0∞ := ν {h : H | h • x ∈ K n}- have h_pos (x : X) : ∃ n : ℕ, 0 < t n x := by- -- the sets `{h | h • x ∈ K n}` cover `H`, and `ν ≠ 0`- by_contra! h_null- have h_union : ⋃ n : ℕ, {h : H | h • x ∈ K n} = univ := by- simp [← ofPred_exists, ← mem_iUnion, h_cover]- have h_zero : ν univ = 0 := by- rw [← h_union]- exact measure_iUnion_null fun n ↦ nonpos_iff_eq_zero.1 (h_null n)- exact NeZero.ne ν (measure_univ_eq_zero.1 h_zero)- have h_fin (n : ℕ) (x : X) : t n x ≠ ∞ := by- -- properness: the elements of `H` that move `x` into a compact set form a compact set- have h_compact : IsCompact {h : H | h • x ∈ K n} := by- simpa using ProperSMul.isCompact_setOfPred_inter_nonempty (G := H)- (isCompact_singleton (x := x)) (hK n)- exact h_compact.measure_ne_top- have h_inv (n : ℕ) (x : X) (g : H) : t n (g • x) = t n x := by- simpa [mul_smul] using measure_preimage_mul_right ν g {h | h • x ∈ K n}- have h_meas (n : ℕ) : Measurable (t n) :=- measurable_measure_prodMk_right (measurable_smul (hK n).measurableSet)- let β (x : X) : ℝ≥0∞ := (K (Nat.find (h_pos x))).indicator (t (Nat.find (h_pos x)))⁻¹ x- have hβ_meas : Measurable β :=- .find (fun n ↦ (h_meas n).inv.indicator (hK n).measurableSet)- (fun n ↦ h_meas n measurableSet_Ioi) h_pos- refine ⟨β, hβ_meas, fun x ↦ ?_⟩- set n : ℕ := Nat.find (h_pos x) with hn- have hβ (h : H) : β (h • x) =- ((fun g : H ↦ g • x) ⁻¹' K n).indicator (fun _ ↦ (t n x)⁻¹) h := by- simp [β, indicator, h_inv, hn]- simp only [hβ]- rw [lintegral_indicator_const (measurable_smul_const x (hK n).measurableSet)]- exact ENNReal.inv_mul_cancel (Nat.find_spec (h_pos x)).ne' (h_fin n x)+ obtain ⟨β, hβ⟩ := (hasOrbitCutoff_of_properSMul (ν := ν) (X := X)).exists_isOrbitCutoff+ exact ⟨β, hβ.measurable, hβ.lintegral_smul⟩/-! ### Cosets of a subgroup and subgroups of discrete subgroups -/