measure_theory.measure.haar.quotientMathlib.MeasureTheory.Measure.Haar.Quotient

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(measure_theory/measure/haar_quotient): the Unfolding Trick (#18863)

We prove the "unfolding trick": Given a subgroup Γ of a group G, the integral of a function f on G times the lift to G of a function g on the coset space G ⧸ Γ with respect to a right-invariant measure μ on G, is equal to the integral over the coset space of the automorphization of f times g.

We also prove the following simplified version: Given a subgroup Γ of a group G, the integral of a function f on G with respect to a right-invariant measure μ is equal to the integral over the coset space G ⧸ Γ of the automorphization of f.

A question: is it possible to deduce ae_strongly_measurable (quotient_group.automorphize f) μ_𝓕 from ae_strongly_measurable f μ (as opposed to assuming it as a hypothesis in the main theorem)? It seems quite plausible...

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>

Co-authored-by: Alex Kontorovich <58564076+AlexKontorovich@users.noreply.github.com> Co-authored-by: AlexKontorovich <58564076+AlexKontorovich@users.noreply.github.com>

Diff
@@ -33,8 +33,10 @@ Note that a group `G` with Haar measure that is both left and right invariant is
 **unimodular**.
 -/
 
-open set measure_theory topological_space measure_theory.measure
-open_locale pointwise nnreal
+noncomputable theory
+
+open set measure_theory topological_space measure_theory.measure quotient_group
+open_locale pointwise measure_theory topology big_operators nnreal ennreal
 
 variables {G : Type*} [group G] [measurable_space G] [topological_space G]
   [topological_group G] [borel_space G]
@@ -116,8 +118,6 @@ lemma measure_theory.is_fundamental_domain.is_mul_left_invariant_map [subgroup.n
     { exact hA, },
   end }
 
-variables [t2_space (G ⧸ Γ)] [second_countable_topology (G ⧸ Γ)] (K : positive_compacts (G ⧸ Γ))
-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
@@ -125,7 +125,8 @@ variables [t2_space (G ⧸ Γ)] [second_countable_topology (G ⧸ Γ)] (K : posi
   `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward
   to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on
   `G ⧸ Γ`."]
-lemma measure_theory.is_fundamental_domain.map_restrict_quotient [subgroup.normal Γ]
+lemma measure_theory.is_fundamental_domain.map_restrict_quotient [t2_space (G ⧸ Γ)]
+  [second_countable_topology (G ⧸ Γ)] (K : positive_compacts (G ⧸ Γ)) [subgroup.normal Γ]
   [measure_theory.measure.is_haar_measure μ] [μ.is_mul_right_invariant]
   (h𝓕_finite : μ 𝓕 < ⊤) : measure.map (quotient_group.mk' Γ) (μ.restrict 𝓕)
   = (μ (𝓕 ∩ (quotient_group.mk' Γ) ⁻¹' K)) • (measure_theory.measure.haar_measure K) :=
@@ -151,12 +152,178 @@ end
   topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume
   fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate
   multiples of Haar measure on `G` and `G ⧸ Γ`."]
-lemma measure_preserving_quotient_group.mk' [subgroup.normal Γ]
-  [measure_theory.measure.is_haar_measure μ] [μ.is_mul_right_invariant]
-  (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0) (h : μ (𝓕 ∩ (quotient_group.mk' Γ) ⁻¹' K) = c) :
+lemma measure_preserving_quotient_group.mk' [t2_space (G ⧸ Γ)] [second_countable_topology (G ⧸ Γ)]
+  (K : positive_compacts (G ⧸ Γ)) [subgroup.normal Γ] [measure_theory.measure.is_haar_measure μ]
+  [μ.is_mul_right_invariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
+  (h : μ (𝓕 ∩ (quotient_group.mk' Γ) ⁻¹' K) = c) :
   measure_preserving
     (quotient_group.mk' Γ)
     (μ.restrict 𝓕)
     (c • (measure_theory.measure.haar_measure K)) :=
 { measurable := continuous_quotient_mk.measurable,
   map_eq := by rw [h𝓕.map_restrict_quotient K h𝓕_finite, h]; refl }
+
+section
+
+local notation `μ_𝓕` := measure.map (@quotient_group.mk G _ Γ) (μ.restrict 𝓕)
+
+/-- The `ess_sup` of a function `g` on the quotient space `G ⧸ Γ` with respect to the pushforward
+  of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental domain `𝓕`, is the
+  same as the `ess_sup` of `g`'s lift to the universal cover `G` with respect to `μ`. -/
+@[to_additive "The `ess_sup` of a function `g` on the additive quotient space `G ⧸ Γ` with respect
+  to the pushforward of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental
+  domain `𝓕`, is the same as the `ess_sup` of `g`'s lift to the universal cover `G` with respect
+  to `μ`."]
+lemma ess_sup_comp_quotient_group_mk [μ.is_mul_right_invariant] {g : G ⧸ Γ → ℝ≥0∞}
+  (g_ae_measurable : ae_measurable g μ_𝓕) :
+  ess_sup g μ_𝓕 = ess_sup (λ (x : G), g x) μ :=
+begin
+  have hπ : measurable (quotient_group.mk : G → G ⧸ Γ) := continuous_quotient_mk.measurable,
+  rw ess_sup_map_measure g_ae_measurable hπ.ae_measurable,
+  refine h𝓕.ess_sup_measure_restrict _,
+  rintros ⟨γ, hγ⟩ x,
+  dsimp,
+  congr' 1,
+  exact quotient_group.mk_mul_of_mem x hγ,
+end
+
+/-- Given a quotient space `G ⧸ Γ` where `Γ` is `countable`, and the restriction,
+  `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
+  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
+  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
+  will take the value `∞` on any open set in the quotient! -/
+@[to_additive "Given an additive quotient space `G ⧸ Γ` where `Γ` is `countable`, and the
+  restriction, `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
+  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
+  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
+  will take the value `∞` on any open set in the quotient!"]
+lemma _root_.measure_theory.is_fundamental_domain.absolutely_continuous_map
+  [μ.is_mul_right_invariant] :
+  map (quotient_group.mk : G → G ⧸ Γ) μ ≪ map (quotient_group.mk : G → G ⧸ Γ) (μ.restrict 𝓕) :=
+begin
+  set π : G → G ⧸ Γ := quotient_group.mk,
+  have meas_π : measurable π := continuous_quotient_mk.measurable,
+  apply absolutely_continuous.mk,
+  intros s s_meas hs,
+  rw map_apply meas_π s_meas at hs ⊢,
+  rw measure.restrict_apply at hs,
+  apply h𝓕.measure_zero_of_invariant _ _ hs,
+  { intros γ,
+    ext g,
+    rw [set.mem_smul_set_iff_inv_smul_mem, mem_preimage, mem_preimage],
+    congrm _ ∈ s,
+    convert quotient_group.mk_mul_of_mem g (γ⁻¹).2, },
+  exact measurable_set_preimage meas_π s_meas,
+end
+
+local attribute [-instance] quotient.measurable_space
+
+/-- This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the
+  integral of a function `f` on `G` with respect to a right-invariant measure `μ` is equal to the
+  integral over the quotient `G ⧸ Γ` of the automorphization of `f`. -/
+@[to_additive "This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of an
+  additive  group `G`, the integral of a function `f` on `G` with respect to a right-invariant
+  measure `μ` is equal to the integral over the quotient `G ⧸ Γ` of the automorphization of `f`."]
+lemma quotient_group.integral_eq_integral_automorphize {E : Type*} [normed_add_comm_group E]
+  [complete_space E] [normed_space ℝ E] [μ.is_mul_right_invariant] {f : G → E}
+  (hf₁ : integrable f μ) (hf₂ : ae_strongly_measurable (automorphize f) μ_𝓕) :
+  ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
+calc ∫ x : G, f x ∂μ  = ∑' γ : Γ.opposite, ∫ x in 𝓕, f (γ • x) ∂μ : h𝓕.integral_eq_tsum'' f hf₁
+... = ∫ x in 𝓕, ∑' γ : Γ.opposite, f (γ • x) ∂μ :
+  begin
+    rw integral_tsum,
+    { exact λ i, (hf₁.1.comp_quasi_measure_preserving
+        (measure_preserving_smul i μ).quasi_measure_preserving).restrict, },
+    { rw ← h𝓕.lintegral_eq_tsum'' (λ x, ‖f x‖₊),
+      exact ne_of_lt hf₁.2, },
+  end
+... = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :
+  (integral_map continuous_quotient_mk.ae_measurable hf₂).symm
+
+/-- This is the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the integral of a
+  function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
+  to a right-invariant measure `μ` on `G`, is equal to the integral over the quotient of the
+  automorphization of `f` times `g`. -/
+lemma quotient_group.integral_mul_eq_integral_automorphize_mul {K : Type*} [normed_field K]
+  [complete_space K] [normed_space ℝ K] [μ.is_mul_right_invariant] {f : G → K}
+  (f_ℒ_1 : integrable f μ) {g : G ⧸ Γ → K} (hg : ae_strongly_measurable g μ_𝓕)
+  (g_ℒ_infinity : ess_sup (λ x, ↑‖g x‖₊) μ_𝓕 ≠ ∞)
+  (F_ae_measurable : ae_strongly_measurable (quotient_group.automorphize f) μ_𝓕) :
+  ∫ x : G, g (x : G ⧸ Γ) * (f x) ∂μ = ∫ x : G ⧸ Γ, g x * (quotient_group.automorphize f x) ∂μ_𝓕 :=
+begin
+  let π : G → G ⧸ Γ := quotient_group.mk,
+  have H₀ : quotient_group.automorphize ((g ∘ π) * f) = g * (quotient_group.automorphize f) :=
+    quotient_group.automorphize_smul_left f g,
+  calc ∫ (x : G), g (π x) * f x ∂μ =
+       ∫ (x : G ⧸ Γ), quotient_group.automorphize ((g ∘ π) * f) x ∂μ_𝓕 : _
+  ... = ∫ (x : G ⧸ Γ), g x * (quotient_group.automorphize f x) ∂μ_𝓕 : by simp [H₀],
+  have meas_π : measurable π := continuous_quotient_mk.measurable,
+  have H₁ : integrable ((g ∘ π) * f) μ,
+  { have : ae_strongly_measurable (λ x : G, g (x : G ⧸ Γ)) μ,
+    { refine (ae_strongly_measurable_of_absolutely_continuous _ _ hg).comp_measurable meas_π,
+      exact h𝓕.absolutely_continuous_map },
+    refine integrable.ess_sup_smul f_ℒ_1 this _,
+    { have hg' : ae_strongly_measurable (λ x, ↑‖g x‖₊) μ_𝓕 :=
+        (ennreal.continuous_coe.comp continuous_nnnorm).comp_ae_strongly_measurable hg,
+      rw [← ess_sup_comp_quotient_group_mk h𝓕 hg'.ae_measurable],
+      exact g_ℒ_infinity } },
+  have H₂ : ae_strongly_measurable (quotient_group.automorphize ((g ∘ π) * f)) μ_𝓕,
+  { simp_rw [H₀],
+    exact hg.mul F_ae_measurable },
+  apply quotient_group.integral_eq_integral_automorphize h𝓕 H₁ H₂,
+end
+
+end
+
+section
+
+variables {G' : Type*} [add_group G'] [measurable_space G'] [topological_space G']
+  [topological_add_group G'] [borel_space G']
+  {μ' : measure G'}
+  {Γ' : add_subgroup G'}
+  [countable Γ'] [measurable_space (G' ⧸ Γ')] [borel_space (G' ⧸ Γ')]
+  {𝓕' : set G'}
+
+local notation `μ_𝓕` := measure.map (@quotient_add_group.mk G' _ Γ') (μ'.restrict 𝓕')
+
+/-- This is the **Unfolding Trick**: Given an additive subgroup `Γ'` of an additive group `G'`, the
+  integral of a function `f` on `G'` times the lift to `G'` of a function `g` on the quotient
+  `G' ⧸ Γ'` with respect to a right-invariant measure `μ` on `G'`, is equal to the integral over
+  the quotient of the automorphization of `f` times `g`. -/
+lemma quotient_add_group.integral_mul_eq_integral_automorphize_mul
+{K : Type*} [normed_field K]
+  [complete_space K] [normed_space ℝ K] [μ'.is_add_right_invariant] {f : G' → K}
+  (f_ℒ_1 : integrable f μ') {g : G' ⧸ Γ' → K} (hg : ae_strongly_measurable g μ_𝓕)
+  (g_ℒ_infinity : ess_sup (λ x, ↑‖g x‖₊) μ_𝓕 ≠ ∞)
+  (F_ae_measurable : ae_strongly_measurable (quotient_add_group.automorphize f) μ_𝓕)
+  (h𝓕 : is_add_fundamental_domain Γ'.opposite 𝓕' μ') :
+  ∫ x : G', g (x : G' ⧸ Γ') * (f x) ∂μ'
+    = ∫ x : G' ⧸ Γ', g x * (quotient_add_group.automorphize f x) ∂μ_𝓕 :=
+begin
+  let π : G' → G' ⧸ Γ' := quotient_add_group.mk,
+  have H₀ : quotient_add_group.automorphize ((g ∘ π) * f)
+    = g * (quotient_add_group.automorphize f) :=
+    quotient_add_group.automorphize_smul_left f g,
+  calc ∫ (x : G'), g (π x) * f x ∂μ' =
+       ∫ (x : G' ⧸ Γ'), quotient_add_group.automorphize ((g ∘ π) * f) x ∂μ_𝓕 : _
+  ... = ∫ (x : G' ⧸ Γ'), g x * (quotient_add_group.automorphize f x) ∂μ_𝓕 : by simp [H₀],
+  have meas_π : measurable π := continuous_quotient_mk.measurable,
+  have H₁ : integrable ((g ∘ π) * f) μ',
+  { have : ae_strongly_measurable (λ x : G', g (x : G' ⧸ Γ')) μ',
+    { refine (ae_strongly_measurable_of_absolutely_continuous _ _ hg).comp_measurable meas_π,
+      exact h𝓕.absolutely_continuous_map },
+    refine integrable.ess_sup_smul f_ℒ_1 this _,
+    { have hg' : ae_strongly_measurable (λ x, ↑‖g x‖₊) μ_𝓕 :=
+        (ennreal.continuous_coe.comp continuous_nnnorm).comp_ae_strongly_measurable hg,
+      rw [← ess_sup_comp_quotient_add_group_mk h𝓕 hg'.ae_measurable],
+      exact g_ℒ_infinity } },
+  have H₂ : ae_strongly_measurable (quotient_add_group.automorphize ((g ∘ π) * f)) μ_𝓕,
+  { simp_rw [H₀],
+    exact hg.mul F_ae_measurable },
+  apply quotient_add_group.integral_eq_integral_automorphize h𝓕 H₁ H₂,
+end
+
+end
+
+attribute [to_additive quotient_group.integral_mul_eq_integral_automorphize_mul]
+  quotient_add_group.integral_mul_eq_integral_automorphize_mul

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -61,13 +61,13 @@ variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.opEquiv 𝓕 μ)
 
 variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
-#print MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map /-
+#print MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient /-
 /-- The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and right-
   invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and\n  right-invariant measure on an additive topological group `G` to a fundamental domain `𝓕` is a\n  `G`-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeftInvariant]
-    [μ.IsMulRightInvariant] :
+theorem MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient
+    [μ.IsMulLeftInvariant] [μ.IsMulRightInvariant] :
     SMulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) :=
   {
     measure_preimage_smul := by
@@ -99,11 +99,10 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
       ext
       have : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ
       simp [(· • ·), this] }
-#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
-#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vaddInvariantMeasure_map
+#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient
+#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.AddQuotientMeasureEqMeasurePreimage.vaddInvariantMeasure_quotient
 -/
 
-#print MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map /-
 /-- Assuming `Γ` is a normal subgroup of a topological group `G`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of a both left- and right-invariant measure on `G` to a
   fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`. -/
@@ -125,10 +124,8 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
       · exact measurable_const_mul _
       · exact hA }
 #align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
-#align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
--/
+#align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.is_add_left_invariant_map
 
-#print MeasureTheory.IsFundamentalDomain.map_restrict_quotient /-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
@@ -154,9 +151,7 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [T2Space (G ⧸
   exact K.is_compact.measurable_set
 #align measure_theory.is_fundamental_domain.map_restrict_quotient MeasureTheory.IsFundamentalDomain.map_restrict_quotient
 #align measure_theory.is_add_fundamental_domain.map_restrict_quotient MeasureTheory.IsAddFundamentalDomain.map_restrict_quotient
--/
 
-#print MeasurePreservingQuotientGroup.mk' /-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is
   measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
@@ -172,7 +167,6 @@ theorem MeasurePreservingQuotientGroup.mk' [T2Space (G ⧸ Γ)] [SecondCountable
     map_eq := by rw [h𝓕.map_restrict_quotient K h𝓕_finite, h] <;> rfl }
 #align measure_preserving_quotient_group.mk' MeasurePreservingQuotientGroup.mk'
 #align measure_preserving_quotient_add_group.mk' MeasurePreservingQuotientAddGroup.mk'
--/
 
 section
 
Diff
@@ -213,7 +213,7 @@ theorem MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map [μ.IsMulRigh
   apply absolutely_continuous.mk
   intro s s_meas hs
   rw [map_apply meas_π s_meas] at hs ⊢
-  rw [measure.restrict_apply] at hs 
+  rw [measure.restrict_apply] at hs
   apply h𝓕.measure_zero_of_invariant _ _ hs
   · intro γ
     ext g
Diff
@@ -57,7 +57,7 @@ instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (
 #align quotient_add_group.has_measurable_vadd QuotientAddGroup.measurableVAdd
 -/
 
-variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.opposite 𝓕 μ)
+variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.opEquiv 𝓕 μ)
 
 variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
@@ -239,8 +239,8 @@ theorem QuotientGroup.integral_eq_integral_automorphize {E : Type _} [NormedAddC
     (hf₂ : AEStronglyMeasurable (automorphize f) μ_𝓕) :
     ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
   calc
-    ∫ x : G, f x ∂μ = ∑' γ : Γ.opposite, ∫ x in 𝓕, f (γ • x) ∂μ := h𝓕.integral_eq_tsum'' f hf₁
-    _ = ∫ x in 𝓕, ∑' γ : Γ.opposite, f (γ • x) ∂μ :=
+    ∫ x : G, f x ∂μ = ∑' γ : Γ.opEquiv, ∫ x in 𝓕, f (γ • x) ∂μ := h𝓕.integral_eq_tsum'' f hf₁
+    _ = ∫ x in 𝓕, ∑' γ : Γ.opEquiv, f (γ • x) ∂μ :=
       by
       rw [integral_tsum]
       ·
@@ -309,7 +309,7 @@ theorem quotientAddGroup.integral_hMul_eq_integral_automorphize_hMul {K : Type _
     (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
     (g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) μ_𝓕 ≠ ∞)
     (F_ae_measurable : AEStronglyMeasurable (quotientAddGroup.automorphize f) μ_𝓕)
-    (h𝓕 : IsAddFundamentalDomain Γ'.opposite 𝓕' μ') :
+    (h𝓕 : IsAddFundamentalDomain Γ'.opEquiv 𝓕' μ') :
     ∫ x : G', g (x : G' ⧸ Γ') * f x ∂μ' =
       ∫ x : G' ⧸ Γ', g x * quotientAddGroup.automorphize f x ∂μ_𝓕 :=
   by
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Alex Kontorovich and Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
 -/
-import Mathbin.MeasureTheory.Measure.Haar.Basic
-import Mathbin.MeasureTheory.Group.FundamentalDomain
-import Mathbin.Algebra.Group.Opposite
+import MeasureTheory.Measure.Haar.Basic
+import MeasureTheory.Group.FundamentalDomain
+import Algebra.Group.Opposite
 
 #align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
 
Diff
@@ -197,6 +197,7 @@ theorem essSup_comp_quotient_group_mk [μ.IsMulRightInvariant] {g : G ⧸ Γ →
 #align ess_sup_comp_quotient_add_group_mk ess_sup_comp_quotient_add_group_mk
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr «expr ∈ »(_, s)]] -/
+#print MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map /-
 /-- Given a quotient space `G ⧸ Γ` where `Γ` is `countable`, and the restriction,
   `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
   in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
@@ -222,10 +223,12 @@ theorem MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map [μ.IsMulRigh
     convert QuotientGroup.mk_mul_of_mem g γ⁻¹.2
   exact measurableSet_preimage meas_π s_meas
 #align measure_theory.is_fundamental_domain.absolutely_continuous_map MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map
-#align measure_theory.is_add_fundamental_domain.absolutely_continuous_map MeasureTheory.IsAddFundamentalDomain.absolutely_continuous_map
+#align measure_theory.is_add_fundamental_domain.absolutely_continuous_map MeasureTheory.IsAddFundamentalDomain.absolutelyContinuous_map
+-/
 
 attribute [-instance] Quotient.instMeasurableSpace
 
+#print QuotientGroup.integral_eq_integral_automorphize /-
 /-- This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the
   integral of a function `f` on `G` with respect to a right-invariant measure `μ` is equal to the
   integral over the quotient `G ⧸ Γ` of the automorphization of `f`. -/
@@ -249,7 +252,7 @@ theorem QuotientGroup.integral_eq_integral_automorphize {E : Type _} [NormedAddC
     _ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
       (integral_map continuous_quotient_mk'.AEMeasurable hf₂).symm
 #align quotient_group.integral_eq_integral_automorphize QuotientGroup.integral_eq_integral_automorphize
-#align quotient_add_group.integral_eq_integral_automorphize quotientAddGroup.integral_eq_integral_automorphize
+-/
 
 /-- This is the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the integral of a
   function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
Diff
@@ -255,7 +255,7 @@ theorem QuotientGroup.integral_eq_integral_automorphize {E : Type _} [NormedAddC
   function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
   to a right-invariant measure `μ` on `G`, is equal to the integral over the quotient of the
   automorphization of `f` times `g`. -/
-theorem QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type _} [NormedField K]
+theorem QuotientGroup.integral_hMul_eq_integral_automorphize_hMul {K : Type _} [NormedField K]
     [CompleteSpace K] [NormedSpace ℝ K] [μ.IsMulRightInvariant] {f : G → K} (f_ℒ_1 : Integrable f μ)
     {g : G ⧸ Γ → K} (hg : AEStronglyMeasurable g μ_𝓕)
     (g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) μ_𝓕 ≠ ∞)
@@ -285,7 +285,7 @@ theorem QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type _} [No
     simp_rw [H₀]
     exact hg.mul F_ae_measurable
   apply QuotientGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
-#align quotient_group.integral_mul_eq_integral_automorphize_mul QuotientGroup.integral_mul_eq_integral_automorphize_mul
+#align quotient_group.integral_mul_eq_integral_automorphize_mul QuotientGroup.integral_hMul_eq_integral_automorphize_hMul
 
 end
 
@@ -301,7 +301,7 @@ local notation "μ_𝓕" => Measure.map (@QuotientAddGroup.mk G' _ Γ') (μ'.res
   integral of a function `f` on `G'` times the lift to `G'` of a function `g` on the quotient
   `G' ⧸ Γ'` with respect to a right-invariant measure `μ` on `G'`, is equal to the integral over
   the quotient of the automorphization of `f` times `g`. -/
-theorem quotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type _} [NormedField K]
+theorem quotientAddGroup.integral_hMul_eq_integral_automorphize_hMul {K : Type _} [NormedField K]
     [CompleteSpace K] [NormedSpace ℝ K] [μ'.IsAddRightInvariant] {f : G' → K}
     (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
     (g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) μ_𝓕 ≠ ∞)
@@ -334,10 +334,10 @@ theorem quotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type _}
     simp_rw [H₀]
     exact hg.mul F_ae_measurable
   apply quotientAddGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
-#align quotient_add_group.integral_mul_eq_integral_automorphize_mul quotientAddGroup.integral_mul_eq_integral_automorphize_mul
+#align quotient_add_group.integral_mul_eq_integral_automorphize_mul quotientAddGroup.integral_hMul_eq_integral_automorphize_hMul
 
 end
 
-attribute [to_additive QuotientGroup.integral_mul_eq_integral_automorphize_mul]
-  quotientAddGroup.integral_mul_eq_integral_automorphize_mul
+attribute [to_additive QuotientGroup.integral_hMul_eq_integral_automorphize_hMul]
+  quotientAddGroup.integral_hMul_eq_integral_automorphize_hMul
 
Diff
@@ -7,7 +7,7 @@ import Mathbin.MeasureTheory.Measure.Haar.Basic
 import Mathbin.MeasureTheory.Group.FundamentalDomain
 import Mathbin.Algebra.Group.Opposite
 
-#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
+#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
 
 /-!
 # Haar quotient measure
@@ -35,9 +35,11 @@ Note that a group `G` with Haar measure that is both left and right invariant is
 -/
 
 
-open Set MeasureTheory TopologicalSpace MeasureTheory.Measure
+noncomputable section
 
-open scoped Pointwise NNReal
+open Set MeasureTheory TopologicalSpace MeasureTheory.Measure QuotientGroup
+
+open scoped Pointwise MeasureTheory Topology BigOperators NNReal ENNReal
 
 variable {G : Type _} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
   [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
@@ -126,15 +128,14 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
 #align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
 -/
 
-variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
-
 #print MeasureTheory.IsFundamentalDomain.map_restrict_quotient /-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
 @[to_additive
       "Given a normal subgroup `Γ` of an additive topological group `G` with Haar measure\n  `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward\n  to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on\n  `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal Γ]
+theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [T2Space (G ⧸ Γ)]
+    [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ]
     [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
     Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕) =
       μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) • MeasureTheory.Measure.haarMeasure K :=
@@ -161,8 +162,9 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
 @[to_additive MeasurePreservingQuotientAddGroup.mk'
       "Given a normal subgroup `Γ` of an additive\n  topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume\n  fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate\n  multiples of Haar measure on `G` and `G ⧸ Γ`."]
-theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
+theorem MeasurePreservingQuotientGroup.mk' [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)]
+    (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ] [MeasureTheory.Measure.IsHaarMeasure μ]
+    [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
     (h : μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) = c) :
     MeasurePreserving (QuotientGroup.mk' Γ) (μ.restrict 𝓕)
       (c • MeasureTheory.Measure.haarMeasure K) :=
@@ -172,3 +174,170 @@ theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
 #align measure_preserving_quotient_add_group.mk' MeasurePreservingQuotientAddGroup.mk'
 -/
 
+section
+
+local notation "μ_𝓕" => Measure.map (@QuotientGroup.mk G _ Γ) (μ.restrict 𝓕)
+
+/-- The `ess_sup` of a function `g` on the quotient space `G ⧸ Γ` with respect to the pushforward
+  of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental domain `𝓕`, is the
+  same as the `ess_sup` of `g`'s lift to the universal cover `G` with respect to `μ`. -/
+@[to_additive
+      "The `ess_sup` of a function `g` on the additive quotient space `G ⧸ Γ` with respect\n  to the pushforward of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental\n  domain `𝓕`, is the same as the `ess_sup` of `g`'s lift to the universal cover `G` with respect\n  to `μ`."]
+theorem essSup_comp_quotient_group_mk [μ.IsMulRightInvariant] {g : G ⧸ Γ → ℝ≥0∞}
+    (g_ae_measurable : AEMeasurable g μ_𝓕) : essSup g μ_𝓕 = essSup (fun x : G => g x) μ :=
+  by
+  have hπ : Measurable (QuotientGroup.mk : G → G ⧸ Γ) := continuous_quotient_mk.measurable
+  rw [essSup_map_measure g_ae_measurable hπ.ae_measurable]
+  refine' h𝓕.ess_sup_measure_restrict _
+  rintro ⟨γ, hγ⟩ x
+  dsimp
+  congr 1
+  exact QuotientGroup.mk_mul_of_mem x hγ
+#align ess_sup_comp_quotient_group_mk essSup_comp_quotient_group_mk
+#align ess_sup_comp_quotient_add_group_mk ess_sup_comp_quotient_add_group_mk
+
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr «expr ∈ »(_, s)]] -/
+/-- Given a quotient space `G ⧸ Γ` where `Γ` is `countable`, and the restriction,
+  `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
+  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
+  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
+  will take the value `∞` on any open set in the quotient! -/
+@[to_additive
+      "Given an additive quotient space `G ⧸ Γ` where `Γ` is `countable`, and the\n  restriction, `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set\n  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the\n  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map\n  will take the value `∞` on any open set in the quotient!"]
+theorem MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map [μ.IsMulRightInvariant] :
+    map (QuotientGroup.mk : G → G ⧸ Γ) μ ≪ map (QuotientGroup.mk : G → G ⧸ Γ) (μ.restrict 𝓕) :=
+  by
+  set π : G → G ⧸ Γ := QuotientGroup.mk
+  have meas_π : Measurable π := continuous_quotient_mk.measurable
+  apply absolutely_continuous.mk
+  intro s s_meas hs
+  rw [map_apply meas_π s_meas] at hs ⊢
+  rw [measure.restrict_apply] at hs 
+  apply h𝓕.measure_zero_of_invariant _ _ hs
+  · intro γ
+    ext g
+    rw [Set.mem_smul_set_iff_inv_smul_mem, mem_preimage, mem_preimage]
+    trace
+      "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr «expr ∈ »(_, s)]]"
+    convert QuotientGroup.mk_mul_of_mem g γ⁻¹.2
+  exact measurableSet_preimage meas_π s_meas
+#align measure_theory.is_fundamental_domain.absolutely_continuous_map MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map
+#align measure_theory.is_add_fundamental_domain.absolutely_continuous_map MeasureTheory.IsAddFundamentalDomain.absolutely_continuous_map
+
+attribute [-instance] Quotient.instMeasurableSpace
+
+/-- This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the
+  integral of a function `f` on `G` with respect to a right-invariant measure `μ` is equal to the
+  integral over the quotient `G ⧸ Γ` of the automorphization of `f`. -/
+@[to_additive
+      "This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of an\n  additive  group `G`, the integral of a function `f` on `G` with respect to a right-invariant\n  measure `μ` is equal to the integral over the quotient `G ⧸ Γ` of the automorphization of `f`."]
+theorem QuotientGroup.integral_eq_integral_automorphize {E : Type _} [NormedAddCommGroup E]
+    [CompleteSpace E] [NormedSpace ℝ E] [μ.IsMulRightInvariant] {f : G → E} (hf₁ : Integrable f μ)
+    (hf₂ : AEStronglyMeasurable (automorphize f) μ_𝓕) :
+    ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
+  calc
+    ∫ x : G, f x ∂μ = ∑' γ : Γ.opposite, ∫ x in 𝓕, f (γ • x) ∂μ := h𝓕.integral_eq_tsum'' f hf₁
+    _ = ∫ x in 𝓕, ∑' γ : Γ.opposite, f (γ • x) ∂μ :=
+      by
+      rw [integral_tsum]
+      ·
+        exact fun i =>
+          (hf₁.1.comp_quasiMeasurePreserving
+              (measure_preserving_smul i μ).QuasiMeasurePreserving).restrict
+      · rw [← h𝓕.lintegral_eq_tsum'' fun x => ‖f x‖₊]
+        exact ne_of_lt hf₁.2
+    _ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
+      (integral_map continuous_quotient_mk'.AEMeasurable hf₂).symm
+#align quotient_group.integral_eq_integral_automorphize QuotientGroup.integral_eq_integral_automorphize
+#align quotient_add_group.integral_eq_integral_automorphize quotientAddGroup.integral_eq_integral_automorphize
+
+/-- This is the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the integral of a
+  function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
+  to a right-invariant measure `μ` on `G`, is equal to the integral over the quotient of the
+  automorphization of `f` times `g`. -/
+theorem QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type _} [NormedField K]
+    [CompleteSpace K] [NormedSpace ℝ K] [μ.IsMulRightInvariant] {f : G → K} (f_ℒ_1 : Integrable f μ)
+    {g : G ⧸ Γ → K} (hg : AEStronglyMeasurable g μ_𝓕)
+    (g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) μ_𝓕 ≠ ∞)
+    (F_ae_measurable : AEStronglyMeasurable (QuotientGroup.automorphize f) μ_𝓕) :
+    ∫ x : G, g (x : G ⧸ Γ) * f x ∂μ = ∫ x : G ⧸ Γ, g x * QuotientGroup.automorphize f x ∂μ_𝓕 :=
+  by
+  let π : G → G ⧸ Γ := QuotientGroup.mk
+  have H₀ : QuotientGroup.automorphize (g ∘ π * f) = g * QuotientGroup.automorphize f :=
+    QuotientGroup.automorphize_smul_left f g
+  calc
+    ∫ x : G, g (π x) * f x ∂μ = ∫ x : G ⧸ Γ, QuotientGroup.automorphize (g ∘ π * f) x ∂μ_𝓕 := _
+    _ = ∫ x : G ⧸ Γ, g x * QuotientGroup.automorphize f x ∂μ_𝓕 := by simp [H₀]
+  have meas_π : Measurable π := continuous_quotient_mk.measurable
+  have H₁ : integrable (g ∘ π * f) μ :=
+    by
+    have : ae_strongly_measurable (fun x : G => g (x : G ⧸ Γ)) μ :=
+      by
+      refine' (ae_strongly_measurable_of_absolutely_continuous _ _ hg).comp_measurable meas_π
+      exact h𝓕.absolutely_continuous_map
+    refine' integrable.ess_sup_smul f_ℒ_1 this _
+    · have hg' : ae_strongly_measurable (fun x => ↑‖g x‖₊) μ_𝓕 :=
+        (ennreal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
+      rw [← essSup_comp_quotient_group_mk h𝓕 hg'.ae_measurable]
+      exact g_ℒ_infinity
+  have H₂ : ae_strongly_measurable (QuotientGroup.automorphize (g ∘ π * f)) μ_𝓕 :=
+    by
+    simp_rw [H₀]
+    exact hg.mul F_ae_measurable
+  apply QuotientGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
+#align quotient_group.integral_mul_eq_integral_automorphize_mul QuotientGroup.integral_mul_eq_integral_automorphize_mul
+
+end
+
+section
+
+variable {G' : Type _} [AddGroup G'] [MeasurableSpace G'] [TopologicalSpace G']
+  [TopologicalAddGroup G'] [BorelSpace G'] {μ' : Measure G'} {Γ' : AddSubgroup G'} [Countable Γ']
+  [MeasurableSpace (G' ⧸ Γ')] [BorelSpace (G' ⧸ Γ')] {𝓕' : Set G'}
+
+local notation "μ_𝓕" => Measure.map (@QuotientAddGroup.mk G' _ Γ') (μ'.restrict 𝓕')
+
+/-- This is the **Unfolding Trick**: Given an additive subgroup `Γ'` of an additive group `G'`, the
+  integral of a function `f` on `G'` times the lift to `G'` of a function `g` on the quotient
+  `G' ⧸ Γ'` with respect to a right-invariant measure `μ` on `G'`, is equal to the integral over
+  the quotient of the automorphization of `f` times `g`. -/
+theorem quotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type _} [NormedField K]
+    [CompleteSpace K] [NormedSpace ℝ K] [μ'.IsAddRightInvariant] {f : G' → K}
+    (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
+    (g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) μ_𝓕 ≠ ∞)
+    (F_ae_measurable : AEStronglyMeasurable (quotientAddGroup.automorphize f) μ_𝓕)
+    (h𝓕 : IsAddFundamentalDomain Γ'.opposite 𝓕' μ') :
+    ∫ x : G', g (x : G' ⧸ Γ') * f x ∂μ' =
+      ∫ x : G' ⧸ Γ', g x * quotientAddGroup.automorphize f x ∂μ_𝓕 :=
+  by
+  let π : G' → G' ⧸ Γ' := QuotientAddGroup.mk
+  have H₀ : quotientAddGroup.automorphize (g ∘ π * f) = g * quotientAddGroup.automorphize f :=
+    quotientAddGroup.automorphize_smul_left f g
+  calc
+    ∫ x : G', g (π x) * f x ∂μ' = ∫ x : G' ⧸ Γ', quotientAddGroup.automorphize (g ∘ π * f) x ∂μ_𝓕 :=
+      _
+    _ = ∫ x : G' ⧸ Γ', g x * quotientAddGroup.automorphize f x ∂μ_𝓕 := by simp [H₀]
+  have meas_π : Measurable π := continuous_quotient_mk.measurable
+  have H₁ : integrable (g ∘ π * f) μ' :=
+    by
+    have : ae_strongly_measurable (fun x : G' => g (x : G' ⧸ Γ')) μ' :=
+      by
+      refine' (ae_strongly_measurable_of_absolutely_continuous _ _ hg).comp_measurable meas_π
+      exact h𝓕.absolutely_continuous_map
+    refine' integrable.ess_sup_smul f_ℒ_1 this _
+    · have hg' : ae_strongly_measurable (fun x => ↑‖g x‖₊) μ_𝓕 :=
+        (ennreal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
+      rw [← ess_sup_comp_quotient_add_group_mk h𝓕 hg'.ae_measurable]
+      exact g_ℒ_infinity
+  have H₂ : ae_strongly_measurable (quotientAddGroup.automorphize (g ∘ π * f)) μ_𝓕 :=
+    by
+    simp_rw [H₀]
+    exact hg.mul F_ae_measurable
+  apply quotientAddGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
+#align quotient_add_group.integral_mul_eq_integral_automorphize_mul quotientAddGroup.integral_mul_eq_integral_automorphize_mul
+
+end
+
+attribute [to_additive QuotientGroup.integral_mul_eq_integral_automorphize_mul]
+  quotientAddGroup.integral_mul_eq_integral_automorphize_mul
+
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Alex Kontorovich and Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.quotient
-! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Measure.Haar.Basic
 import Mathbin.MeasureTheory.Group.FundamentalDomain
 import Mathbin.Algebra.Group.Opposite
 
+#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"7e5137f579de09a059a5ce98f364a04e221aabf0"
+
 /-!
 # Haar quotient measure
 
Diff
@@ -60,10 +60,9 @@ instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (
 
 variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.opposite 𝓕 μ)
 
-include h𝓕
-
 variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
+#print MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map /-
 /-- The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and right-
   invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
@@ -103,7 +102,9 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
       simp [(· • ·), this] }
 #align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
 #align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vaddInvariantMeasure_map
+-/
 
+#print MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map /-
 /-- Assuming `Γ` is a normal subgroup of a topological group `G`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of a both left- and right-invariant measure on `G` to a
   fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`. -/
@@ -126,9 +127,11 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
       · exact hA }
 #align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
 #align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
+-/
 
 variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
 
+#print MeasureTheory.IsFundamentalDomain.map_restrict_quotient /-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
@@ -153,7 +156,9 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   exact K.is_compact.measurable_set
 #align measure_theory.is_fundamental_domain.map_restrict_quotient MeasureTheory.IsFundamentalDomain.map_restrict_quotient
 #align measure_theory.is_add_fundamental_domain.map_restrict_quotient MeasureTheory.IsAddFundamentalDomain.map_restrict_quotient
+-/
 
+#print MeasurePreservingQuotientGroup.mk' /-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is
   measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
@@ -168,4 +173,5 @@ theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
     map_eq := by rw [h𝓕.map_restrict_quotient K h𝓕_finite, h] <;> rfl }
 #align measure_preserving_quotient_group.mk' MeasurePreservingQuotientGroup.mk'
 #align measure_preserving_quotient_add_group.mk' MeasurePreservingQuotientAddGroup.mk'
+-/
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
 
 ! This file was ported from Lean 3 source module measure_theory.measure.haar.quotient
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 7e5137f579de09a059a5ce98f364a04e221aabf0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Algebra.Group.Opposite
 /-!
 # Haar quotient measure
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file, we consider properties of fundamental domains and measures for the action of a
 subgroup of a group `G` on `G` itself.
 
Diff
@@ -42,6 +42,7 @@ open scoped Pointwise NNReal
 variable {G : Type _} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
   [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
 
+#print QuotientGroup.measurableSMul /-
 /-- Measurability of the action of the topological group `G` on the left-coset space `G/Γ`. -/
 @[to_additive
       "Measurability of the action of the additive topological group `G` on the left-coset\n  space `G/Γ`."]
@@ -51,7 +52,8 @@ instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (
   measurable_const_smul g := (continuous_const_smul g).Measurable
   measurable_smul_const x := (QuotientGroup.continuous_smul₁ x).Measurable
 #align quotient_group.has_measurable_smul QuotientGroup.measurableSMul
-#align quotient_add_group.has_measurable_vadd quotientAddGroup.has_measurable_vadd
+#align quotient_add_group.has_measurable_vadd QuotientAddGroup.measurableVAdd
+-/
 
 variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.opposite 𝓕 μ)
 
@@ -63,7 +65,7 @@ variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
   invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and\n  right-invariant measure on an additive topological group `G` to a fundamental domain `𝓕` is a\n  `G`-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.IsMulLeftInvariant]
+theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeftInvariant]
     [μ.IsMulRightInvariant] :
     SMulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) :=
   {
@@ -96,8 +98,8 @@ theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.IsMulLeft
       ext
       have : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ
       simp [(· • ·), this] }
-#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map
-#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vadd_invariant_measure_map
+#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
+#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vaddInvariantMeasure_map
 
 /-- Assuming `Γ` is a normal subgroup of a topological group `G`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of a both left- and right-invariant measure on `G` to a
@@ -120,7 +122,7 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
       · exact measurable_const_mul _
       · exact hA }
 #align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
-#align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.is_add_left_invariant_map
+#align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
 
 variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
 
Diff
@@ -63,8 +63,8 @@ variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
   invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and\n  right-invariant measure on an additive topological group `G` to a fundamental domain `𝓕` is a\n  `G`-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.MulLeftInvariant]
-    [μ.MulRightInvariant] :
+theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.IsMulLeftInvariant]
+    [μ.IsMulRightInvariant] :
     SMulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) :=
   {
     measure_preimage_smul := by
@@ -104,9 +104,9 @@ theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.MulLeftIn
   fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "Assuming `Γ` is a normal subgroup of an additive topological group `G`, the\n  pushforward to the quotient group `G ⧸ Γ` of the restriction of a both left- and right-invariant\n  measure on `G` to a fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.mulLeftInvariant_map [Subgroup.Normal Γ]
-    [μ.MulLeftInvariant] [μ.MulRightInvariant] :
-    (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).MulLeftInvariant :=
+theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Normal Γ]
+    [μ.IsMulLeftInvariant] [μ.IsMulRightInvariant] :
+    (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
   {
     map_mul_left_eq_self := by
       intro x
@@ -119,7 +119,7 @@ theorem MeasureTheory.IsFundamentalDomain.mulLeftInvariant_map [Subgroup.Normal
       · rfl
       · exact measurable_const_mul _
       · exact hA }
-#align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.mulLeftInvariant_map
+#align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
 #align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.is_add_left_invariant_map
 
 variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
@@ -130,7 +130,7 @@ variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : Positive
 @[to_additive
       "Given a normal subgroup `Γ` of an additive topological group `G` with Haar measure\n  `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward\n  to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on\n  `G ⧸ Γ`."]
 theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.HaarMeasure μ] [μ.MulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
+    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
     Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕) =
       μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) • MeasureTheory.Measure.haarMeasure K :=
   by
@@ -141,7 +141,7 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
     ⟨by rw [measure.restrict_apply₀' 𝓕meas, univ_inter]; exact h𝓕_finite⟩
   -- the measure is left-invariant, so by the uniqueness of Haar measure it's enough to show that
   -- it has the stated size on the reference compact set `K`.
-  haveI : (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).MulLeftInvariant :=
+  haveI : (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
     h𝓕.is_mul_left_invariant_map
   rw [measure.haar_measure_unique (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)) K,
     measure.map_apply meas_π, measure.restrict_apply₀' 𝓕meas, inter_comm]
@@ -154,8 +154,8 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
 @[to_additive MeasurePreservingQuotientAddGroup.mk'
       "Given a normal subgroup `Γ` of an additive\n  topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume\n  fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate\n  multiples of Haar measure on `G` and `G ⧸ Γ`."]
-theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ] [MeasureTheory.Measure.HaarMeasure μ]
-    [μ.MulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
+theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
+    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
     (h : μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) = c) :
     MeasurePreserving (QuotientGroup.mk' Γ) (μ.restrict 𝓕)
       (c • MeasureTheory.Measure.haarMeasure K) :=
Diff
@@ -63,9 +63,9 @@ variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
   invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and\n  right-invariant measure on an additive topological group `G` to a fundamental domain `𝓕` is a\n  `G`-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeftInvariant]
-    [μ.IsMulRightInvariant] :
-    SmulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) :=
+theorem MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map [μ.MulLeftInvariant]
+    [μ.MulRightInvariant] :
+    SMulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) :=
   {
     measure_preimage_smul := by
       let π : G → G ⧸ Γ := QuotientGroup.mk
@@ -96,7 +96,7 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
       ext
       have : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ
       simp [(· • ·), this] }
-#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
+#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.sMulInvariantMeasure_map
 #align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vadd_invariant_measure_map
 
 /-- Assuming `Γ` is a normal subgroup of a topological group `G`, the pushforward to the quotient
@@ -104,9 +104,9 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
   fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`. -/
 @[to_additive
       "Assuming `Γ` is a normal subgroup of an additive topological group `G`, the\n  pushforward to the quotient group `G ⧸ Γ` of the restriction of a both left- and right-invariant\n  measure on `G` to a fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Normal Γ]
-    [μ.IsMulLeftInvariant] [μ.IsMulRightInvariant] :
-    (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
+theorem MeasureTheory.IsFundamentalDomain.mulLeftInvariant_map [Subgroup.Normal Γ]
+    [μ.MulLeftInvariant] [μ.MulRightInvariant] :
+    (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).MulLeftInvariant :=
   {
     map_mul_left_eq_self := by
       intro x
@@ -119,7 +119,7 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
       · rfl
       · exact measurable_const_mul _
       · exact hA }
-#align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
+#align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.mulLeftInvariant_map
 #align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.is_add_left_invariant_map
 
 variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
@@ -130,7 +130,7 @@ variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : Positive
 @[to_additive
       "Given a normal subgroup `Γ` of an additive topological group `G` with Haar measure\n  `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward\n  to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on\n  `G ⧸ Γ`."]
 theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
+    [MeasureTheory.Measure.HaarMeasure μ] [μ.MulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
     Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕) =
       μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) • MeasureTheory.Measure.haarMeasure K :=
   by
@@ -141,7 +141,7 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
     ⟨by rw [measure.restrict_apply₀' 𝓕meas, univ_inter]; exact h𝓕_finite⟩
   -- the measure is left-invariant, so by the uniqueness of Haar measure it's enough to show that
   -- it has the stated size on the reference compact set `K`.
-  haveI : (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
+  haveI : (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).MulLeftInvariant :=
     h𝓕.is_mul_left_invariant_map
   rw [measure.haar_measure_unique (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)) K,
     measure.map_apply meas_π, measure.restrict_apply₀' 𝓕meas, inter_comm]
@@ -154,8 +154,8 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
 @[to_additive MeasurePreservingQuotientAddGroup.mk'
       "Given a normal subgroup `Γ` of an additive\n  topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume\n  fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate\n  multiples of Haar measure on `G` and `G ⧸ Γ`."]
-theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
+theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ] [MeasureTheory.Measure.HaarMeasure μ]
+    [μ.MulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
     (h : μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) = c) :
     MeasurePreserving (QuotientGroup.mk' Γ) (μ.restrict 𝓕)
       (c • MeasureTheory.Measure.haarMeasure K) :=
Diff
@@ -37,7 +37,7 @@ Note that a group `G` with Haar measure that is both left and right invariant is
 
 open Set MeasureTheory TopologicalSpace MeasureTheory.Measure
 
-open Pointwise NNReal
+open scoped Pointwise NNReal
 
 variable {G : Type _} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
   [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
Diff
@@ -77,10 +77,8 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
         measure.map_apply meas_π (measurableSet_preimage (measurable_const_smul g) hA),
         measure.restrict_apply₀' 𝓕meas, measure.restrict_apply₀' 𝓕meas]
       set π_preA := π ⁻¹' A
-      have : QuotientGroup.mk ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = Mul.mul g ⁻¹' π_preA :=
-        by
-        ext1
-        simp
+      have : QuotientGroup.mk ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = Mul.mul g ⁻¹' π_preA := by
+        ext1; simp
       rw [this]
       have : μ (Mul.mul g ⁻¹' π_preA ∩ 𝓕) = μ (π_preA ∩ Mul.mul g⁻¹ ⁻¹' 𝓕) :=
         by
@@ -93,8 +91,7 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
         rw [measure_preimage_mul]
       rw [this]
       have h𝓕_translate_fundom : is_fundamental_domain Γ.opposite (g • 𝓕) μ := h𝓕.smul_of_comm g
-      rw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]
-      rfl
+      rw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]; rfl
       rintro ⟨γ, γ_in_Γ⟩
       ext
       have : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ
@@ -141,9 +138,7 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   have meas_π : Measurable π := continuous_quotient_mk.measurable
   have 𝓕meas : null_measurable_set 𝓕 μ := h𝓕.null_measurable_set
   haveI : is_finite_measure (μ.restrict 𝓕) :=
-    ⟨by
-      rw [measure.restrict_apply₀' 𝓕meas, univ_inter]
-      exact h𝓕_finite⟩
+    ⟨by rw [measure.restrict_apply₀' 𝓕meas, univ_inter]; exact h𝓕_finite⟩
   -- the measure is left-invariant, so by the uniqueness of Haar measure it's enough to show that
   -- it has the stated size on the reference compact set `K`.
   haveI : (measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2022 Alex Kontorovich and Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
 
-! This file was ported from Lean 3 source module measure_theory.measure.haar_quotient
-! leanprover-community/mathlib commit 10079b92f69b50c7f9819d026e6fe12fdd7a08d5
+! This file was ported from Lean 3 source module measure_theory.measure.haar.quotient
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Measure.Haar
+import Mathbin.MeasureTheory.Measure.Haar.Basic
 import Mathbin.MeasureTheory.Group.FundamentalDomain
 import Mathbin.Algebra.Group.Opposite
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -365,12 +365,12 @@ lemma _root_.MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map
   intro s s_meas hs
   rw [map_apply meas_π s_meas] at hs ⊢
   rw [Measure.restrict_apply] at hs
-  apply h𝓕.measure_zero_of_invariant _ _ hs
-  · intro γ
-    ext g
-    rw [Set.mem_smul_set_iff_inv_smul_mem, mem_preimage, mem_preimage]
-    congr! 1
-    convert QuotientGroup.mk_mul_of_mem g (γ⁻¹).2 using 1
+  · apply h𝓕.measure_zero_of_invariant _ _ hs
+    · intro γ
+      ext g
+      rw [Set.mem_smul_set_iff_inv_smul_mem, mem_preimage, mem_preimage]
+      congr! 1
+      convert QuotientGroup.mk_mul_of_mem g (γ⁻¹).2 using 1
   exact MeasurableSet.preimage s_meas meas_π
 
 attribute [-instance] Quotient.instMeasurableSpace
chore: tidy various files (#12213)
Diff
@@ -135,12 +135,11 @@ lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotien
     [hasFun : HasFundamentalDomain Γ.op G ν] [QuotientMeasureEqMeasurePreimage ν μ] :
     μ.IsMulLeftInvariant where
   map_mul_left_eq_self x := by
-    apply Measure.ext
-    intro A hA
+    ext A hA
     obtain ⟨x₁, h⟩ := @Quotient.exists_rep _ (QuotientGroup.leftRel Γ) x
     convert measure_preimage_smul x₁ μ A using 1
     · rw [← h, Measure.map_apply (measurable_const_mul _) hA]
-      rfl
+      simp [← MulAction.Quotient.coe_smul_out', ← Quotient.mk''_eq_mk]
     exact smulInvariantMeasure_quotient ν
 
 variable [IsMulLeftInvariant μ] [SigmaFinite μ]
@@ -247,6 +246,7 @@ theorem MeasureTheory.QuotientMeasureEqMeasurePreimage.haarMeasure_quotient [Loc
       ← fund_dom_s.measure_zero_of_invariant _ (fun g ↦ QuotientGroup.sound _ _ g) h]
     apply measure_mono
     refine interior_subset.trans ?_
+    rw [QuotientGroup.coe_mk']
     show (K : Set G) ⊆ π ⁻¹' (π '' K)
     exact subset_preimage_image π K
   · show ν (π ⁻¹' (π '' K) ∩ s) ≠ ⊤
doc: convert many comments into doc comments (#11940)

All of these changes appear to be oversights to me.

Diff
@@ -255,7 +255,7 @@ theorem MeasureTheory.QuotientMeasureEqMeasurePreimage.haarMeasure_quotient [Loc
     apply measure_mono
     exact inter_subset_right _ s
 
-/- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
+/-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
   properly normalized, satisfies `QuotientMeasureEqMeasurePreimage`. -/
 @[to_additive "Given a normal
@@ -284,7 +284,7 @@ theorem IsFundamentalDomain.QuotientMeasureEqMeasurePreimage_HaarMeasure {𝓕 :
 
 variable (K : PositiveCompacts (G ⧸ Γ))
 
-/- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
+/-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
   properly normalized, satisfies `QuotientMeasureEqMeasurePreimage`. -/
 @[to_additive "Given a
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -127,7 +127,7 @@ variable (ν : Measure G) [IsMulLeftInvariant ν] [IsMulRightInvariant ν]
 
 /-- If `μ` on `G ⧸ Γ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and
   right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a left-invariant
-  measure.-/
+  measure. -/
 @[to_additive "If `μ` on `G ⧸ Γ` satisfies `AddQuotientMeasureEqMeasurePreimage` relative to a both
   left- and right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a
   left-invariant measure."]
refactor: typeclasses for measures on quotient spaces and groups (#7506)

We introduce a new typeclass QuotientMeasureEqMeasurePreimage which expresses a relationship between a measure on a space and a measure on its quotient under a discrete group action. Namely, the volume of a measurable set in the quotient is equal to the volume of its preimage, intersected with any fundamental domain.

Our main application is in the context of a discrete normal subgroup of a topological group acting on the group itself, so as to compare Haar measures on a group and its quotient. Before this typeclass, you could have Haar measure upstairs and downstairs and you would have ugly scaling factors if you wanted to compare the two. This typeclass more accurately reflects what is needed in order to have a clear relationship between the upstairs and downstairs measures.

Two big theorems (proved under various technical assumptions, like finiteness of the volume - which shouldn't be necessary):

(1) if you're Haar upstairs and satisfy QuotientMeasureEqMeasurePreimage, then you're Haar downstairs.

And conversely (2): if you're Haar upstairs and downstairs, and scale correctly on a single measurable set, then you satisfy QuotientMeasureEqMeasurePreimage.

Contains the forward-port of https://github.com/leanprover-community/mathlib/pull/18863

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>

Diff
@@ -7,6 +7,7 @@ import Mathlib.MeasureTheory.Integral.DominatedConvergence
 import Mathlib.MeasureTheory.Measure.Haar.Basic
 import Mathlib.MeasureTheory.Group.FundamentalDomain
 import Mathlib.Algebra.Group.Opposite
+import Mathlib.MeasureTheory.Constructions.Polish
 
 #align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
 
@@ -14,150 +15,317 @@ import Mathlib.Algebra.Group.Opposite
 # Haar quotient measure
 
 In this file, we consider properties of fundamental domains and measures for the action of a
-subgroup of a group `G` on `G` itself.
+subgroup `Γ` of a topological group `G` on `G` itself. Let `μ` be a measure on `G ⧸ Γ`.
 
 ## Main results
 
-* `MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map`: given a subgroup `Γ` of a
-  topological group `G`, the pushforward to the coset space `G ⧸ Γ` of the restriction of a both
-  left- and right-invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure
-  on `G ⧸ Γ`.
+* `MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient`: If `μ` satisfies
+  `QuotientMeasureEqMeasurePreimage` relative to a both left- and right-invariant measure on `G`,
+  then it is a `G` invariant measure on `G ⧸ Γ`.
 
-* `MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map`: given a normal subgroup `Γ` of
-  a topological group `G`, the pushforward to the quotient group `G ⧸ Γ` of the restriction of
-  a both left- and right-invariant measure on `G` to a fundamental domain `𝓕` is a left-invariant
-  measure on `G ⧸ Γ`.
+The next two results assume that `Γ` is normal, and that `G` is equipped with a left- and
+right-invariant measure.
+
+* `MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient`: If `μ` satisfies
+  `QuotientMeasureEqMeasurePreimage`, then `μ` is a left-invariant measure.
+
+* `MeasureTheory.leftInvariantIsQuotientMeasureEqMeasurePreimage`: If `μ` is left-invariant, and
+  the action of `Γ` on `G` has finite covolume, and `μ` satisfies the right scaling condition, then
+  it satisfies `QuotientMeasureEqMeasurePreimage`. This is a converse to
+  `MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient`.
+
+The last result assumes that `G` is locally compact, that `Γ` is countable and normal, that its
+action on `G` has a fundamental domain, and that `μ` is a finite measure. We also assume that `G`
+is equipped with a sigma-finite Haar measure.
+
+* `MeasureTheory.QuotientMeasureEqMeasurePreimage.haarMeasure_quotient`: If `μ` satisfies
+  `QuotientMeasureEqMeasurePreimage`, then it is itself Haar. This is a variant of
+  `MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient`.
 
 Note that a group `G` with Haar measure that is both left and right invariant is called
 **unimodular**.
 -/
 
-
 open Set MeasureTheory TopologicalSpace MeasureTheory.Measure
 
 open scoped Pointwise NNReal ENNReal
 
-variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
-  [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
+section
 
-/-- Measurability of the action of the topological group `G` on the left-coset space `G/Γ`. -/
+/-- Measurability of the action of the topological group `G` on the left-coset space `G / Γ`. -/
 @[to_additive "Measurability of the action of the additive topological group `G` on the left-coset
-  space `G/Γ`."]
-instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)] :
+  space `G / Γ`."]
+instance QuotientGroup.measurableSMul {G : Type*} [Group G] {Γ : Subgroup G} [MeasurableSpace G]
+    [TopologicalSpace G] [TopologicalGroup G] [BorelSpace G] [BorelSpace (G ⧸ Γ)] :
     MeasurableSMul G (G ⧸ Γ) where
   measurable_const_smul g := (continuous_const_smul g).measurable
   measurable_smul_const x := (QuotientGroup.continuous_smul₁ x).measurable
 #align quotient_group.has_measurable_smul QuotientGroup.measurableSMul
 #align quotient_add_group.has_measurable_vadd QuotientAddGroup.measurableVAdd
 
-variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.op 𝓕 μ)
-variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
+end
 
-/-- The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and right-
-  invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure on `G ⧸ Γ`. -/
-@[to_additive "The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and
-  right-invariant measure on an additive topological group `G` to a fundamental domain `𝓕` is a
-  `G`-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeftInvariant]
-    [μ.IsMulRightInvariant] :
-    SMulInvariantMeasure G (G ⧸ Γ) (Measure.map QuotientGroup.mk (μ.restrict 𝓕)) where
+section smulInvariantMeasure
+
+variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
+  [BorelSpace G] [PolishSpace G] (ν : Measure G) {Γ : Subgroup G} [Countable Γ]
+  [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] {μ : Measure (G ⧸ Γ)}
+  [QuotientMeasureEqMeasurePreimage ν μ]
+
+local notation "π" => @QuotientGroup.mk G _ Γ
+
+/-- If `μ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and right-
+  invariant measure `ν` on `G`, then it is a `G` invariant measure on `G ⧸ Γ`. -/
+@[to_additive]
+lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient
+    [IsMulLeftInvariant ν] [hasFun : HasFundamentalDomain Γ.op G ν] :
+    SMulInvariantMeasure G (G ⧸ Γ) μ where
   measure_preimage_smul g A hA := by
-    let π : G → G ⧸ Γ := QuotientGroup.mk
     have meas_π : Measurable π := continuous_quotient_mk'.measurable
-    have 𝓕meas : NullMeasurableSet 𝓕 μ := h𝓕.nullMeasurableSet
-    have meas_πA : MeasurableSet (π ⁻¹' A) := measurableSet_preimage meas_π hA
-    rw [Measure.map_apply meas_π hA,
-      Measure.map_apply meas_π (measurableSet_preimage (measurable_const_smul g) hA),
-      Measure.restrict_apply₀' 𝓕meas, Measure.restrict_apply₀' 𝓕meas]
+    obtain ⟨𝓕, h𝓕⟩ := hasFun.ExistsIsFundamentalDomain
+    have h𝓕_translate_fundom : IsFundamentalDomain Γ.op (g • 𝓕) ν :=
+      h𝓕.smul_of_comm g
+    rw [h𝓕.projection_respects_measure_apply (μ := μ)
+      (meas_π (measurableSet_preimage (measurable_const_smul g) hA)),
+      h𝓕_translate_fundom.projection_respects_measure_apply (μ := μ) hA]
+    change ν ((π ⁻¹' _) ∩ _) = ν ((π ⁻¹' _) ∩ _)
     set π_preA := π ⁻¹' A
-    have : π ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = (g * ·) ⁻¹' π_preA := by
-      ext1; simp [π_preA, π]
+    have : π ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = (g * ·) ⁻¹' π_preA := by ext1; simp [π_preA]
     rw [this]
-    have : μ ((g * ·) ⁻¹' π_preA ∩ 𝓕) = μ (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕) := by
-      trans μ ((g * ·) ⁻¹' (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕))
+    have : ν ((g * ·) ⁻¹' π_preA ∩ 𝓕) = ν (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕) := by
+      trans ν ((g * ·) ⁻¹' (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕))
       · rw [preimage_inter]
         congr 2
         simp [Set.preimage]
       rw [measure_preimage_mul]
-    rw [this]
-    have h𝓕_translate_fundom : IsFundamentalDomain Γ.op (g • 𝓕) μ :=
-      h𝓕.smul_of_comm g
-    rw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]; rfl
-    rintro ⟨γ, γ_in_Γ⟩
-    ext x
-    have : π (x * MulOpposite.unop γ) = π x := by simpa [π, QuotientGroup.eq'] using γ_in_Γ
-    simp only [π_preA, (· • ·), ← this, mem_preimage]
-    rfl
-#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
-#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vaddInvariantMeasure_map
-
-/-- Assuming `Γ` is a normal subgroup of a topological group `G`, the pushforward to the quotient
-  group `G ⧸ Γ` of the restriction of a both left- and right-invariant measure on `G` to a
-  fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`. -/
-@[to_additive "Assuming `Γ` is a normal subgroup of an additive topological group `G`, the
-  pushforward to the quotient group `G ⧸ Γ` of the restriction of a both left- and right-invariant
-  measure on `G` to a fundamental domain `𝓕` is a left-invariant measure on `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Normal Γ]
-    [μ.IsMulLeftInvariant] [μ.IsMulRightInvariant] :
-    (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant where
+    rw [this, ← preimage_smul_inv]; rfl
+#align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient
+#align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.AddQuotientMeasureEqMeasurePreimage.vaddInvariantMeasure_quotient
+
+/-- Given a subgroup `Γ` of a topological group `G` with measure `ν`, and a measure 'μ' on the
+  quotient `G ⧸ Γ` satisfying `QuotientMeasureEqMeasurePreimage`, the restriction
+  of `ν` to a fundamental domain is measure-preserving with respect to `μ`. -/
+@[to_additive]
+theorem measurePreserving_quotientGroup_mk_of_QuotientMeasureEqMeasurePreimage
+    {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.op 𝓕 ν) (μ : Measure (G ⧸ Γ))
+    [QuotientMeasureEqMeasurePreimage ν μ] :
+    MeasurePreserving (@QuotientGroup.mk G _ Γ) (ν.restrict 𝓕) μ :=
+  h𝓕.measurePreserving_quotient_mk μ
+
+end smulInvariantMeasure
+
+section normal
+
+variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
+  [BorelSpace G] [PolishSpace G] {Γ : Subgroup G} [Countable Γ] [Subgroup.Normal Γ]
+  [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] {μ : Measure (G ⧸ Γ)}
+
+section mulInvariantMeasure
+
+variable (ν : Measure G) [IsMulLeftInvariant ν] [IsMulRightInvariant ν]
+  [SigmaFinite ν]
+
+/-- If `μ` on `G ⧸ Γ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and
+  right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a left-invariant
+  measure.-/
+@[to_additive "If `μ` on `G ⧸ Γ` satisfies `AddQuotientMeasureEqMeasurePreimage` relative to a both
+  left- and right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a
+  left-invariant measure."]
+lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient
+    [hasFun : HasFundamentalDomain Γ.op G ν] [QuotientMeasureEqMeasurePreimage ν μ] :
+    μ.IsMulLeftInvariant where
   map_mul_left_eq_self x := by
     apply Measure.ext
     intro A hA
     obtain ⟨x₁, h⟩ := @Quotient.exists_rep _ (QuotientGroup.leftRel Γ) x
-    haveI := h𝓕.smulInvariantMeasure_map
-    convert measure_preimage_smul x₁ ((Measure.map QuotientGroup.mk) (μ.restrict 𝓕)) A using 1
-    rw [← h, Measure.map_apply]
-    · rfl
-    · exact measurable_const_mul _
-    · exact hA
-#align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
-#align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
-
-/-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
-  right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
-  group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
-@[to_additive "Given a normal subgroup `Γ` of an additive topological group `G` with Haar measure
-  `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward
-  to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on
-  `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient  [T2Space (G ⧸ Γ)]
-    [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
-    Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕) =
-      μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) • MeasureTheory.Measure.haarMeasure K := by
-  let π : G →* G ⧸ Γ := QuotientGroup.mk' Γ
-  have meas_π : Measurable π := continuous_quotient_mk'.measurable
-  have 𝓕meas : NullMeasurableSet 𝓕 μ := h𝓕.nullMeasurableSet
-  haveI := Fact.mk h𝓕_finite
-  -- the measure is left-invariant, so by the uniqueness of Haar measure it's enough to show that
-  -- it has the stated size on the reference compact set `K`.
-  haveI : (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant :=
-    h𝓕.isMulLeftInvariant_map
-  rw [Measure.haarMeasure_unique (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)) K,
-    Measure.map_apply meas_π, Measure.restrict_apply₀' 𝓕meas, inter_comm]
-  exact K.isCompact.measurableSet
-#align measure_theory.is_fundamental_domain.map_restrict_quotient MeasureTheory.IsFundamentalDomain.map_restrict_quotient
-#align measure_theory.is_add_fundamental_domain.map_restrict_quotient MeasureTheory.IsAddFundamentalDomain.map_restrict_quotient
-
-/-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
-  right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is
-  measure-preserving between appropriate multiples of Haar measure on `G` and `G ⧸ Γ`. -/
-@[to_additive MeasurePreservingQuotientAddGroup.mk' "Given a normal subgroup `Γ` of an additive
-  topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume
-  fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate
-  multiples of Haar measure on `G` and `G ⧸ Γ`."]
-theorem MeasurePreservingQuotientGroup.mk' [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)]
-    (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ] [μ.IsHaarMeasure]
-    [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
-    (h : μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) = c) :
-    MeasurePreserving (QuotientGroup.mk' Γ) (μ.restrict 𝓕)
-      (c • MeasureTheory.Measure.haarMeasure K) where
-  measurable := continuous_quotient_mk'.measurable
-  map_eq := by rw [h𝓕.map_restrict_quotient K h𝓕_finite, h]; rfl
-#align measure_preserving_quotient_group.mk' MeasurePreservingQuotientGroup.mk'
-#align measure_preserving_quotient_add_group.mk' MeasurePreservingQuotientAddGroup.mk'
+    convert measure_preimage_smul x₁ μ A using 1
+    · rw [← h, Measure.map_apply (measurable_const_mul _) hA]
+      rfl
+    exact smulInvariantMeasure_quotient ν
 
-section
+variable [IsMulLeftInvariant μ] [SigmaFinite μ]
+
+local notation "π" => @QuotientGroup.mk G _ Γ
+
+/-- Assume that a measure `μ` is `IsMulLeftInvariant`, that the action of `Γ` on `G` has a
+measurable fundamental domain `s` with positive finite volume, and that there is a single measurable
+set `V ⊆ G ⧸ Γ` along which the pullback of `μ` and `ν` agree (so the scaling is right). Then
+`μ` satisfies `QuotientMeasureEqMeasurePreimage`. The main tool of the proof is the uniqueness of
+left invariant measures, if normalized by a single positive finite-measured set. -/
+@[to_additive
+"Assume that a measure `μ` is `IsAddLeftInvariant`, that the action of `Γ` on `G` has a
+measurable fundamental domain `s` with positive finite volume, and that there is a single measurable
+set `V ⊆ G ⧸ Γ` along which the pullback of `μ` and `ν` agree (so the scaling is right). Then
+`μ` satisfies `AddQuotientMeasureEqMeasurePreimage`. The main tool of the proof is the uniqueness of
+left invariant measures, if normalized by a single positive finite-measured set."]
+theorem MeasureTheory.Measure.IsMulLeftInvariant.quotientMeasureEqMeasurePreimage_of_set {s : Set G}
+    (fund_dom_s : IsFundamentalDomain Γ.op s ν) {V : Set (G ⧸ Γ)}
+    (meas_V : MeasurableSet V) (neZeroV : μ V ≠ 0) (hV : μ V = ν (π ⁻¹' V ∩ s))
+    (neTopV : μ V ≠ ⊤) : QuotientMeasureEqMeasurePreimage ν μ := by
+  apply fund_dom_s.quotientMeasureEqMeasurePreimage
+  ext U _
+  have meas_π : Measurable (QuotientGroup.mk : G → G ⧸ Γ) := continuous_quotient_mk'.measurable
+  let μ' : Measure (G ⧸ Γ) := (ν.restrict s).map π
+  haveI has_fund : HasFundamentalDomain Γ.op G ν := ⟨⟨s, fund_dom_s⟩⟩
+  have i : QuotientMeasureEqMeasurePreimage ν μ' :=
+    fund_dom_s.quotientMeasureEqMeasurePreimage_quotientMeasure
+  have : μ'.IsMulLeftInvariant :=
+    MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient ν
+  suffices μ = μ' by
+    rw [this]
+    rfl
+  have : SigmaFinite μ' := i.sigmaFiniteQuotient
+  rw [measure_eq_div_smul μ' μ meas_V neZeroV neTopV, hV]
+  symm
+  suffices (μ' V / ν (QuotientGroup.mk ⁻¹' V ∩ s)) = 1 by rw [this, one_smul]
+  rw [Measure.map_apply meas_π meas_V, Measure.restrict_apply]
+  · convert ENNReal.div_self ..
+    · exact trans hV.symm neZeroV
+    · exact trans hV.symm neTopV
+  exact measurableSet_quotient.mp meas_V
+
+/-- If a measure `μ` is left-invariant and satisfies the right scaling condition, then it
+  satisfies `QuotientMeasureEqMeasurePreimage`. -/
+@[to_additive "If a measure `μ` is
+left-invariant and satisfies the right scaling condition, then it satisfies
+`AddQuotientMeasureEqMeasurePreimage`."]
+theorem MeasureTheory.leftInvariantIsQuotientMeasureEqMeasurePreimage [IsFiniteMeasure μ]
+    [hasFun : HasFundamentalDomain Γ.op G ν]
+    (h : covolume Γ.op G ν = μ univ) : QuotientMeasureEqMeasurePreimage ν μ := by
+  obtain ⟨s, fund_dom_s⟩ := hasFun.ExistsIsFundamentalDomain
+  have finiteCovol : μ univ < ⊤ := measure_lt_top μ univ
+  rw [fund_dom_s.covolume_eq_volume] at h
+  by_cases meas_s_ne_zero : ν s = 0
+  · convert fund_dom_s.quotientMeasureEqMeasurePreimage_of_zero meas_s_ne_zero
+    rw [← @measure_univ_eq_zero, ← h, meas_s_ne_zero]
+  apply IsMulLeftInvariant.quotientMeasureEqMeasurePreimage_of_set (fund_dom_s := fund_dom_s)
+    (meas_V := MeasurableSet.univ)
+  · rw [← h]
+    exact meas_s_ne_zero
+  · rw [← h]
+    simp
+  · rw [← h]
+    convert finiteCovol.ne
+
+end mulInvariantMeasure
+
+section haarMeasure
+
+variable (ν : Measure G) [SigmaFinite ν] [IsHaarMeasure ν] [IsMulRightInvariant ν]
+
+local notation "π" => @QuotientGroup.mk G _ Γ
+
+/-- If a measure `μ` on the quotient `G ⧸ Γ` of a group `G` by a discrete normal subgroup `Γ` having
+fundamental domain, satisfies `QuotientMeasureEqMeasurePreimage` relative to a standardized choice
+of Haar measure on `G`, and assuming `μ` is finite, then `μ` is itself Haar.
+TODO: Is it possible to drop the assumption that `μ` is finite? -/
+@[to_additive "If a measure `μ` on the quotient `G ⧸ Γ` of an additive group `G` by a discrete
+normal subgroup `Γ` having fundamental domain, satisfies `AddQuotientMeasureEqMeasurePreimage`
+relative to a standardized choice of Haar measure on `G`, and assuming `μ` is finite, then `μ` is
+itself Haar."]
+theorem MeasureTheory.QuotientMeasureEqMeasurePreimage.haarMeasure_quotient [LocallyCompactSpace G]
+    [QuotientMeasureEqMeasurePreimage ν μ] [i : HasFundamentalDomain Γ.op G ν]
+    [IsFiniteMeasure μ] : IsHaarMeasure μ := by
+  obtain ⟨K⟩ := PositiveCompacts.nonempty' (α := G)
+  let K' : PositiveCompacts (G ⧸ Γ) :=
+    K.map π continuous_coinduced_rng (QuotientGroup.isOpenMap_coe Γ)
+  haveI : IsMulLeftInvariant μ :=
+    MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient ν
+  rw [haarMeasure_unique μ K']
+  have finiteCovol : covolume Γ.op G ν ≠ ⊤ :=
+    ne_top_of_lt $ QuotientMeasureEqMeasurePreimage.covolume_ne_top μ (ν := ν)
+  obtain ⟨s, fund_dom_s⟩ := i
+  rw [fund_dom_s.covolume_eq_volume] at finiteCovol
+  rw [fund_dom_s.projection_respects_measure_apply μ K'.isCompact.measurableSet]
+  apply IsHaarMeasure.smul
+  · intro h
+    haveI i' : IsOpenPosMeasure (ν : Measure G) := inferInstance
+    apply IsOpenPosMeasure.open_pos (interior K) (μ := ν) (self := i')
+    · exact isOpen_interior
+    · exact K.interior_nonempty
+    rw [← le_zero_iff,
+      ← fund_dom_s.measure_zero_of_invariant _ (fun g ↦ QuotientGroup.sound _ _ g) h]
+    apply measure_mono
+    refine interior_subset.trans ?_
+    show (K : Set G) ⊆ π ⁻¹' (π '' K)
+    exact subset_preimage_image π K
+  · show ν (π ⁻¹' (π '' K) ∩ s) ≠ ⊤
+    apply ne_of_lt
+    refine lt_of_le_of_lt ?_ finiteCovol.lt_top
+    apply measure_mono
+    exact inter_subset_right _ s
+
+/- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
+  right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
+  properly normalized, satisfies `QuotientMeasureEqMeasurePreimage`. -/
+@[to_additive "Given a normal
+subgroup `Γ` of an additive topological group `G` with Haar measure `μ`, which is also
+right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
+properly normalized, satisfies `AddQuotientMeasureEqMeasurePreimage`."]
+theorem IsFundamentalDomain.QuotientMeasureEqMeasurePreimage_HaarMeasure {𝓕 : Set G}
+    (h𝓕 : IsFundamentalDomain Γ.op 𝓕 ν) [IsMulLeftInvariant μ] [SigmaFinite μ]
+    {V : Set (G ⧸ Γ)} (hV : (interior V).Nonempty) (meas_V : MeasurableSet V)
+    (hμK : μ V = ν ((π ⁻¹' V) ∩ 𝓕)) (neTopV : μ V ≠ ⊤) :
+    QuotientMeasureEqMeasurePreimage ν μ := by
+  apply IsMulLeftInvariant.quotientMeasureEqMeasurePreimage_of_set (fund_dom_s := h𝓕)
+    (meas_V := meas_V)
+  · rw [hμK]
+    intro c_eq_zero
+    apply IsOpenPosMeasure.open_pos (interior (π ⁻¹' V)) (μ := ν)
+    · simp
+    · apply Set.Nonempty.mono (preimage_interior_subset_interior_preimage continuous_coinduced_rng)
+      apply hV.preimage'
+      simp
+    · apply measure_mono_null (h := interior_subset)
+      apply h𝓕.measure_zero_of_invariant (ht := fun g ↦ QuotientGroup.sound _ _ g)
+      exact c_eq_zero
+  · exact hμK
+  · exact neTopV
+
+variable (K : PositiveCompacts (G ⧸ Γ))
+
+/- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
+  right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
+  properly normalized, satisfies `QuotientMeasureEqMeasurePreimage`. -/
+@[to_additive "Given a
+normal subgroup `Γ` of an additive topological group `G` with Haar measure `μ`, which is also
+right-invariant, and a finite volume fundamental domain `𝓕`, the quotient map to `G ⧸ Γ`,
+properly normalized, satisfies `AddQuotientMeasureEqMeasurePreimage`."]
+theorem IsFundamentalDomain.QuotientMeasureEqMeasurePreimage_smulHaarMeasure {𝓕 : Set G}
+    (h𝓕 : IsFundamentalDomain Γ.op 𝓕 ν) (h𝓕_finite : ν 𝓕 ≠ ⊤) :
+    QuotientMeasureEqMeasurePreimage ν
+      ((ν ((π ⁻¹' (K : Set (G ⧸ Γ))) ∩ 𝓕)) • haarMeasure K) := by
+  set c := ν ((π ⁻¹' (K : Set (G ⧸ Γ))) ∩ 𝓕)
+  have c_ne_top : c ≠ ∞ := by
+    contrapose! h𝓕_finite
+    have : c ≤ ν 𝓕 := measure_mono (Set.inter_subset_right _ _)
+    rw [h𝓕_finite] at this
+    exact top_unique this
+  set μ := c • haarMeasure K
+  have hμK : μ K = c := by simp [μ, haarMeasure_self]
+  haveI : SigmaFinite μ := by
+    clear_value c
+    lift c to NNReal using c_ne_top
+    exact SMul.sigmaFinite c
+  apply IsFundamentalDomain.QuotientMeasureEqMeasurePreimage_HaarMeasure (h𝓕 := h𝓕)
+    (meas_V := K.isCompact.measurableSet) (μ := μ)
+  · exact K.interior_nonempty
+  · exact hμK
+  · rw [hμK]
+    exact c_ne_top
+
+end haarMeasure
+
+end normal
+
+section UnfoldingTrick
+
+variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
+  [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
+
+variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.op 𝓕 μ)
+
+variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
 local notation "μ_𝓕" => Measure.map (@QuotientGroup.mk G _ Γ) (μ.restrict 𝓕)
 
@@ -259,7 +427,7 @@ lemma QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [Norme
     exact hg.mul F_ae_measurable
   apply QuotientGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
 
-end
+end UnfoldingTrick
 
 section
 
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -51,7 +51,6 @@ instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (
 #align quotient_add_group.has_measurable_vadd QuotientAddGroup.measurableVAdd
 
 variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.op 𝓕 μ)
-
 variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
 /-- The pushforward to the coset space `G ⧸ Γ` of the restriction of a both left- and right-
refactor: move material about the Dominated Convergence Theorem into one file (#11139)

Suggested by @loefflerd. Only code motion (and cosmetic adaptions, such as minimising import and open statements).

Pre-requisite for #11108 and (morally) #11110.

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2022 Alex Kontorovich and Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
 -/
+import Mathlib.MeasureTheory.Integral.DominatedConvergence
 import Mathlib.MeasureTheory.Measure.Haar.Basic
 import Mathlib.MeasureTheory.Group.FundamentalDomain
 import Mathlib.Algebra.Group.Opposite
chore: more backporting of simp changes from #10995 (#11001)

Co-authored-by: Patrick Massot <patrickmassot@free.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -71,7 +71,7 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
       Measure.restrict_apply₀' 𝓕meas, Measure.restrict_apply₀' 𝓕meas]
     set π_preA := π ⁻¹' A
     have : π ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = (g * ·) ⁻¹' π_preA := by
-      ext1; simp
+      ext1; simp [π_preA, π]
     rw [this]
     have : μ ((g * ·) ⁻¹' π_preA ∩ 𝓕) = μ (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕) := by
       trans μ ((g * ·) ⁻¹' (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕))
@@ -85,8 +85,8 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
     rw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]; rfl
     rintro ⟨γ, γ_in_Γ⟩
     ext x
-    have : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ
-    simp only [(· • ·), ← this, mem_preimage]
+    have : π (x * MulOpposite.unop γ) = π x := by simpa [π, QuotientGroup.eq'] using γ_in_Γ
+    simp only [π_preA, (· • ·), ← this, mem_preimage]
     rfl
 #align measure_theory.is_fundamental_domain.smul_invariant_measure_map MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map
 #align measure_theory.is_add_fundamental_domain.vadd_invariant_measure_map MeasureTheory.IsAddFundamentalDomain.vaddInvariantMeasure_map
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -246,17 +246,16 @@ lemma QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [Norme
   calc ∫ (x : G), g (π x) * (f x) ∂μ =
         ∫ (x : G ⧸ Γ), QuotientGroup.automorphize ((g ∘ π) * f) x ∂μ_𝓕 := ?_
     _ = ∫ (x : G ⧸ Γ), g x * (QuotientGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
-  have H₁ : Integrable ((g ∘ π) * f) μ
-  · have : AEStronglyMeasurable (fun (x : G) ↦ g (x : (G ⧸ Γ))) μ
-    · refine (hg.mono_ac  ?_).comp_measurable meas_π
-      exact h𝓕.absolutelyContinuous_map
+  have H₁ : Integrable ((g ∘ π) * f) μ := by
+    have : AEStronglyMeasurable (fun (x : G) ↦ g (x : (G ⧸ Γ))) μ :=
+      (hg.mono_ac h𝓕.absolutelyContinuous_map).comp_measurable meas_π
     refine Integrable.essSup_smul f_ℒ_1 this ?_
     have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
       (ENNReal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
     rw [← essSup_comp_quotientGroup_mk h𝓕 hg'.aemeasurable]
     exact g_ℒ_infinity
-  have H₂ : AEStronglyMeasurable (QuotientGroup.automorphize ((g ∘ π) * f)) μ_𝓕
-  · simp_rw [H₀]
+  have H₂ : AEStronglyMeasurable (QuotientGroup.automorphize ((g ∘ π) * f)) μ_𝓕 := by
+    simp_rw [H₀]
     exact hg.mul F_ae_measurable
   apply QuotientGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
 
@@ -292,17 +291,16 @@ lemma QuotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [No
   calc ∫ (x : G'), g (π x) * f x ∂μ' =
     ∫ (x : G' ⧸ Γ'), QuotientAddGroup.automorphize ((g ∘ π) * f) x ∂μ_𝓕 := ?_
     _ = ∫ (x : G' ⧸ Γ'), g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
-  have H₁ : Integrable ((g ∘ π) * f) μ'
-  · have : AEStronglyMeasurable (fun (x : G') ↦ g (x : (G' ⧸ Γ'))) μ'
-    · refine (hg.mono_ac ?_).comp_measurable meas_π
-      exact h𝓕.absolutelyContinuous_map
+  have H₁ : Integrable ((g ∘ π) * f) μ' := by
+    have : AEStronglyMeasurable (fun (x : G') ↦ g (x : (G' ⧸ Γ'))) μ' :=
+      (hg.mono_ac h𝓕.absolutelyContinuous_map).comp_measurable meas_π
     refine Integrable.essSup_smul f_ℒ_1 this ?_
     have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
       (ENNReal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
     rw [← essSup_comp_quotientAddGroup_mk h𝓕 hg'.aemeasurable]
     exact g_ℒ_infinity
-  have H₂ : AEStronglyMeasurable (QuotientAddGroup.automorphize ((g ∘ π) * f)) μ_𝓕
-  · simp_rw [H₀]
+  have H₂ : AEStronglyMeasurable (QuotientAddGroup.automorphize ((g ∘ π) * f)) μ_𝓕 := by
+    simp_rw [H₀]
     exact hg.mul F_ae_measurable
   apply QuotientAddGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
 
chore(StronglyMeasurable): Rename monotonicity along absolutely continuous measures (#10564)

Rename AEStronglyMeasurable.mono' to AEStronglyMeasurable.mono_ac.

Partly forward-port https://github.com/leanprover-community/mathlib/pull/18863

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -248,7 +248,7 @@ lemma QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [Norme
     _ = ∫ (x : G ⧸ Γ), g x * (QuotientGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
   have H₁ : Integrable ((g ∘ π) * f) μ
   · have : AEStronglyMeasurable (fun (x : G) ↦ g (x : (G ⧸ Γ))) μ
-    · refine (AEStronglyMeasurable.mono' hg ?_).comp_measurable meas_π
+    · refine (hg.mono_ac  ?_).comp_measurable meas_π
       exact h𝓕.absolutelyContinuous_map
     refine Integrable.essSup_smul f_ℒ_1 this ?_
     have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
@@ -294,7 +294,7 @@ lemma QuotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [No
     _ = ∫ (x : G' ⧸ Γ'), g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
   have H₁ : Integrable ((g ∘ π) * f) μ'
   · have : AEStronglyMeasurable (fun (x : G') ↦ g (x : (G' ⧸ Γ'))) μ'
-    · refine (AEStronglyMeasurable.mono' hg ?_).comp_measurable meas_π
+    · refine (hg.mono_ac ?_).comp_measurable meas_π
       exact h𝓕.absolutelyContinuous_map
     refine Integrable.essSup_smul f_ℒ_1 this ?_
     have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
chore: remove trailing space in backticks (#7617)

This will improve spaces in the mathlib4 docs.

Diff
@@ -17,12 +17,12 @@ subgroup of a group `G` on `G` itself.
 
 ## Main results
 
-* `MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map `: given a subgroup `Γ` of a
+* `MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map`: given a subgroup `Γ` of a
   topological group `G`, the pushforward to the coset space `G ⧸ Γ` of the restriction of a both
   left- and right-invariant measure on `G` to a fundamental domain `𝓕` is a `G`-invariant measure
   on `G ⧸ Γ`.
 
-* `MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map `: given a normal subgroup `Γ` of
+* `MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map`: given a normal subgroup `Γ` of
   a topological group `G`, the pushforward to the quotient group `G ⧸ Γ` of the restriction of
   a both left- and right-invariant measure on `G` to a fundamental domain `𝓕` is a left-invariant
   measure on `G ⧸ Γ`.
feat(GroupTheory/Submonoid): add opposite submonoids (#7415)

We already have API for the multiplicative opposite of subgroups.

This tidies the API for subgroups by introducing separate .op and .unop definitions (as dot notation on .opposite worked in Lean 3 but not Lean 4), and adds the same API for submonoids.

Diff
@@ -49,7 +49,7 @@ instance QuotientGroup.measurableSMul [MeasurableSpace (G ⧸ Γ)] [BorelSpace (
 #align quotient_group.has_measurable_smul QuotientGroup.measurableSMul
 #align quotient_add_group.has_measurable_vadd QuotientAddGroup.measurableVAdd
 
-variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain (Subgroup.opposite Γ) 𝓕 μ)
+variable {𝓕 : Set G} (h𝓕 : IsFundamentalDomain Γ.op 𝓕 μ)
 
 variable [Countable Γ] [MeasurableSpace (G ⧸ Γ)] [BorelSpace (G ⧸ Γ)]
 
@@ -80,7 +80,7 @@ theorem MeasureTheory.IsFundamentalDomain.smulInvariantMeasure_map [μ.IsMulLeft
         simp [Set.preimage]
       rw [measure_preimage_mul]
     rw [this]
-    have h𝓕_translate_fundom : IsFundamentalDomain (Subgroup.opposite Γ) (g • 𝓕) μ :=
+    have h𝓕_translate_fundom : IsFundamentalDomain Γ.op (g • 𝓕) μ :=
       h𝓕.smul_of_comm g
     rw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]; rfl
     rintro ⟨γ, γ_in_Γ⟩
@@ -217,9 +217,9 @@ lemma QuotientGroup.integral_eq_integral_automorphize {E : Type*} [NormedAddComm
     [NormedSpace ℝ E] [μ.IsMulRightInvariant] {f : G → E}
     (hf₁ : Integrable f μ) (hf₂ : AEStronglyMeasurable (automorphize f) μ_𝓕) :
     ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 := by
-  calc ∫ x : G, f x ∂μ = ∑' γ : (Subgroup.opposite Γ), ∫ x in 𝓕, f (γ • x) ∂μ :=
+  calc ∫ x : G, f x ∂μ = ∑' γ : Γ.op, ∫ x in 𝓕, f (γ • x) ∂μ :=
     h𝓕.integral_eq_tsum'' f hf₁
-    _ = ∫ x in 𝓕, ∑' γ : (Subgroup.opposite Γ), f (γ • x) ∂μ := ?_
+    _ = ∫ x in 𝓕, ∑' γ : Γ.op, f (γ • x) ∂μ := ?_
     _ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
       (integral_map continuous_quotient_mk'.aemeasurable hf₂).symm
   rw [integral_tsum]
@@ -282,7 +282,7 @@ lemma QuotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [No
     (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
     (g_ℒ_infinity : essSup (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 ≠ ∞)
     (F_ae_measurable : AEStronglyMeasurable (QuotientAddGroup.automorphize f) μ_𝓕)
-    (h𝓕 : IsAddFundamentalDomain (AddSubgroup.opposite Γ') 𝓕' μ') :
+    (h𝓕 : IsAddFundamentalDomain Γ'.op 𝓕' μ') :
     ∫ x : G', g (x : G' ⧸ Γ') * (f x) ∂μ'
       = ∫ x : G' ⧸ Γ', g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕 := by
   let π : G' → G' ⧸ Γ' := QuotientAddGroup.mk
feat: the Unfolding Trick (#6223)

This PR is a forward port of mathlib3 PR 3#18863

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -7,7 +7,7 @@ import Mathlib.MeasureTheory.Measure.Haar.Basic
 import Mathlib.MeasureTheory.Group.FundamentalDomain
 import Mathlib.Algebra.Group.Opposite
 
-#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
 
 /-!
 # Haar quotient measure
@@ -34,7 +34,7 @@ Note that a group `G` with Haar measure that is both left and right invariant is
 
 open Set MeasureTheory TopologicalSpace MeasureTheory.Measure
 
-open scoped Pointwise NNReal
+open scoped Pointwise NNReal ENNReal
 
 variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
   [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
@@ -113,8 +113,6 @@ theorem MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map [Subgroup.Norma
 #align measure_theory.is_fundamental_domain.is_mul_left_invariant_map MeasureTheory.IsFundamentalDomain.isMulLeftInvariant_map
 #align measure_theory.is_add_fundamental_domain.is_add_left_invariant_map MeasureTheory.IsAddFundamentalDomain.isAddLeftInvariant_map
 
-variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ))
-
 /-- Given a normal subgroup `Γ` of a topological group `G` with Haar measure `μ`, which is also
   right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward to the quotient
   group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on `G ⧸ Γ`. -/
@@ -122,7 +120,8 @@ variable [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)] (K : Positive
   `μ`, which is also right-invariant, and a finite volume fundamental domain `𝓕`, the pushforward
   to the quotient group `G ⧸ Γ` of the restriction of `μ` to `𝓕` is a multiple of Haar measure on
   `G ⧸ Γ`."]
-theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal Γ]
+theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient  [T2Space (G ⧸ Γ)]
+    [SecondCountableTopology (G ⧸ Γ)] (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ]
     [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) :
     Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕) =
       μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) • MeasureTheory.Measure.haarMeasure K := by
@@ -147,8 +146,9 @@ theorem MeasureTheory.IsFundamentalDomain.map_restrict_quotient [Subgroup.Normal
   topological group `G` with Haar measure `μ`, which is also right-invariant, and a finite volume
   fundamental domain `𝓕`, the quotient map to `G ⧸ Γ` is measure-preserving between appropriate
   multiples of Haar measure on `G` and `G ⧸ Γ`."]
-theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
-    [MeasureTheory.Measure.IsHaarMeasure μ] [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
+theorem MeasurePreservingQuotientGroup.mk' [T2Space (G ⧸ Γ)] [SecondCountableTopology (G ⧸ Γ)]
+    (K : PositiveCompacts (G ⧸ Γ)) [Subgroup.Normal Γ] [μ.IsHaarMeasure]
+    [μ.IsMulRightInvariant] (h𝓕_finite : μ 𝓕 < ⊤) (c : ℝ≥0)
     (h : μ (𝓕 ∩ QuotientGroup.mk' Γ ⁻¹' K) = c) :
     MeasurePreserving (QuotientGroup.mk' Γ) (μ.restrict 𝓕)
       (c • MeasureTheory.Measure.haarMeasure K) where
@@ -156,3 +156,157 @@ theorem MeasurePreservingQuotientGroup.mk' [Subgroup.Normal Γ]
   map_eq := by rw [h𝓕.map_restrict_quotient K h𝓕_finite, h]; rfl
 #align measure_preserving_quotient_group.mk' MeasurePreservingQuotientGroup.mk'
 #align measure_preserving_quotient_add_group.mk' MeasurePreservingQuotientAddGroup.mk'
+
+section
+
+local notation "μ_𝓕" => Measure.map (@QuotientGroup.mk G _ Γ) (μ.restrict 𝓕)
+
+/-- The `essSup` of a function `g` on the quotient space `G ⧸ Γ` with respect to the pushforward
+  of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental domain `𝓕`, is the
+  same as the `essSup` of `g`'s lift to the universal cover `G` with respect to `μ`. -/
+@[to_additive "The `essSup` of a function `g` on the additive quotient space `G ⧸ Γ` with respect
+  to the pushforward of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental
+  domain `𝓕`, is the same as the `essSup` of `g`'s lift to the universal cover `G` with respect
+  to `μ`."]
+lemma essSup_comp_quotientGroup_mk [μ.IsMulRightInvariant] {g : G ⧸ Γ → ℝ≥0∞}
+    (g_ae_measurable : AEMeasurable g μ_𝓕) : essSup g μ_𝓕 = essSup (fun (x : G) ↦ g x) μ := by
+  have hπ : Measurable (QuotientGroup.mk : G → G ⧸ Γ) := continuous_quotient_mk'.measurable
+  rw [essSup_map_measure g_ae_measurable hπ.aemeasurable]
+  refine h𝓕.essSup_measure_restrict ?_
+  intro ⟨γ, hγ⟩ x
+  dsimp
+  congr 1
+  exact QuotientGroup.mk_mul_of_mem x hγ
+
+/-- Given a quotient space `G ⧸ Γ` where `Γ` is `Countable`, and the restriction,
+  `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
+  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
+  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
+  will take the value `∞` on any open set in the quotient! -/
+@[to_additive "Given an additive quotient space `G ⧸ Γ` where `Γ` is `Countable`, and the
+  restriction, `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
+  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
+  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
+  will take the value `∞` on any open set in the quotient!"]
+lemma _root_.MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map
+    [μ.IsMulRightInvariant] :
+    map (QuotientGroup.mk : G → G ⧸ Γ) μ ≪ map (QuotientGroup.mk : G → G ⧸ Γ) (μ.restrict 𝓕) := by
+  set π : G → G ⧸ Γ := QuotientGroup.mk
+  have meas_π : Measurable π := continuous_quotient_mk'.measurable
+  apply AbsolutelyContinuous.mk
+  intro s s_meas hs
+  rw [map_apply meas_π s_meas] at hs ⊢
+  rw [Measure.restrict_apply] at hs
+  apply h𝓕.measure_zero_of_invariant _ _ hs
+  · intro γ
+    ext g
+    rw [Set.mem_smul_set_iff_inv_smul_mem, mem_preimage, mem_preimage]
+    congr! 1
+    convert QuotientGroup.mk_mul_of_mem g (γ⁻¹).2 using 1
+  exact MeasurableSet.preimage s_meas meas_π
+
+attribute [-instance] Quotient.instMeasurableSpace
+
+/-- This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the
+  integral of a function `f` on `G` with respect to a right-invariant measure `μ` is equal to the
+  integral over the quotient `G ⧸ Γ` of the automorphization of `f`. -/
+@[to_additive "This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of an
+  additive  group `G`, the integral of a function `f` on `G` with respect to a right-invariant
+  measure `μ` is equal to the integral over the quotient `G ⧸ Γ` of the automorphization of `f`."]
+lemma QuotientGroup.integral_eq_integral_automorphize {E : Type*} [NormedAddCommGroup E]
+    [NormedSpace ℝ E] [μ.IsMulRightInvariant] {f : G → E}
+    (hf₁ : Integrable f μ) (hf₂ : AEStronglyMeasurable (automorphize f) μ_𝓕) :
+    ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 := by
+  calc ∫ x : G, f x ∂μ = ∑' γ : (Subgroup.opposite Γ), ∫ x in 𝓕, f (γ • x) ∂μ :=
+    h𝓕.integral_eq_tsum'' f hf₁
+    _ = ∫ x in 𝓕, ∑' γ : (Subgroup.opposite Γ), f (γ • x) ∂μ := ?_
+    _ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕 :=
+      (integral_map continuous_quotient_mk'.aemeasurable hf₂).symm
+  rw [integral_tsum]
+  · exact fun i ↦ (hf₁.1.comp_quasiMeasurePreserving
+      (measurePreserving_smul i μ).quasiMeasurePreserving).restrict
+  · rw [← h𝓕.lintegral_eq_tsum'' (fun x ↦ ‖f x‖₊)]
+    exact ne_of_lt hf₁.2
+
+/-- This is the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the integral of a
+  function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
+  to a right-invariant measure `μ` on `G`, is equal to the integral over the quotient of the
+  automorphization of `f` times `g`. -/
+lemma QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [NormedField K]
+    [NormedSpace ℝ K] [μ.IsMulRightInvariant] {f : G → K}
+    (f_ℒ_1 : Integrable f μ) {g : G ⧸ Γ → K} (hg : AEStronglyMeasurable g μ_𝓕)
+    (g_ℒ_infinity : essSup (fun x ↦ ↑‖g x‖₊) μ_𝓕 ≠ ∞)
+    (F_ae_measurable : AEStronglyMeasurable (QuotientGroup.automorphize f) μ_𝓕) :
+    ∫ x : G, g (x : G ⧸ Γ) * (f x) ∂μ
+      = ∫ x : G ⧸ Γ, g x * (QuotientGroup.automorphize f x) ∂μ_𝓕 := by
+  let π : G → G ⧸ Γ := QuotientGroup.mk
+  have meas_π : Measurable π := continuous_quotient_mk'.measurable
+  have H₀ : QuotientGroup.automorphize ((g ∘ π) * f) = g * (QuotientGroup.automorphize f) := by
+    exact QuotientGroup.automorphize_smul_left f g
+  calc ∫ (x : G), g (π x) * (f x) ∂μ =
+        ∫ (x : G ⧸ Γ), QuotientGroup.automorphize ((g ∘ π) * f) x ∂μ_𝓕 := ?_
+    _ = ∫ (x : G ⧸ Γ), g x * (QuotientGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
+  have H₁ : Integrable ((g ∘ π) * f) μ
+  · have : AEStronglyMeasurable (fun (x : G) ↦ g (x : (G ⧸ Γ))) μ
+    · refine (AEStronglyMeasurable.mono' hg ?_).comp_measurable meas_π
+      exact h𝓕.absolutelyContinuous_map
+    refine Integrable.essSup_smul f_ℒ_1 this ?_
+    have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
+      (ENNReal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
+    rw [← essSup_comp_quotientGroup_mk h𝓕 hg'.aemeasurable]
+    exact g_ℒ_infinity
+  have H₂ : AEStronglyMeasurable (QuotientGroup.automorphize ((g ∘ π) * f)) μ_𝓕
+  · simp_rw [H₀]
+    exact hg.mul F_ae_measurable
+  apply QuotientGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
+
+end
+
+section
+
+variable {G' : Type*} [AddGroup G'] [MeasurableSpace G'] [TopologicalSpace G']
+  [TopologicalAddGroup G'] [BorelSpace G']
+  {μ' : Measure G'}
+  {Γ' : AddSubgroup G'}
+  [Countable Γ'] [MeasurableSpace (G' ⧸ Γ')] [BorelSpace (G' ⧸ Γ')]
+  {𝓕' : Set G'}
+
+local notation "μ_𝓕" => Measure.map (@QuotientAddGroup.mk G' _ Γ') (μ'.restrict 𝓕')
+
+/-- This is the **Unfolding Trick**: Given an additive subgroup `Γ'` of an additive group `G'`, the
+  integral of a function `f` on `G'` times the lift to `G'` of a function `g` on the quotient
+  `G' ⧸ Γ'` with respect to a right-invariant measure `μ` on `G'`, is equal to the integral over
+  the quotient of the automorphization of `f` times `g`. -/
+lemma QuotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [NormedField K]
+    [NormedSpace ℝ K] [μ'.IsAddRightInvariant] {f : G' → K}
+    (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
+    (g_ℒ_infinity : essSup (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 ≠ ∞)
+    (F_ae_measurable : AEStronglyMeasurable (QuotientAddGroup.automorphize f) μ_𝓕)
+    (h𝓕 : IsAddFundamentalDomain (AddSubgroup.opposite Γ') 𝓕' μ') :
+    ∫ x : G', g (x : G' ⧸ Γ') * (f x) ∂μ'
+      = ∫ x : G' ⧸ Γ', g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕 := by
+  let π : G' → G' ⧸ Γ' := QuotientAddGroup.mk
+  have meas_π : Measurable π := continuous_quotient_mk'.measurable
+  have H₀ : QuotientAddGroup.automorphize ((g ∘ π) * f) = g * (QuotientAddGroup.automorphize f) :=
+    by exact QuotientAddGroup.automorphize_smul_left f g
+  calc ∫ (x : G'), g (π x) * f x ∂μ' =
+    ∫ (x : G' ⧸ Γ'), QuotientAddGroup.automorphize ((g ∘ π) * f) x ∂μ_𝓕 := ?_
+    _ = ∫ (x : G' ⧸ Γ'), g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕 := by simp [H₀]
+  have H₁ : Integrable ((g ∘ π) * f) μ'
+  · have : AEStronglyMeasurable (fun (x : G') ↦ g (x : (G' ⧸ Γ'))) μ'
+    · refine (AEStronglyMeasurable.mono' hg ?_).comp_measurable meas_π
+      exact h𝓕.absolutelyContinuous_map
+    refine Integrable.essSup_smul f_ℒ_1 this ?_
+    have hg' : AEStronglyMeasurable (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 :=
+      (ENNReal.continuous_coe.comp continuous_nnnorm).comp_aestronglyMeasurable hg
+    rw [← essSup_comp_quotientAddGroup_mk h𝓕 hg'.aemeasurable]
+    exact g_ℒ_infinity
+  have H₂ : AEStronglyMeasurable (QuotientAddGroup.automorphize ((g ∘ π) * f)) μ_𝓕
+  · simp_rw [H₀]
+    exact hg.mul F_ae_measurable
+  apply QuotientAddGroup.integral_eq_integral_automorphize h𝓕 H₁ H₂
+
+end
+
+attribute [to_additive existing QuotientGroup.integral_mul_eq_integral_automorphize_mul]
+  QuotientAddGroup.integral_mul_eq_integral_automorphize_mul
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -36,7 +36,7 @@ open Set MeasureTheory TopologicalSpace MeasureTheory.Measure
 
 open scoped Pointwise NNReal
 
-variable {G : Type _} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
+variable {G : Type*} [Group G] [MeasurableSpace G] [TopologicalSpace G] [TopologicalGroup G]
   [BorelSpace G] {μ : Measure G} {Γ : Subgroup G}
 
 /-- Measurability of the action of the topological group `G` on the left-coset space `G/Γ`. -/
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Alex Kontorovich and Heather Macbeth. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alex Kontorovich, Heather Macbeth
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.quotient
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Measure.Haar.Basic
 import Mathlib.MeasureTheory.Group.FundamentalDomain
 import Mathlib.Algebra.Group.Opposite
 
+#align_import measure_theory.measure.haar.quotient from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Haar quotient measure
 
feat: port MeasureTheory.Measure.Haar.Quotient (#4770)

Dependencies 12 + 954

955 files ported (98.8%)
436942 lines ported (98.7%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file