measure_theory.measure.haar.basicMathlib.MeasureTheory.Measure.Haar.Basic

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)

(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)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -195,7 +195,7 @@ theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonemp
 @[to_additive add_index_elim]
 theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
     ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by
-  have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this 
+  have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this
 #align measure_theory.measure.haar.index_elim MeasureTheory.Measure.haar.index_elim
 #align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.haar.addIndex_elim
 -/
@@ -213,7 +213,7 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
   apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_set_of_eq]; refine' subset.trans h1s _
   apply Union₂_subset; intro g₁ hg₁; rw [preimage_subset_iff]; intro g₂ hg₂
   have := h1t hg₂
-  rcases this with ⟨_, ⟨g₃, rfl⟩, A, ⟨hg₃, rfl⟩, h2V⟩; rw [mem_preimage, ← mul_assoc] at h2V 
+  rcases this with ⟨_, ⟨g₃, rfl⟩, A, ⟨hg₃, rfl⟩, h2V⟩; rw [mem_preimage, ← mul_assoc] at h2V
   exact mem_bUnion (Finset.mul_mem_mul hg₃ hg₁) h2V
 #align measure_theory.measure.haar.le_index_mul MeasureTheory.Measure.haar.le_index_mul
 #align measure_theory.measure.haar.le_add_index_mul MeasureTheory.Measure.haar.le_addIndex_mul
@@ -224,7 +224,7 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
 theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) :
     0 < index (K : Set G) V := by
   unfold index; rw [Nat.sInf_def, Nat.find_pos, mem_image]
-  · rintro ⟨t, h1t, h2t⟩; rw [Finset.card_eq_zero] at h2t ; subst h2t
+  · rintro ⟨t, h1t, h2t⟩; rw [Finset.card_eq_zero] at h2t; subst h2t
     obtain ⟨g, hg⟩ := K.interior_nonempty
     show g ∈ (∅ : Set G); convert h1t (interior_subset hg); symm; apply bUnion_empty
   · exact index_defined K.is_compact hV
@@ -256,7 +256,7 @@ theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
   apply union_subset <;> refine' subset.trans (by assumption) _ <;>
           apply bUnion_subset_bUnion_left <;>
         intro g hg <;>
-      simp only [mem_def] at hg  <;>
+      simp only [mem_def] at hg <;>
     simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
 #align measure_theory.measure.haar.index_union_le MeasureTheory.Measure.haar.index_union_le
 #align measure_theory.measure.haar.add_index_union_le MeasureTheory.Measure.haar.addIndex_union_le
@@ -277,7 +277,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     by
     intro K hK; apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_set_of_eq]
     intro g hg; rcases hK hg with ⟨_, ⟨g₀, rfl⟩, _, ⟨h1g₀, rfl⟩, h2g₀⟩
-    simp only [mem_preimage] at h2g₀ 
+    simp only [mem_preimage] at h2g₀
     simp only [mem_Union]; use g₀; constructor
     · simp only [Finset.mem_filter, h1g₀, true_and_iff]; use g
       simp only [hg, h2g₀, mem_inter_iff, mem_preimage, and_self_iff]
@@ -291,7 +291,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
   exact s.card_filter_le _
   apply finset.disjoint_filter.mpr
   rintro g₁ h1g₁ ⟨g₂, h1g₂, h2g₂⟩ ⟨g₃, h1g₃, h2g₃⟩
-  simp only [mem_preimage] at h1g₃ h1g₂ 
+  simp only [mem_preimage] at h1g₃ h1g₂
   refine' h.le_bot (_ : g₁⁻¹ ∈ _)
   constructor <;> simp only [Set.mem_inv, Set.mem_mul, exists_exists_and_eq_and, exists_and_left]
   · refine' ⟨_, h2g₂, (g₁ * g₂)⁻¹, _, _⟩; simp only [inv_inv, h1g₂]
@@ -312,7 +312,7 @@ theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (inte
   refine' ⟨s.map (Equiv.mulRight g⁻¹).toEmbedding, _, Finset.card_map _⟩
   · simp only [mem_set_of_eq]; refine' subset.trans (image_subset _ h1s) _
     rintro _ ⟨g₁, ⟨_, ⟨g₂, rfl⟩, ⟨_, ⟨hg₂, rfl⟩, hg₁⟩⟩, rfl⟩
-    simp only [mem_preimage] at hg₁ ;
+    simp only [mem_preimage] at hg₁;
     simp only [exists_prop, mem_Union, Finset.mem_map, Equiv.coe_mulRight, exists_exists_and_eq_and,
       mem_preimage, Equiv.toEmbedding_apply]
     refine' ⟨_, hg₂, _⟩; simp only [mul_assoc, hg₁, inv_mul_cancel_left]
@@ -479,7 +479,7 @@ theorem chaar_mem_haarProduct (K₀ : PositiveCompacts G) : chaar K₀ ∈ haarP
 theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
     chaar K₀ ∈ clPrehaar (K₀ : Set G) V :=
   by
-  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this 
+  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this
   exact this V
 #align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.haar.chaar_mem_clPrehaar
 #align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.haar.addCHaar_mem_clAddPrehaar
@@ -488,7 +488,7 @@ theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G))
 #print MeasureTheory.Measure.haar.chaar_nonneg /-
 @[to_additive add_chaar_nonneg]
 theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K := by
-  have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this ; exact this.1
+  have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this; exact this.1
 #align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.haar.chaar_nonneg
 #align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.haar.addCHaar_nonneg
 -/
@@ -897,10 +897,10 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
       simp only [Set.singleton_subset_iff, hv]
     replace hKvsub := @measure_mono _ _ μ _ _ hKvsub
     have hcontr := lt_of_le_of_lt hKvsub hμUK
-    rw [measure_union hKv (IsCompact.measurableSet hK)] at hcontr 
+    rw [measure_union hKv (IsCompact.measurableSet hK)] at hcontr
     have hKtranslate : μ ({v} * K) = μ K := by
       simp only [singleton_mul, image_mul_left, measure_preimage_mul]
-    rw [hKtranslate, lt_self_iff_false] at hcontr 
+    rw [hKtranslate, lt_self_iff_false] at hcontr
     assumption
   suffices : V ⊆ E / E; exact Filter.mem_of_superset hV1 this
   intro v hvV
@@ -940,7 +940,7 @@ instance (priority := 100) IsHaarMeasure.isInvInvariant_of_regular [LocallyCompa
     simp only [hc, smul_smul, pow_two, measure.map_smul]
   have μeq : μ = c ^ 2 • μ :=
     by
-    rw [map_map continuous_inv.measurable continuous_inv.measurable] at this 
+    rw [map_map continuous_inv.measurable continuous_inv.measurable] at this
     · simpa only [inv_involutive, involutive.comp_self, map_id]
     all_goals infer_instance
   have K : positive_compacts G := Classical.arbitrary _
@@ -968,14 +968,14 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
       haveI : (μ.map f).IsHaarMeasure :=
         is_haar_measure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
       obtain ⟨C, -, -, hC⟩ := is_haar_measure_eq_smul_is_haar_measure (μ.map f) μ
-      suffices C = 1 by rwa [this, one_smul] at hC 
+      suffices C = 1 by rwa [this, one_smul] at hC
       have h_univ : (μ.map f) univ = μ univ := by
         rw [map_apply_of_ae_measurable hf.measurable.ae_measurable MeasurableSet.univ,
           preimage_univ]
       have hμ₀ : μ univ ≠ 0 := is_open_pos_measure.open_pos univ isOpen_univ univ_nonempty
       have hμ₁ : μ univ ≠ ∞ := compact_space.is_finite_measure.measure_univ_lt_top.ne
       rwa [hC, smul_apply, Algebra.id.smul_eq_mul, mul_comm, ← ENNReal.eq_div_iff hμ₀ hμ₁,
-        ENNReal.div_self hμ₀ hμ₁] at h_univ  }
+        ENNReal.div_self hμ₀ hμ₁] at h_univ }
 #align measure_theory.measure.measure_preserving_zpow MeasureTheory.Measure.measurePreserving_zpow
 #align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
 -/
Diff
@@ -821,9 +821,9 @@ theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLe
 #align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
 -/
 
-#print MeasureTheory.Measure.isHaarMeasure_eq_smul /-
+#print MeasureTheory.Measure.isMulLeftInvariant_eq_smul /-
 @[to_additive is_add_haar_measure_eq_smul_is_add_haar_measure]
-theorem isHaarMeasure_eq_smul [LocallyCompactSpace G] (μ ν : Measure G) [IsHaarMeasure μ]
+theorem isMulLeftInvariant_eq_smul [LocallyCompactSpace G] (μ ν : Measure G) [IsHaarMeasure μ]
     [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
   by
   have K : positive_compacts G := Classical.arbitrary _
@@ -843,8 +843,8 @@ theorem isHaarMeasure_eq_smul [LocallyCompactSpace G] (μ ν : Measure G) [IsHaa
       _ = (μ K / ν K) • ν K • haar_measure K := by
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul
+#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isMulLeftInvariant_eq_smul
+#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddLeftInvariant_eq_smul
 -/
 
 -- see Note [lower instance priority]
Diff
@@ -657,7 +657,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
 @[to_additive "The variant of `is_left_invariant_add_chaar` for `add_haar_content`"]
 theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
     haarContent K₀ (K.map _ <| continuous_mul_left g) = haarContent K₀ K := by
-  simpa only [ENNReal.coe_inj, ← NNReal.coe_eq, haar_content_apply] using
+  simpa only [ENNReal.coe_inj, ← NNReal.coe_inj, haar_content_apply] using
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
Diff
@@ -287,7 +287,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
       (add_le_add (this K₁.1 <| subset.trans (subset_union_left _ _) h1s)
         (this K₂.1 <| subset.trans (subset_union_right _ _) h1s))
       _
-  rw [← Finset.card_union_eq, Finset.filter_union_right]
+  rw [← Finset.card_union_of_disjoint, Finset.filter_union_right]
   exact s.card_filter_le _
   apply finset.disjoint_filter.mpr
   rintro g₁ h1g₁ ⟨g₂, h1g₂, h2g₂⟩ ⟨g₃, h1g₃, h2g₃⟩
Diff
@@ -647,7 +647,7 @@ theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
 /-- The variant of `chaar_self` for `haar_content` -/
 @[to_additive "The variant of `add_chaar_self` for `add_haar_content`."]
 theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 := by
-  simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_eq_coe, chaar_self]; rfl
+  simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_inj, chaar_self]; rfl
 #align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.haar.haarContent_self
 #align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.haar.addHaarContent_self
 -/
@@ -657,7 +657,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
 @[to_additive "The variant of `is_left_invariant_add_chaar` for `add_haar_content`"]
 theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
     haarContent K₀ (K.map _ <| continuous_mul_left g) = haarContent K₀ K := by
-  simpa only [ENNReal.coe_eq_coe, ← NNReal.coe_eq, haar_content_apply] using
+  simpa only [ENNReal.coe_inj, ← NNReal.coe_eq, haar_content_apply] using
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
Diff
@@ -565,7 +565,7 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
 theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G}
     (h : Disjoint K₁.1 K₂.1) : chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ :=
   by
-  rcases separatedNhds_of_isCompact_isCompact K₁.2 K₂.2 h with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
+  rcases SeparatedNhds.of_isCompact_isCompact K₁.2 K₂.2 h with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
   rcases compact_open_separated_mul_right K₁.2 h1U₁ h2U₁ with ⟨L₁, h1L₁, h2L₁⟩
   rcases mem_nhds_iff.mp h1L₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩
   replace h2L₁ := subset.trans (mul_subset_mul_left h1V₁) h2L₁
Diff
@@ -565,7 +565,7 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
 theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G}
     (h : Disjoint K₁.1 K₂.1) : chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ :=
   by
-  rcases isCompact_isCompact_separated K₁.2 K₂.2 h with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
+  rcases separatedNhds_of_isCompact_isCompact K₁.2 K₂.2 h with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
   rcases compact_open_separated_mul_right K₁.2 h1U₁ h2U₁ with ⟨L₁, h1L₁, h2L₁⟩
   rcases mem_nhds_iff.mp h1L₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩
   replace h2L₁ := subset.trans (mul_subset_mul_left h1V₁) h2L₁
Diff
@@ -821,10 +821,10 @@ theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLe
 #align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
 -/
 
-#print MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure /-
+#print MeasureTheory.Measure.isHaarMeasure_eq_smul /-
 @[to_additive is_add_haar_measure_eq_smul_is_add_haar_measure]
-theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
-    [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
+theorem isHaarMeasure_eq_smul [LocallyCompactSpace G] (μ ν : Measure G) [IsHaarMeasure μ]
+    [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
   by
   have K : positive_compacts G := Classical.arbitrary _
   have νpos : 0 < ν K := measure_pos_of_nonempty_interior _ K.interior_nonempty
@@ -843,11 +843,10 @@ theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Mea
       _ = (μ K / ν K) • ν K • haar_measure K := by
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
+#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul
+#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul
 -/
 
-#print MeasureTheory.Measure.regular_of_isHaarMeasure /-
 -- see Note [lower instance priority]
 @[to_additive]
 instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
@@ -859,8 +858,7 @@ instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ :
   rw [hμ]
   exact regular.smul Ctop
 #align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_isHaarMeasure
-#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_isAddHaarMeasure
--/
+#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_is_add_haar_measure
 
 #print MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos /-
 /-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
@@ -924,10 +922,10 @@ section CommGroup
 variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
   [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
 
-#print MeasureTheory.Measure.IsHaarMeasure.isInvInvariant /-
+#print MeasureTheory.Measure.IsHaarMeasure.isInvInvariant_of_regular /-
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
 @[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
-instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
+instance (priority := 100) IsHaarMeasure.isInvInvariant_of_regular [LocallyCompactSpace G] :
     IsInvInvariant μ :=
   by
   -- the image measure is a Haar measure. By uniqueness up to multiplication, it is of the form
@@ -955,8 +953,8 @@ instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G]
       this
   have : c = 1 := (ENNReal.pow_strictMono two_ne_zero).Injective this
   rw [measure.inv, hc, this, one_smul]
-#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
-#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant
+#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant_of_regular
+#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant_of_regular
 -/
 
 #print MeasureTheory.Measure.measurePreserving_zpow /-
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
-import Mathbin.MeasureTheory.Measure.Content
-import Mathbin.MeasureTheory.Group.Prod
-import Mathbin.GroupTheory.Divisible
-import Mathbin.Topology.Algebra.Group.Compact
+import MeasureTheory.Measure.Content
+import MeasureTheory.Group.Prod
+import GroupTheory.Divisible
+import Topology.Algebra.Group.Compact
 
 #align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"599fffe78f0e11eb6a034e834ec51882167b9688"
 
Diff
@@ -434,7 +434,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     apply is_compact_Icc
   refine' this.inter_Inter_nonempty (cl_prehaar K₀) (fun s => isClosed_closure) fun t => _
   let V₀ := ⋂ V ∈ t, (V : open_nhds_of 1).carrier
-  have h1V₀ : IsOpen V₀ := by apply isOpen_biInter; apply Finset.finite_toSet;
+  have h1V₀ : IsOpen V₀ := by apply Set.Finite.isOpen_biInter; apply Finset.finite_toSet;
     rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V; exact hV₁
   have h2V₀ : (1 : G) ∈ V₀ := by simp only [mem_Inter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V; exact hV₂
   refine' ⟨prehaar K₀ V₀, _⟩
Diff
@@ -346,7 +346,7 @@ theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G
   · apply le_index_mul K₀ K hU
   · exact index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_le_index MeasureTheory.Measure.haar.prehaar_le_index
-#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_add_index
+#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_addIndex
 -/
 
 #print MeasureTheory.Measure.haar.prehaar_pos /-
Diff
@@ -103,7 +103,7 @@ def index (K V : Set G) : ℕ :=
 @[to_additive add_index_empty]
 theorem index_empty {V : Set G} : index ∅ V = 0 :=
   by
-  simp only [index, Nat.sInf_eq_zero]; left; use ∅
+  simp only [index, Nat.sInf_eq_zero]; left; use∅
   simp only [Finset.card_empty, empty_subset, mem_set_of_eq, eq_self_iff_true, and_self_iff]
 #align measure_theory.measure.haar.index_empty MeasureTheory.Measure.haar.index_empty
 #align measure_theory.measure.haar.add_index_empty MeasureTheory.Measure.haar.addIndex_empty
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.basic
-! leanprover-community/mathlib commit 599fffe78f0e11eb6a034e834ec51882167b9688
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Measure.Content
 import Mathbin.MeasureTheory.Group.Prod
 import Mathbin.GroupTheory.Divisible
 import Mathbin.Topology.Algebra.Group.Compact
 
+#align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"599fffe78f0e11eb6a034e834ec51882167b9688"
+
 /-!
 # Haar measure
 
Diff
@@ -127,17 +127,21 @@ def prehaar (K₀ U : Set G) (K : Compacts G) : ℝ :=
 #align measure_theory.measure.haar.add_prehaar MeasureTheory.Measure.haar.addPrehaar
 -/
 
+#print MeasureTheory.Measure.haar.prehaar_empty /-
 @[to_additive]
 theorem prehaar_empty (K₀ : PositiveCompacts G) {U : Set G} : prehaar (K₀ : Set G) U ⊥ = 0 := by
   rw [prehaar, compacts.coe_bot, index_empty, Nat.cast_zero, zero_div]
 #align measure_theory.measure.haar.prehaar_empty MeasureTheory.Measure.haar.prehaar_empty
 #align measure_theory.measure.haar.add_prehaar_empty MeasureTheory.Measure.haar.addPrehaar_empty
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_nonneg /-
 @[to_additive]
 theorem prehaar_nonneg (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G) :
     0 ≤ prehaar (K₀ : Set G) U K := by apply div_nonneg <;> norm_cast <;> apply zero_le
 #align measure_theory.measure.haar.prehaar_nonneg MeasureTheory.Measure.haar.prehaar_nonneg
 #align measure_theory.measure.haar.add_prehaar_nonneg MeasureTheory.Measure.haar.addPrehaar_nonneg
+-/
 
 #print MeasureTheory.Measure.haar.haarProduct /-
 /-- `haar_product K₀` is the product of intervals `[0, (K : K₀)]`, for all compact sets `K`.
@@ -149,13 +153,16 @@ def haarProduct (K₀ : Set G) : Set (Compacts G → ℝ) :=
 #align measure_theory.measure.haar.add_haar_product MeasureTheory.Measure.haar.addHaarProduct
 -/
 
+#print MeasureTheory.Measure.haar.mem_prehaar_empty /-
 @[simp, to_additive]
 theorem mem_prehaar_empty {K₀ : Set G} {f : Compacts G → ℝ} :
     f ∈ haarProduct K₀ ↔ ∀ K : Compacts G, f K ∈ Icc (0 : ℝ) (index (K : Set G) K₀) := by
   simp only [haar_product, pi, forall_prop_of_true, mem_univ, mem_set_of_eq]
 #align measure_theory.measure.haar.mem_prehaar_empty MeasureTheory.Measure.haar.mem_prehaar_empty
 #align measure_theory.measure.haar.mem_add_prehaar_empty MeasureTheory.Measure.haar.mem_addPrehaar_empty
+-/
 
+#print MeasureTheory.Measure.haar.clPrehaar /-
 /-- The closure of the collection of elements of the form `prehaar K₀ U`,
   for `U` open neighbourhoods of `1`, contained in `V`. The closure is taken in the space
   `compacts G → ℝ`, with the topology of pointwise convergence.
@@ -166,6 +173,7 @@ def clPrehaar (K₀ : Set G) (V : OpenNhdsOf (1 : G)) : Set (Compacts G → ℝ)
   closure <| prehaar K₀ '' {U : Set G | U ⊆ V.1 ∧ IsOpen U ∧ (1 : G) ∈ U}
 #align measure_theory.measure.haar.cl_prehaar MeasureTheory.Measure.haar.clPrehaar
 #align measure_theory.measure.haar.cl_add_prehaar MeasureTheory.Measure.haar.clAddPrehaar
+-/
 
 variable [TopologicalGroup G]
 
@@ -174,6 +182,7 @@ variable [TopologicalGroup G]
 -/
 
 
+#print MeasureTheory.Measure.haar.index_defined /-
 /-- If `K` is compact and `V` has nonempty interior, then the index `(K : V)` is well-defined,
   there is a finite set `t` satisfying the desired properties. -/
 @[to_additive add_index_defined
@@ -183,13 +192,16 @@ theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonemp
   rcases compact_covered_by_mul_left_translates hK hV with ⟨t, ht⟩; exact ⟨t.card, t, ht, rfl⟩
 #align measure_theory.measure.haar.index_defined MeasureTheory.Measure.haar.index_defined
 #align measure_theory.measure.haar.add_index_defined MeasureTheory.Measure.haar.addIndex_defined
+-/
 
+#print MeasureTheory.Measure.haar.index_elim /-
 @[to_additive add_index_elim]
 theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
     ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by
   have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this 
 #align measure_theory.measure.haar.index_elim MeasureTheory.Measure.haar.index_elim
 #align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.haar.addIndex_elim
+-/
 
 #print MeasureTheory.Measure.haar.le_index_mul /-
 @[to_additive le_add_index_mul]
@@ -234,6 +246,7 @@ theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (i
 #align measure_theory.measure.haar.add_index_mono MeasureTheory.Measure.haar.addIndex_mono
 -/
 
+#print MeasureTheory.Measure.haar.index_union_le /-
 @[to_additive add_index_union_le]
 theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
     index (K₁.1 ∪ K₂.1) V ≤ index K₁.1 V + index K₂.1 V :=
@@ -250,7 +263,9 @@ theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
 #align measure_theory.measure.haar.index_union_le MeasureTheory.Measure.haar.index_union_le
 #align measure_theory.measure.haar.add_index_union_le MeasureTheory.Measure.haar.addIndex_union_le
+-/
 
+#print MeasureTheory.Measure.haar.index_union_eq /-
 @[to_additive add_index_union_eq]
 theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
     (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
@@ -288,7 +303,9 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     simp only [mul_inv_rev, mul_inv_cancel_left]
 #align measure_theory.measure.haar.index_union_eq MeasureTheory.Measure.haar.index_union_eq
 #align measure_theory.measure.haar.add_index_union_eq MeasureTheory.Measure.haar.addIndex_union_eq
+-/
 
+#print MeasureTheory.Measure.haar.mul_left_index_le /-
 @[to_additive add_left_add_index_le]
 theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (interior V).Nonempty)
     (g : G) : index ((fun h => g * h) '' K) V ≤ index K V :=
@@ -304,7 +321,9 @@ theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (inte
     refine' ⟨_, hg₂, _⟩; simp only [mul_assoc, hg₁, inv_mul_cancel_left]
 #align measure_theory.measure.haar.mul_left_index_le MeasureTheory.Measure.haar.mul_left_index_le
 #align measure_theory.measure.haar.add_left_add_index_le MeasureTheory.Measure.haar.add_left_addIndex_le
+-/
 
+#print MeasureTheory.Measure.haar.is_left_invariant_index /-
 @[to_additive is_left_invariant_add_index]
 theorem is_left_invariant_index {K : Set G} (hK : IsCompact K) (g : G) {V : Set G}
     (hV : (interior V).Nonempty) : index ((fun h => g * h) '' K) V = index K V :=
@@ -314,12 +333,14 @@ theorem is_left_invariant_index {K : Set G} (hK : IsCompact K) (g : G) {V : Set
   rw [image_image]; symm; convert image_id' _; ext h; apply inv_mul_cancel_left
 #align measure_theory.measure.haar.is_left_invariant_index MeasureTheory.Measure.haar.is_left_invariant_index
 #align measure_theory.measure.haar.is_left_invariant_add_index MeasureTheory.Measure.haar.is_left_invariant_addIndex
+-/
 
 /-!
 ### Lemmas about `prehaar`
 -/
 
 
+#print MeasureTheory.Measure.haar.prehaar_le_index /-
 @[to_additive add_prehaar_le_add_index]
 theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G)
     (hU : (interior U).Nonempty) : prehaar (K₀ : Set G) U K ≤ index (K : Set G) K₀ :=
@@ -329,14 +350,18 @@ theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G
   · exact index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_le_index MeasureTheory.Measure.haar.prehaar_le_index
 #align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_add_index
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_pos /-
 @[to_additive]
 theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) {K : Set G}
     (h1K : IsCompact K) (h2K : (interior K).Nonempty) : 0 < prehaar (K₀ : Set G) U ⟨K, h1K⟩ := by
   apply div_pos <;> norm_cast; apply index_pos ⟨⟨K, h1K⟩, h2K⟩ hU; exact index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_pos MeasureTheory.Measure.haar.prehaar_pos
 #align measure_theory.measure.haar.add_prehaar_pos MeasureTheory.Measure.haar.addPrehaar_pos
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_mono /-
 @[to_additive]
 theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
     {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂.1) :
@@ -346,14 +371,18 @@ theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).
   exact_mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_mono MeasureTheory.Measure.haar.prehaar_mono
 #align measure_theory.measure.haar.add_prehaar_mono MeasureTheory.Measure.haar.addPrehaar_mono
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_self /-
 @[to_additive]
 theorem prehaar_self {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty) :
     prehaar (K₀ : Set G) U K₀.toCompacts = 1 :=
   div_self <| ne_of_gt <| by exact_mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_self MeasureTheory.Measure.haar.prehaar_self
 #align measure_theory.measure.haar.add_prehaar_self MeasureTheory.Measure.haar.addPrehaar_self
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_sup_le /-
 @[to_additive]
 theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Compacts G)
     (hU : (interior U).Nonempty) :
@@ -363,7 +392,9 @@ theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Comp
   exact_mod_cast index_union_le K₁ K₂ hU; exact_mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_sup_le MeasureTheory.Measure.haar.prehaar_sup_le
 #align measure_theory.measure.haar.add_prehaar_sup_le MeasureTheory.Measure.haar.addPrehaar_sup_le
+-/
 
+#print MeasureTheory.Measure.haar.prehaar_sup_eq /-
 @[to_additive]
 theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Compacts G}
     (hU : (interior U).Nonempty) (h : Disjoint (K₁.1 * U⁻¹) (K₂.1 * U⁻¹)) :
@@ -371,7 +402,9 @@ theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Comp
   simp only [prehaar]; rw [div_add_div_same]; congr; exact_mod_cast index_union_eq K₁ K₂ hU h
 #align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.haar.prehaar_sup_eq
 #align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.haar.addPrehaar_sup_eq
+-/
 
+#print MeasureTheory.Measure.haar.is_left_invariant_prehaar /-
 @[to_additive]
 theorem is_left_invariant_prehaar {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
     (g : G) (K : Compacts G) :
@@ -379,6 +412,7 @@ theorem is_left_invariant_prehaar {K₀ : PositiveCompacts G} {U : Set G} (hU :
   simp only [prehaar, compacts.coe_map, is_left_invariant_index K.is_compact _ hU]
 #align measure_theory.measure.haar.is_left_invariant_prehaar MeasureTheory.Measure.haar.is_left_invariant_prehaar
 #align measure_theory.measure.haar.is_left_invariant_add_prehaar MeasureTheory.Measure.haar.is_left_invariant_addPrehaar
+-/
 
 /-!
 ### Lemmas about `haar_product`
@@ -394,6 +428,7 @@ theorem prehaar_mem_haarProduct (K₀ : PositiveCompacts G) {U : Set G} (hU : (i
 #align measure_theory.measure.haar.add_prehaar_mem_add_haar_product MeasureTheory.Measure.haar.addPrehaar_mem_addHaarProduct
 -/
 
+#print MeasureTheory.Measure.haar.nonempty_iInter_clPrehaar /-
 @[to_additive]
 theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     (haarProduct (K₀ : Set G) ∩ ⋂ V : OpenNhdsOf (1 : G), clPrehaar K₀ V).Nonempty :=
@@ -413,6 +448,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     exact ⟨subset.trans (Inter_subset _ ⟨V, hV⟩) (Inter_subset _ h2V), h1V₀, h2V₀⟩
 #align measure_theory.measure.haar.nonempty_Inter_cl_prehaar MeasureTheory.Measure.haar.nonempty_iInter_clPrehaar
 #align measure_theory.measure.haar.nonempty_Inter_cl_add_prehaar MeasureTheory.Measure.haar.nonempty_iInter_clAddPrehaar
+-/
 
 /-!
 ### Lemmas about `chaar`
@@ -441,6 +477,7 @@ theorem chaar_mem_haarProduct (K₀ : PositiveCompacts G) : chaar K₀ ∈ haarP
 #align measure_theory.measure.haar.add_chaar_mem_add_haar_product MeasureTheory.Measure.haar.addCHaar_mem_addHaarProduct
 -/
 
+#print MeasureTheory.Measure.haar.chaar_mem_clPrehaar /-
 @[to_additive add_chaar_mem_cl_add_prehaar]
 theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
     chaar K₀ ∈ clPrehaar (K₀ : Set G) V :=
@@ -449,13 +486,17 @@ theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G))
   exact this V
 #align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.haar.chaar_mem_clPrehaar
 #align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.haar.addCHaar_mem_clAddPrehaar
+-/
 
+#print MeasureTheory.Measure.haar.chaar_nonneg /-
 @[to_additive add_chaar_nonneg]
 theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K := by
   have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this ; exact this.1
 #align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.haar.chaar_nonneg
 #align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.haar.addCHaar_nonneg
+-/
 
+#print MeasureTheory.Measure.haar.chaar_empty /-
 @[to_additive add_chaar_empty]
 theorem chaar_empty (K₀ : PositiveCompacts G) : chaar K₀ ⊥ = 0 :=
   by
@@ -468,7 +509,9 @@ theorem chaar_empty (K₀ : PositiveCompacts G) : chaar K₀ ⊥ = 0 :=
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_empty MeasureTheory.Measure.haar.chaar_empty
 #align measure_theory.measure.haar.add_chaar_empty MeasureTheory.Measure.haar.addCHaar_empty
+-/
 
+#print MeasureTheory.Measure.haar.chaar_self /-
 @[to_additive add_chaar_self]
 theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1 :=
   by
@@ -482,7 +525,9 @@ theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_self MeasureTheory.Measure.haar.chaar_self
 #align measure_theory.measure.haar.add_chaar_self MeasureTheory.Measure.haar.addCHaar_self
+-/
 
+#print MeasureTheory.Measure.haar.chaar_mono /-
 @[to_additive add_chaar_mono]
 theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂) :
     chaar K₀ K₁ ≤ chaar K₀ K₂ :=
@@ -497,7 +542,9 @@ theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K
   · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_mono MeasureTheory.Measure.haar.chaar_mono
 #align measure_theory.measure.haar.add_chaar_mono MeasureTheory.Measure.haar.addCHaar_mono
+-/
 
+#print MeasureTheory.Measure.haar.chaar_sup_le /-
 @[to_additive add_chaar_sup_le]
 theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
     chaar K₀ (K₁ ⊔ K₂) ≤ chaar K₀ K₁ + chaar K₀ K₂ :=
@@ -514,7 +561,9 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
   · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_sup_le MeasureTheory.Measure.haar.chaar_sup_le
 #align measure_theory.measure.haar.add_chaar_sup_le MeasureTheory.Measure.haar.addCHaar_sup_le
+-/
 
+#print MeasureTheory.Measure.haar.chaar_sup_eq /-
 @[to_additive add_chaar_sup_eq]
 theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G}
     (h : Disjoint K₁.1 K₂.1) : chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ :=
@@ -550,7 +599,9 @@ theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compac
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_sup_eq MeasureTheory.Measure.haar.chaar_sup_eq
 #align measure_theory.measure.haar.add_chaar_sup_eq MeasureTheory.Measure.haar.addCHaar_sup_eq
+-/
 
+#print MeasureTheory.Measure.haar.is_left_invariant_chaar /-
 @[to_additive is_left_invariant_add_chaar]
 theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
     chaar K₀ (K.map _ <| continuous_mul_left g) = chaar K₀ K :=
@@ -566,6 +617,7 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.haar.is_left_invariant_chaar
 #align measure_theory.measure.haar.is_left_invariant_add_chaar MeasureTheory.Measure.haar.is_left_invariant_addCHaar
+-/
 
 variable [T2Space G]
 
@@ -585,12 +637,14 @@ def haarContent (K₀ : PositiveCompacts G) : Content G
 /-! We only prove the properties for `haar_content` that we use at least twice below. -/
 
 
+#print MeasureTheory.Measure.haar.haarContent_apply /-
 @[to_additive]
 theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
     haarContent K₀ K = show NNReal from ⟨chaar K₀ K, chaar_nonneg _ _⟩ :=
   rfl
 #align measure_theory.measure.haar.haar_content_apply MeasureTheory.Measure.haar.haarContent_apply
 #align measure_theory.measure.haar.add_haar_content_apply MeasureTheory.Measure.haar.addHaarContent_apply
+-/
 
 #print MeasureTheory.Measure.haar.haarContent_self /-
 /-- The variant of `chaar_self` for `haar_content` -/
@@ -601,6 +655,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
 #align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.haar.addHaarContent_self
 -/
 
+#print MeasureTheory.Measure.haar.is_left_invariant_haarContent /-
 /-- The variant of `is_left_invariant_chaar` for `haar_content` -/
 @[to_additive "The variant of `is_left_invariant_add_chaar` for `add_haar_content`"]
 theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
@@ -609,7 +664,9 @@ theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : C
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
+-/
 
+#print MeasureTheory.Measure.haar.haarContent_outerMeasure_self_pos /-
 @[to_additive]
 theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
     0 < (haarContent K₀).OuterMeasure K₀ :=
@@ -620,6 +677,7 @@ theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
   exact haar_content_self.ge
 #align measure_theory.measure.haar.haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.haarContent_outerMeasure_self_pos
 #align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.addHaarContent_outerMeasure_self_pos
+-/
 
 end Haar
 
@@ -642,6 +700,7 @@ def haarMeasure (K₀ : PositiveCompacts G) : Measure G :=
 #align measure_theory.measure.add_haar_measure MeasureTheory.Measure.addHaarMeasure
 -/
 
+#print MeasureTheory.Measure.haarMeasure_apply /-
 @[to_additive]
 theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
     haarMeasure K₀ s = (haarContent K₀).OuterMeasure s / (haarContent K₀).OuterMeasure K₀ :=
@@ -650,7 +709,9 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
   simp only [hs, div_eq_mul_inv, mul_comm, content.measure_apply]
 #align measure_theory.measure.haar_measure_apply MeasureTheory.Measure.haarMeasure_apply
 #align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.addHaarMeasure_apply
+-/
 
+#print MeasureTheory.Measure.isMulLeftInvariant_haarMeasure /-
 @[to_additive]
 instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
     IsMulLeftInvariant (haarMeasure K₀) :=
@@ -663,6 +724,7 @@ instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
   apply is_left_invariant_haar_content
 #align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.isMulLeftInvariant_haarMeasure
 #align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.isAddLeftInvariant_addHaarMeasure
+-/
 
 #print MeasureTheory.Measure.haarMeasure_self /-
 @[to_additive]
@@ -729,6 +791,7 @@ section SecondCountable
 
 variable [SecondCountableTopology G]
 
+#print MeasureTheory.Measure.haarMeasure_unique /-
 /-- The Haar measure is unique up to scaling. More precisely: every σ-finite left invariant measure
   is a scalar multiple of the Haar measure.
   This is slightly weaker than assuming that `μ` is a Haar measure (in particular we don't require
@@ -743,11 +806,13 @@ theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant
     (by rw [haar_measure_self, div_one])
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
+-/
 
 example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : PositiveCompacts G) :
     μ = μ K₀.1 • haarMeasure K₀ :=
   haarMeasure_unique μ K₀
 
+#print MeasureTheory.Measure.regular_of_isMulLeftInvariant /-
 /-- To show that an invariant σ-finite measure is regular it is sufficient to show that it is finite
   on some compact set with non-empty interior. -/
 @[to_additive
@@ -757,7 +822,9 @@ theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLe
   rw [haar_measure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact regular.smul hμK
 #align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
 #align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
+-/
 
+#print MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure /-
 @[to_additive is_add_haar_measure_eq_smul_is_add_haar_measure]
 theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
     [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
@@ -781,6 +848,7 @@ theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Mea
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
 #align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
 #align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
+-/
 
 #print MeasureTheory.Measure.regular_of_isHaarMeasure /-
 -- see Note [lower instance priority]
@@ -797,6 +865,7 @@ instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ :
 #align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_isAddHaarMeasure
 -/
 
+#print MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos /-
 /-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
   measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
 @[to_additive
@@ -847,6 +916,7 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
   · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
 #align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
 #align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
+-/
 
 end SecondCountable
 
@@ -857,6 +927,7 @@ section CommGroup
 variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
   [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
 
+#print MeasureTheory.Measure.IsHaarMeasure.isInvInvariant /-
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
 @[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
 instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
@@ -889,6 +960,7 @@ instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G]
   rw [measure.inv, hc, this, one_smul]
 #align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
 #align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant
+-/
 
 #print MeasureTheory.Measure.measurePreserving_zpow /-
 @[to_additive]
@@ -913,6 +985,7 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
 #align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
 -/
 
+#print MeasureTheory.Measure.MeasurePreserving.zpow /-
 @[to_additive]
 theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) {X : Type _}
     [MeasurableSpace X] {μ' : Measure X} {f : X → G} (hf : MeasurePreserving f μ' μ) :
@@ -920,6 +993,7 @@ theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
   (measurePreserving_zpow μ hn).comp hf
 #align measure_theory.measure.measure_preserving.zpow MeasureTheory.Measure.MeasurePreserving.zpow
 #align measure_theory.measure.measure_preserving.zsmul MeasureTheory.Measure.MeasurePreserving.zsmul
+-/
 
 end CommGroup
 
Diff
@@ -779,7 +779,6 @@ theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Mea
       _ = (μ K / ν K) • ν K • haar_measure K := by
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
-      
 #align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
 #align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
 
Diff
@@ -97,7 +97,7 @@ namespace Haar
   It is defined to be 0 if no finite number of translates cover `K`. -/
 @[to_additive add_index "additive version of `measure_theory.measure.haar.index`"]
 def index (K V : Set G) : ℕ :=
-  sInf <| Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V }
+  sInf <| Finset.card '' {t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}
 #align measure_theory.measure.haar.index MeasureTheory.Measure.haar.index
 #align measure_theory.measure.haar.add_index MeasureTheory.Measure.haar.addIndex
 -/
@@ -163,7 +163,7 @@ theorem mem_prehaar_empty {K₀ : Set G} {f : Compacts G → ℝ} :
   on compact sets is defined to be an element in the closure of this intersection. -/
 @[to_additive "additive version of `measure_theory.measure.haar.cl_prehaar`"]
 def clPrehaar (K₀ : Set G) (V : OpenNhdsOf (1 : G)) : Set (Compacts G → ℝ) :=
-  closure <| prehaar K₀ '' { U : Set G | U ⊆ V.1 ∧ IsOpen U ∧ (1 : G) ∈ U }
+  closure <| prehaar K₀ '' {U : Set G | U ⊆ V.1 ∧ IsOpen U ∧ (1 : G) ∈ U}
 #align measure_theory.measure.haar.cl_prehaar MeasureTheory.Measure.haar.clPrehaar
 #align measure_theory.measure.haar.cl_add_prehaar MeasureTheory.Measure.haar.clAddPrehaar
 
@@ -179,7 +179,7 @@ variable [TopologicalGroup G]
 @[to_additive add_index_defined
       "If `K` is compact and `V` has nonempty interior, then the index\n`(K : V)` is well-defined, there is a finite set `t` satisfying the desired properties."]
 theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
-    ∃ n : ℕ, n ∈ Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V } := by
+    ∃ n : ℕ, n ∈ Finset.card '' {t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} := by
   rcases compact_covered_by_mul_left_translates hK hV with ⟨t, ht⟩; exact ⟨t.card, t, ht, rfl⟩
 #align measure_theory.measure.haar.index_defined MeasureTheory.Measure.haar.index_defined
 #align measure_theory.measure.haar.add_index_defined MeasureTheory.Measure.haar.addIndex_defined
@@ -652,8 +652,8 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
 #align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.addHaarMeasure_apply
 
 @[to_additive]
-instance mulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
-    MulLeftInvariant (haarMeasure K₀) :=
+instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
+    IsMulLeftInvariant (haarMeasure K₀) :=
   by
   rw [← forall_measure_preimage_mul_iff]
   intro g A hA
@@ -661,8 +661,8 @@ instance mulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
   congr 1
   apply content.is_mul_left_invariant_outer_measure
   apply is_left_invariant_haar_content
-#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.mulLeftInvariant_haarMeasure
-#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.addLeftInvariant_addHaarMeasure
+#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.isMulLeftInvariant_haarMeasure
+#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.isAddLeftInvariant_addHaarMeasure
 
 #print MeasureTheory.Measure.haarMeasure_self /-
 @[to_additive]
@@ -699,20 +699,20 @@ instance sigmaFinite_haarMeasure [SecondCountableTopology G] {K₀ : PositiveCom
 #align measure_theory.measure.sigma_finite_add_haar_measure MeasureTheory.Measure.sigmaFinite_addHaarMeasure
 -/
 
-#print MeasureTheory.Measure.haarMeasure_haarMeasure /-
+#print MeasureTheory.Measure.isHaarMeasure_haarMeasure /-
 /-- The Haar measure is a Haar measure, i.e., it is invariant and gives finite mass to compact
 sets and positive mass to nonempty open sets. -/
 @[to_additive
       "The additive Haar measure is an additive Haar measure, i.e., it is invariant and\ngives  finite mass to compact sets and positive mass to nonempty open sets."]
-instance haarMeasure_haarMeasure (K₀ : PositiveCompacts G) : HaarMeasure (haarMeasure K₀) :=
+instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure (haarMeasure K₀) :=
   by
   apply
     is_haar_measure_of_is_compact_nonempty_interior (haar_measure K₀) K₀ K₀.is_compact
       K₀.interior_nonempty
   · simp only [haar_measure_self]; exact one_ne_zero
   · simp only [haar_measure_self]; exact ENNReal.coe_ne_top
-#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.haarMeasure_haarMeasure
-#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.addHaarMeasure_addHaarMeasure
+#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.isHaarMeasure_haarMeasure
+#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_addHaarMeasure
 -/
 
 #print MeasureTheory.Measure.haar /-
@@ -735,7 +735,7 @@ variable [SecondCountableTopology G]
   `μ ≠ 0`). -/
 @[to_additive
       "The additive Haar measure is unique up to scaling. More precisely: every σ-finite\nleft invariant measure is a scalar multiple of the additive Haar measure. This is slightly weaker\nthan assuming that `μ` is an additive Haar measure (in particular we don't require `μ ≠ 0`)."]
-theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [MulLeftInvariant μ]
+theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
     (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ :=
   (measure_eq_div_smul μ (haarMeasure K₀) K₀.IsCompact.MeasurableSet
         (measure_pos_of_nonempty_interior _ K₀.interior_nonempty).ne'
@@ -744,7 +744,7 @@ theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [MulLeftInvariant 
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
-example [LocallyCompactSpace G] (μ : Measure G) [HaarMeasure μ] (K₀ : PositiveCompacts G) :
+example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : PositiveCompacts G) :
     μ = μ K₀.1 • haarMeasure K₀ :=
   haarMeasure_unique μ K₀
 
@@ -752,15 +752,15 @@ example [LocallyCompactSpace G] (μ : Measure G) [HaarMeasure μ] (K₀ : Positi
   on some compact set with non-empty interior. -/
 @[to_additive
       "To show that an invariant σ-finite measure is regular it is sufficient to show that\nit is finite on some compact set with non-empty interior."]
-theorem regular_of_mulLeftInvariant {μ : Measure G} [SigmaFinite μ] [MulLeftInvariant μ] {K : Set G}
-    (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
+theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLeftInvariant μ]
+    {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
   rw [haar_measure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact regular.smul hμK
-#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_mulLeftInvariant
-#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_addLeftInvariant
+#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
+#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
 
 @[to_additive is_add_haar_measure_eq_smul_is_add_haar_measure]
-theorem haarMeasure_eq_smul_haarMeasure [LocallyCompactSpace G] (μ ν : Measure G) [HaarMeasure μ]
-    [HaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
+theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
+    [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
   by
   have K : positive_compacts G := Classical.arbitrary _
   have νpos : 0 < ν K := measure_pos_of_nonempty_interior _ K.interior_nonempty
@@ -780,29 +780,29 @@ theorem haarMeasure_eq_smul_haarMeasure [LocallyCompactSpace G] (μ ν : Measure
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
       
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.haarMeasure_eq_smul_haarMeasure
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.addHaarMeasure_eq_smul_addHaarMeasure
+#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
+#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
 
-#print MeasureTheory.Measure.regular_of_haarMeasure /-
+#print MeasureTheory.Measure.regular_of_isHaarMeasure /-
 -- see Note [lower instance priority]
 @[to_additive]
-instance (priority := 90) regular_of_haarMeasure [LocallyCompactSpace G] (μ : Measure G)
-    [HaarMeasure μ] : Regular μ :=
+instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
+    [IsHaarMeasure μ] : Regular μ :=
   by
   have K : positive_compacts G := Classical.arbitrary _
   obtain ⟨c, c0, ctop, hμ⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • haar_measure K :=
     is_haar_measure_eq_smul_is_haar_measure μ _
   rw [hμ]
   exact regular.smul Ctop
-#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_haarMeasure
-#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_addHaarMeasure
+#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_isHaarMeasure
+#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_isAddHaarMeasure
 -/
 
 /-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
   measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
 @[to_additive
       "**Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`,\n  for any measurable set `E` of positive measure, the set `E - E` is a neighbourhood of `0`."]
-theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [HaarMeasure μ] [LocallyCompactSpace G]
+theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [LocallyCompactSpace G]
     (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) : E / E ∈ 𝓝 (1 : G) :=
   by
   /- For any regular measure `μ` and set `E` of positive measure, we can find a compact set `K` of
@@ -856,18 +856,19 @@ end Group
 section CommGroup
 
 variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
-  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [HaarMeasure μ]
+  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
 
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
 @[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
-instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] : InvInvariant μ :=
+instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
+    IsInvInvariant μ :=
   by
   -- the image measure is a Haar measure. By uniqueness up to multiplication, it is of the form
   -- `c μ`. Applying again inversion, one gets the measure `c^2 μ`. But since inversion is an
   -- involution, this is also `μ`. Hence, `c^2 = 1`, which implies `c = 1`.
   constructor
   haveI : is_haar_measure (measure.map Inv.inv μ) :=
-    (MulEquiv.inv G).haarMeasure_map μ continuous_inv continuous_inv
+    (MulEquiv.inv G).isHaarMeasure_map μ continuous_inv continuous_inv
   obtain ⟨c, cpos, clt, hc⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ measure.map Inv.inv μ = c • μ :=
     is_haar_measure_eq_smul_is_haar_measure _ _
   have : map Inv.inv (map Inv.inv μ) = c ^ 2 • μ := by
@@ -887,8 +888,8 @@ instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] : In
       this
   have : c = 1 := (ENNReal.pow_strictMono two_ne_zero).Injective this
   rw [measure.inv, hc, this, one_smul]
-#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.HaarMeasure.invInvariant
-#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.AddHaarMeasure.negInvariant
+#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
+#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant
 
 #print MeasureTheory.Measure.measurePreserving_zpow /-
 @[to_additive]
@@ -898,7 +899,7 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
     map_eq := by
       let f := @zpowGroupHom G _ n
       have hf : Continuous f := continuous_zpow n
-      haveI : (μ.map f).HaarMeasure :=
+      haveI : (μ.map f).IsHaarMeasure :=
         is_haar_measure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
       obtain ⟨C, -, -, hC⟩ := is_haar_measure_eq_smul_is_haar_measure (μ.map f) μ
       suffices C = 1 by rwa [this, one_smul] at hC 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module measure_theory.measure.haar.basic
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 599fffe78f0e11eb6a034e834ec51882167b9688
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.Topology.Algebra.Group.Compact
 /-!
 # Haar measure
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove the existence and uniqueness (up to scalar multiples) of Haar measure
 for a locally compact Hausdorff topological group.
 
Diff
@@ -184,7 +184,7 @@ theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonemp
 @[to_additive add_index_elim]
 theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
     ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by
-  have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this
+  have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this 
 #align measure_theory.measure.haar.index_elim MeasureTheory.Measure.haar.index_elim
 #align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.haar.addIndex_elim
 
@@ -201,7 +201,7 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
   apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_set_of_eq]; refine' subset.trans h1s _
   apply Union₂_subset; intro g₁ hg₁; rw [preimage_subset_iff]; intro g₂ hg₂
   have := h1t hg₂
-  rcases this with ⟨_, ⟨g₃, rfl⟩, A, ⟨hg₃, rfl⟩, h2V⟩; rw [mem_preimage, ← mul_assoc] at h2V
+  rcases this with ⟨_, ⟨g₃, rfl⟩, A, ⟨hg₃, rfl⟩, h2V⟩; rw [mem_preimage, ← mul_assoc] at h2V 
   exact mem_bUnion (Finset.mul_mem_mul hg₃ hg₁) h2V
 #align measure_theory.measure.haar.le_index_mul MeasureTheory.Measure.haar.le_index_mul
 #align measure_theory.measure.haar.le_add_index_mul MeasureTheory.Measure.haar.le_addIndex_mul
@@ -212,7 +212,7 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
 theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) :
     0 < index (K : Set G) V := by
   unfold index; rw [Nat.sInf_def, Nat.find_pos, mem_image]
-  · rintro ⟨t, h1t, h2t⟩; rw [Finset.card_eq_zero] at h2t; subst h2t
+  · rintro ⟨t, h1t, h2t⟩; rw [Finset.card_eq_zero] at h2t ; subst h2t
     obtain ⟨g, hg⟩ := K.interior_nonempty
     show g ∈ (∅ : Set G); convert h1t (interior_subset hg); symm; apply bUnion_empty
   · exact index_defined K.is_compact hV
@@ -243,7 +243,7 @@ theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
   apply union_subset <;> refine' subset.trans (by assumption) _ <;>
           apply bUnion_subset_bUnion_left <;>
         intro g hg <;>
-      simp only [mem_def] at hg <;>
+      simp only [mem_def] at hg  <;>
     simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
 #align measure_theory.measure.haar.index_union_le MeasureTheory.Measure.haar.index_union_le
 #align measure_theory.measure.haar.add_index_union_le MeasureTheory.Measure.haar.addIndex_union_le
@@ -262,7 +262,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     by
     intro K hK; apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_set_of_eq]
     intro g hg; rcases hK hg with ⟨_, ⟨g₀, rfl⟩, _, ⟨h1g₀, rfl⟩, h2g₀⟩
-    simp only [mem_preimage] at h2g₀
+    simp only [mem_preimage] at h2g₀ 
     simp only [mem_Union]; use g₀; constructor
     · simp only [Finset.mem_filter, h1g₀, true_and_iff]; use g
       simp only [hg, h2g₀, mem_inter_iff, mem_preimage, and_self_iff]
@@ -276,7 +276,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
   exact s.card_filter_le _
   apply finset.disjoint_filter.mpr
   rintro g₁ h1g₁ ⟨g₂, h1g₂, h2g₂⟩ ⟨g₃, h1g₃, h2g₃⟩
-  simp only [mem_preimage] at h1g₃ h1g₂
+  simp only [mem_preimage] at h1g₃ h1g₂ 
   refine' h.le_bot (_ : g₁⁻¹ ∈ _)
   constructor <;> simp only [Set.mem_inv, Set.mem_mul, exists_exists_and_eq_and, exists_and_left]
   · refine' ⟨_, h2g₂, (g₁ * g₂)⁻¹, _, _⟩; simp only [inv_inv, h1g₂]
@@ -295,7 +295,7 @@ theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (inte
   refine' ⟨s.map (Equiv.mulRight g⁻¹).toEmbedding, _, Finset.card_map _⟩
   · simp only [mem_set_of_eq]; refine' subset.trans (image_subset _ h1s) _
     rintro _ ⟨g₁, ⟨_, ⟨g₂, rfl⟩, ⟨_, ⟨hg₂, rfl⟩, hg₁⟩⟩, rfl⟩
-    simp only [mem_preimage] at hg₁;
+    simp only [mem_preimage] at hg₁ ;
     simp only [exists_prop, mem_Union, Finset.mem_map, Equiv.coe_mulRight, exists_exists_and_eq_and,
       mem_preimage, Equiv.toEmbedding_apply]
     refine' ⟨_, hg₂, _⟩; simp only [mul_assoc, hg₁, inv_mul_cancel_left]
@@ -365,7 +365,7 @@ theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Comp
 theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Compacts G}
     (hU : (interior U).Nonempty) (h : Disjoint (K₁.1 * U⁻¹) (K₂.1 * U⁻¹)) :
     prehaar (K₀ : Set G) U (K₁ ⊔ K₂) = prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂ := by
-  simp only [prehaar]; rw [div_add_div_same]; congr ; exact_mod_cast index_union_eq K₁ K₂ hU h
+  simp only [prehaar]; rw [div_add_div_same]; congr; exact_mod_cast index_union_eq K₁ K₂ hU h
 #align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.haar.prehaar_sup_eq
 #align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.haar.addPrehaar_sup_eq
 
@@ -442,14 +442,14 @@ theorem chaar_mem_haarProduct (K₀ : PositiveCompacts G) : chaar K₀ ∈ haarP
 theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
     chaar K₀ ∈ clPrehaar (K₀ : Set G) V :=
   by
-  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this
+  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this 
   exact this V
 #align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.haar.chaar_mem_clPrehaar
 #align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.haar.addCHaar_mem_clAddPrehaar
 
 @[to_additive add_chaar_nonneg]
 theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K := by
-  have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this; exact this.1
+  have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this ; exact this.1
 #align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.haar.chaar_nonneg
 #align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.haar.addCHaar_nonneg
 
@@ -812,12 +812,12 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [HaarMeasure μ] [LocallyC
        and therefore that it is itself such a neighborhood. -/
   obtain ⟨L, hL, hLE, hLpos, hLtop⟩ : ∃ L : Set G, MeasurableSet L ∧ L ⊆ E ∧ 0 < μ L ∧ μ L < ∞
   exact exists_subset_measure_lt_top hE hEpos
-  obtain ⟨K, hKL, hK, hKpos⟩ : ∃ (K : Set G)(H : K ⊆ L), IsCompact K ∧ 0 < μ K
+  obtain ⟨K, hKL, hK, hKpos⟩ : ∃ (K : Set G) (H : K ⊆ L), IsCompact K ∧ 0 < μ K
   exact MeasurableSet.exists_lt_isCompact_of_ne_top hL (ne_of_lt hLtop) hLpos
   have hKtop : μ K ≠ ∞ := by
     apply ne_top_of_le_ne_top (ne_of_lt hLtop)
     apply measure_mono hKL
-  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G)(H : U ⊇ K), IsOpen U ∧ μ U < μ K + μ K
+  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G) (H : U ⊇ K), IsOpen U ∧ μ U < μ K + μ K
   exact Set.exists_isOpen_lt_add K hKtop hKpos.ne'
   obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U
   exact compact_open_separated_mul_left hK hU hUK
@@ -831,10 +831,10 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [HaarMeasure μ] [LocallyC
       simp only [Set.singleton_subset_iff, hv]
     replace hKvsub := @measure_mono _ _ μ _ _ hKvsub
     have hcontr := lt_of_le_of_lt hKvsub hμUK
-    rw [measure_union hKv (IsCompact.measurableSet hK)] at hcontr
+    rw [measure_union hKv (IsCompact.measurableSet hK)] at hcontr 
     have hKtranslate : μ ({v} * K) = μ K := by
       simp only [singleton_mul, image_mul_left, measure_preimage_mul]
-    rw [hKtranslate, lt_self_iff_false] at hcontr
+    rw [hKtranslate, lt_self_iff_false] at hcontr 
     assumption
   suffices : V ⊆ E / E; exact Filter.mem_of_superset hV1 this
   intro v hvV
@@ -871,7 +871,7 @@ instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] : In
     simp only [hc, smul_smul, pow_two, measure.map_smul]
   have μeq : μ = c ^ 2 • μ :=
     by
-    rw [map_map continuous_inv.measurable continuous_inv.measurable] at this
+    rw [map_map continuous_inv.measurable continuous_inv.measurable] at this 
     · simpa only [inv_involutive, involutive.comp_self, map_id]
     all_goals infer_instance
   have K : positive_compacts G := Classical.arbitrary _
@@ -898,14 +898,14 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
       haveI : (μ.map f).HaarMeasure :=
         is_haar_measure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
       obtain ⟨C, -, -, hC⟩ := is_haar_measure_eq_smul_is_haar_measure (μ.map f) μ
-      suffices C = 1 by rwa [this, one_smul] at hC
+      suffices C = 1 by rwa [this, one_smul] at hC 
       have h_univ : (μ.map f) univ = μ univ := by
         rw [map_apply_of_ae_measurable hf.measurable.ae_measurable MeasurableSet.univ,
           preimage_univ]
       have hμ₀ : μ univ ≠ 0 := is_open_pos_measure.open_pos univ isOpen_univ univ_nonempty
       have hμ₁ : μ univ ≠ ∞ := compact_space.is_finite_measure.measure_univ_lt_top.ne
       rwa [hC, smul_apply, Algebra.id.smul_eq_mul, mul_comm, ← ENNReal.eq_div_iff hμ₀ hμ₁,
-        ENNReal.div_self hμ₀ hμ₁] at h_univ }
+        ENNReal.div_self hμ₀ hμ₁] at h_univ  }
 #align measure_theory.measure.measure_preserving_zpow MeasureTheory.Measure.measurePreserving_zpow
 #align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
 -/
Diff
@@ -88,25 +88,30 @@ variable {G : Type _} [Group G]
 
 namespace Haar
 
+#print MeasureTheory.Measure.haar.index /-
 /-- The index or Haar covering number or ratio of `K` w.r.t. `V`, denoted `(K : V)`:
   it is the smallest number of (left) translates of `V` that is necessary to cover `K`.
   It is defined to be 0 if no finite number of translates cover `K`. -/
 @[to_additive add_index "additive version of `measure_theory.measure.haar.index`"]
 def index (K V : Set G) : ℕ :=
   sInf <| Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V }
-#align measure_theory.measure.haar.index MeasureTheory.Measure.Haar.index
-#align measure_theory.measure.haar.add_index MeasureTheory.Measure.Haar.addIndex
+#align measure_theory.measure.haar.index MeasureTheory.Measure.haar.index
+#align measure_theory.measure.haar.add_index MeasureTheory.Measure.haar.addIndex
+-/
 
+#print MeasureTheory.Measure.haar.index_empty /-
 @[to_additive add_index_empty]
 theorem index_empty {V : Set G} : index ∅ V = 0 :=
   by
   simp only [index, Nat.sInf_eq_zero]; left; use ∅
   simp only [Finset.card_empty, empty_subset, mem_set_of_eq, eq_self_iff_true, and_self_iff]
-#align measure_theory.measure.haar.index_empty MeasureTheory.Measure.Haar.index_empty
-#align measure_theory.measure.haar.add_index_empty MeasureTheory.Measure.Haar.add_index_empty
+#align measure_theory.measure.haar.index_empty MeasureTheory.Measure.haar.index_empty
+#align measure_theory.measure.haar.add_index_empty MeasureTheory.Measure.haar.addIndex_empty
+-/
 
 variable [TopologicalSpace G]
 
+#print MeasureTheory.Measure.haar.prehaar /-
 /-- `prehaar K₀ U K` is a weighted version of the index, defined as `(K : U)/(K₀ : U)`.
   In the applications `K₀` is compact with non-empty interior, `U` is open containing `1`,
   and `K` is any compact set.
@@ -115,35 +120,38 @@ variable [TopologicalSpace G]
 @[to_additive "additive version of `measure_theory.measure.haar.prehaar`"]
 def prehaar (K₀ U : Set G) (K : Compacts G) : ℝ :=
   (index (K : Set G) U : ℝ) / index K₀ U
-#align measure_theory.measure.haar.prehaar MeasureTheory.Measure.Haar.prehaar
-#align measure_theory.measure.haar.add_prehaar MeasureTheory.Measure.Haar.addPrehaar
+#align measure_theory.measure.haar.prehaar MeasureTheory.Measure.haar.prehaar
+#align measure_theory.measure.haar.add_prehaar MeasureTheory.Measure.haar.addPrehaar
+-/
 
 @[to_additive]
 theorem prehaar_empty (K₀ : PositiveCompacts G) {U : Set G} : prehaar (K₀ : Set G) U ⊥ = 0 := by
   rw [prehaar, compacts.coe_bot, index_empty, Nat.cast_zero, zero_div]
-#align measure_theory.measure.haar.prehaar_empty MeasureTheory.Measure.Haar.prehaar_empty
-#align measure_theory.measure.haar.add_prehaar_empty MeasureTheory.Measure.Haar.add_prehaar_empty
+#align measure_theory.measure.haar.prehaar_empty MeasureTheory.Measure.haar.prehaar_empty
+#align measure_theory.measure.haar.add_prehaar_empty MeasureTheory.Measure.haar.addPrehaar_empty
 
 @[to_additive]
 theorem prehaar_nonneg (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G) :
     0 ≤ prehaar (K₀ : Set G) U K := by apply div_nonneg <;> norm_cast <;> apply zero_le
-#align measure_theory.measure.haar.prehaar_nonneg MeasureTheory.Measure.Haar.prehaar_nonneg
-#align measure_theory.measure.haar.add_prehaar_nonneg MeasureTheory.Measure.Haar.add_prehaar_nonneg
+#align measure_theory.measure.haar.prehaar_nonneg MeasureTheory.Measure.haar.prehaar_nonneg
+#align measure_theory.measure.haar.add_prehaar_nonneg MeasureTheory.Measure.haar.addPrehaar_nonneg
 
+#print MeasureTheory.Measure.haar.haarProduct /-
 /-- `haar_product K₀` is the product of intervals `[0, (K : K₀)]`, for all compact sets `K`.
   For all `U`, we can show that `prehaar K₀ U ∈ haar_product K₀`. -/
 @[to_additive "additive version of `measure_theory.measure.haar.haar_product`"]
 def haarProduct (K₀ : Set G) : Set (Compacts G → ℝ) :=
   pi univ fun K => Icc 0 <| index (K : Set G) K₀
-#align measure_theory.measure.haar.haar_product MeasureTheory.Measure.Haar.haarProduct
-#align measure_theory.measure.haar.add_haar_product MeasureTheory.Measure.Haar.addHaarProduct
+#align measure_theory.measure.haar.haar_product MeasureTheory.Measure.haar.haarProduct
+#align measure_theory.measure.haar.add_haar_product MeasureTheory.Measure.haar.addHaarProduct
+-/
 
 @[simp, to_additive]
 theorem mem_prehaar_empty {K₀ : Set G} {f : Compacts G → ℝ} :
     f ∈ haarProduct K₀ ↔ ∀ K : Compacts G, f K ∈ Icc (0 : ℝ) (index (K : Set G) K₀) := by
   simp only [haar_product, pi, forall_prop_of_true, mem_univ, mem_set_of_eq]
-#align measure_theory.measure.haar.mem_prehaar_empty MeasureTheory.Measure.Haar.mem_prehaar_empty
-#align measure_theory.measure.haar.mem_add_prehaar_empty MeasureTheory.Measure.Haar.mem_add_prehaar_empty
+#align measure_theory.measure.haar.mem_prehaar_empty MeasureTheory.Measure.haar.mem_prehaar_empty
+#align measure_theory.measure.haar.mem_add_prehaar_empty MeasureTheory.Measure.haar.mem_addPrehaar_empty
 
 /-- The closure of the collection of elements of the form `prehaar K₀ U`,
   for `U` open neighbourhoods of `1`, contained in `V`. The closure is taken in the space
@@ -153,8 +161,8 @@ theorem mem_prehaar_empty {K₀ : Set G} {f : Compacts G → ℝ} :
 @[to_additive "additive version of `measure_theory.measure.haar.cl_prehaar`"]
 def clPrehaar (K₀ : Set G) (V : OpenNhdsOf (1 : G)) : Set (Compacts G → ℝ) :=
   closure <| prehaar K₀ '' { U : Set G | U ⊆ V.1 ∧ IsOpen U ∧ (1 : G) ∈ U }
-#align measure_theory.measure.haar.cl_prehaar MeasureTheory.Measure.Haar.clPrehaar
-#align measure_theory.measure.haar.cl_add_prehaar MeasureTheory.Measure.Haar.clAddPrehaar
+#align measure_theory.measure.haar.cl_prehaar MeasureTheory.Measure.haar.clPrehaar
+#align measure_theory.measure.haar.cl_add_prehaar MeasureTheory.Measure.haar.clAddPrehaar
 
 variable [TopologicalGroup G]
 
@@ -170,16 +178,17 @@ variable [TopologicalGroup G]
 theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
     ∃ n : ℕ, n ∈ Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V } := by
   rcases compact_covered_by_mul_left_translates hK hV with ⟨t, ht⟩; exact ⟨t.card, t, ht, rfl⟩
-#align measure_theory.measure.haar.index_defined MeasureTheory.Measure.Haar.index_defined
-#align measure_theory.measure.haar.add_index_defined MeasureTheory.Measure.Haar.add_index_defined
+#align measure_theory.measure.haar.index_defined MeasureTheory.Measure.haar.index_defined
+#align measure_theory.measure.haar.add_index_defined MeasureTheory.Measure.haar.addIndex_defined
 
 @[to_additive add_index_elim]
 theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
     ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by
   have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this
-#align measure_theory.measure.haar.index_elim MeasureTheory.Measure.Haar.index_elim
-#align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.Haar.add_index_elim
+#align measure_theory.measure.haar.index_elim MeasureTheory.Measure.haar.index_elim
+#align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.haar.addIndex_elim
 
+#print MeasureTheory.Measure.haar.le_index_mul /-
 @[to_additive le_add_index_mul]
 theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
     (hV : (interior V).Nonempty) :
@@ -194,9 +203,11 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
   have := h1t hg₂
   rcases this with ⟨_, ⟨g₃, rfl⟩, A, ⟨hg₃, rfl⟩, h2V⟩; rw [mem_preimage, ← mul_assoc] at h2V
   exact mem_bUnion (Finset.mul_mem_mul hg₃ hg₁) h2V
-#align measure_theory.measure.haar.le_index_mul MeasureTheory.Measure.Haar.le_index_mul
-#align measure_theory.measure.haar.le_add_index_mul MeasureTheory.Measure.Haar.le_add_index_mul
+#align measure_theory.measure.haar.le_index_mul MeasureTheory.Measure.haar.le_index_mul
+#align measure_theory.measure.haar.le_add_index_mul MeasureTheory.Measure.haar.le_addIndex_mul
+-/
 
+#print MeasureTheory.Measure.haar.index_pos /-
 @[to_additive add_index_pos]
 theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) :
     0 < index (K : Set G) V := by
@@ -205,17 +216,20 @@ theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonemp
     obtain ⟨g, hg⟩ := K.interior_nonempty
     show g ∈ (∅ : Set G); convert h1t (interior_subset hg); symm; apply bUnion_empty
   · exact index_defined K.is_compact hV
-#align measure_theory.measure.haar.index_pos MeasureTheory.Measure.Haar.index_pos
-#align measure_theory.measure.haar.add_index_pos MeasureTheory.Measure.Haar.add_index_pos
+#align measure_theory.measure.haar.index_pos MeasureTheory.Measure.haar.index_pos
+#align measure_theory.measure.haar.add_index_pos MeasureTheory.Measure.haar.addIndex_pos
+-/
 
+#print MeasureTheory.Measure.haar.index_mono /-
 @[to_additive add_index_mono]
 theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (interior V).Nonempty) :
     index K V ≤ index K' V :=
   by
   rcases index_elim hK' hV with ⟨s, h1s, h2s⟩
   apply Nat.sInf_le; rw [mem_image]; refine' ⟨s, subset.trans h h1s, h2s⟩
-#align measure_theory.measure.haar.index_mono MeasureTheory.Measure.Haar.index_mono
-#align measure_theory.measure.haar.add_index_mono MeasureTheory.Measure.Haar.add_index_mono
+#align measure_theory.measure.haar.index_mono MeasureTheory.Measure.haar.index_mono
+#align measure_theory.measure.haar.add_index_mono MeasureTheory.Measure.haar.addIndex_mono
+-/
 
 @[to_additive add_index_union_le]
 theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty) :
@@ -231,8 +245,8 @@ theorem index_union_le (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
         intro g hg <;>
       simp only [mem_def] at hg <;>
     simp only [mem_def, Multiset.mem_union, Finset.union_val, hg, or_true_iff, true_or_iff]
-#align measure_theory.measure.haar.index_union_le MeasureTheory.Measure.Haar.index_union_le
-#align measure_theory.measure.haar.add_index_union_le MeasureTheory.Measure.Haar.add_index_union_le
+#align measure_theory.measure.haar.index_union_le MeasureTheory.Measure.haar.index_union_le
+#align measure_theory.measure.haar.add_index_union_le MeasureTheory.Measure.haar.addIndex_union_le
 
 @[to_additive add_index_union_eq]
 theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
@@ -269,8 +283,8 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     simp only [mul_inv_rev, mul_inv_cancel_left]
   · refine' ⟨_, h2g₃, (g₁ * g₃)⁻¹, _, _⟩; simp only [inv_inv, h1g₃]
     simp only [mul_inv_rev, mul_inv_cancel_left]
-#align measure_theory.measure.haar.index_union_eq MeasureTheory.Measure.Haar.index_union_eq
-#align measure_theory.measure.haar.add_index_union_eq MeasureTheory.Measure.Haar.add_index_union_eq
+#align measure_theory.measure.haar.index_union_eq MeasureTheory.Measure.haar.index_union_eq
+#align measure_theory.measure.haar.add_index_union_eq MeasureTheory.Measure.haar.addIndex_union_eq
 
 @[to_additive add_left_add_index_le]
 theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (interior V).Nonempty)
@@ -285,8 +299,8 @@ theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (inte
     simp only [exists_prop, mem_Union, Finset.mem_map, Equiv.coe_mulRight, exists_exists_and_eq_and,
       mem_preimage, Equiv.toEmbedding_apply]
     refine' ⟨_, hg₂, _⟩; simp only [mul_assoc, hg₁, inv_mul_cancel_left]
-#align measure_theory.measure.haar.mul_left_index_le MeasureTheory.Measure.Haar.mul_left_index_le
-#align measure_theory.measure.haar.add_left_add_index_le MeasureTheory.Measure.Haar.add_left_add_index_le
+#align measure_theory.measure.haar.mul_left_index_le MeasureTheory.Measure.haar.mul_left_index_le
+#align measure_theory.measure.haar.add_left_add_index_le MeasureTheory.Measure.haar.add_left_addIndex_le
 
 @[to_additive is_left_invariant_add_index]
 theorem is_left_invariant_index {K : Set G} (hK : IsCompact K) (g : G) {V : Set G}
@@ -295,8 +309,8 @@ theorem is_left_invariant_index {K : Set G} (hK : IsCompact K) (g : G) {V : Set
   refine' le_antisymm (mul_left_index_le hK hV g) _
   convert mul_left_index_le (hK.image <| continuous_mul_left g) hV g⁻¹
   rw [image_image]; symm; convert image_id' _; ext h; apply inv_mul_cancel_left
-#align measure_theory.measure.haar.is_left_invariant_index MeasureTheory.Measure.Haar.is_left_invariant_index
-#align measure_theory.measure.haar.is_left_invariant_add_index MeasureTheory.Measure.Haar.is_left_invariant_add_index
+#align measure_theory.measure.haar.is_left_invariant_index MeasureTheory.Measure.haar.is_left_invariant_index
+#align measure_theory.measure.haar.is_left_invariant_add_index MeasureTheory.Measure.haar.is_left_invariant_addIndex
 
 /-!
 ### Lemmas about `prehaar`
@@ -310,15 +324,15 @@ theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G
   unfold prehaar; rw [div_le_iff] <;> norm_cast
   · apply le_index_mul K₀ K hU
   · exact index_pos K₀ hU
-#align measure_theory.measure.haar.prehaar_le_index MeasureTheory.Measure.Haar.prehaar_le_index
-#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.Haar.add_prehaar_le_add_index
+#align measure_theory.measure.haar.prehaar_le_index MeasureTheory.Measure.haar.prehaar_le_index
+#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_add_index
 
 @[to_additive]
 theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) {K : Set G}
     (h1K : IsCompact K) (h2K : (interior K).Nonempty) : 0 < prehaar (K₀ : Set G) U ⟨K, h1K⟩ := by
   apply div_pos <;> norm_cast; apply index_pos ⟨⟨K, h1K⟩, h2K⟩ hU; exact index_pos K₀ hU
-#align measure_theory.measure.haar.prehaar_pos MeasureTheory.Measure.Haar.prehaar_pos
-#align measure_theory.measure.haar.add_prehaar_pos MeasureTheory.Measure.Haar.add_prehaar_pos
+#align measure_theory.measure.haar.prehaar_pos MeasureTheory.Measure.haar.prehaar_pos
+#align measure_theory.measure.haar.add_prehaar_pos MeasureTheory.Measure.haar.addPrehaar_pos
 
 @[to_additive]
 theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
@@ -327,15 +341,15 @@ theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).
   by
   simp only [prehaar]; rw [div_le_div_right]; exact_mod_cast index_mono K₂.2 h hU
   exact_mod_cast index_pos K₀ hU
-#align measure_theory.measure.haar.prehaar_mono MeasureTheory.Measure.Haar.prehaar_mono
-#align measure_theory.measure.haar.add_prehaar_mono MeasureTheory.Measure.Haar.add_prehaar_mono
+#align measure_theory.measure.haar.prehaar_mono MeasureTheory.Measure.haar.prehaar_mono
+#align measure_theory.measure.haar.add_prehaar_mono MeasureTheory.Measure.haar.addPrehaar_mono
 
 @[to_additive]
 theorem prehaar_self {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty) :
     prehaar (K₀ : Set G) U K₀.toCompacts = 1 :=
   div_self <| ne_of_gt <| by exact_mod_cast index_pos K₀ hU
-#align measure_theory.measure.haar.prehaar_self MeasureTheory.Measure.Haar.prehaar_self
-#align measure_theory.measure.haar.add_prehaar_self MeasureTheory.Measure.Haar.add_prehaar_self
+#align measure_theory.measure.haar.prehaar_self MeasureTheory.Measure.haar.prehaar_self
+#align measure_theory.measure.haar.add_prehaar_self MeasureTheory.Measure.haar.addPrehaar_self
 
 @[to_additive]
 theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Compacts G)
@@ -344,36 +358,38 @@ theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Comp
   by
   simp only [prehaar]; rw [div_add_div_same, div_le_div_right]
   exact_mod_cast index_union_le K₁ K₂ hU; exact_mod_cast index_pos K₀ hU
-#align measure_theory.measure.haar.prehaar_sup_le MeasureTheory.Measure.Haar.prehaar_sup_le
-#align measure_theory.measure.haar.add_prehaar_sup_le MeasureTheory.Measure.Haar.add_prehaar_sup_le
+#align measure_theory.measure.haar.prehaar_sup_le MeasureTheory.Measure.haar.prehaar_sup_le
+#align measure_theory.measure.haar.add_prehaar_sup_le MeasureTheory.Measure.haar.addPrehaar_sup_le
 
 @[to_additive]
 theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Compacts G}
     (hU : (interior U).Nonempty) (h : Disjoint (K₁.1 * U⁻¹) (K₂.1 * U⁻¹)) :
     prehaar (K₀ : Set G) U (K₁ ⊔ K₂) = prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂ := by
   simp only [prehaar]; rw [div_add_div_same]; congr ; exact_mod_cast index_union_eq K₁ K₂ hU h
-#align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.Haar.prehaar_sup_eq
-#align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.Haar.add_prehaar_sup_eq
+#align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.haar.prehaar_sup_eq
+#align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.haar.addPrehaar_sup_eq
 
 @[to_additive]
 theorem is_left_invariant_prehaar {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
     (g : G) (K : Compacts G) :
     prehaar (K₀ : Set G) U (K.map _ <| continuous_mul_left g) = prehaar (K₀ : Set G) U K := by
   simp only [prehaar, compacts.coe_map, is_left_invariant_index K.is_compact _ hU]
-#align measure_theory.measure.haar.is_left_invariant_prehaar MeasureTheory.Measure.Haar.is_left_invariant_prehaar
-#align measure_theory.measure.haar.is_left_invariant_add_prehaar MeasureTheory.Measure.Haar.is_left_invariant_add_prehaar
+#align measure_theory.measure.haar.is_left_invariant_prehaar MeasureTheory.Measure.haar.is_left_invariant_prehaar
+#align measure_theory.measure.haar.is_left_invariant_add_prehaar MeasureTheory.Measure.haar.is_left_invariant_addPrehaar
 
 /-!
 ### Lemmas about `haar_product`
 -/
 
 
+#print MeasureTheory.Measure.haar.prehaar_mem_haarProduct /-
 @[to_additive]
 theorem prehaar_mem_haarProduct (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) :
     prehaar (K₀ : Set G) U ∈ haarProduct (K₀ : Set G) := by rintro ⟨K, hK⟩ h2K; rw [mem_Icc];
   exact ⟨prehaar_nonneg K₀ _, prehaar_le_index K₀ _ hU⟩
-#align measure_theory.measure.haar.prehaar_mem_haar_product MeasureTheory.Measure.Haar.prehaar_mem_haarProduct
-#align measure_theory.measure.haar.add_prehaar_mem_add_haar_product MeasureTheory.Measure.Haar.add_prehaar_mem_add_haarProduct
+#align measure_theory.measure.haar.prehaar_mem_haar_product MeasureTheory.Measure.haar.prehaar_mem_haarProduct
+#align measure_theory.measure.haar.add_prehaar_mem_add_haar_product MeasureTheory.Measure.haar.addPrehaar_mem_addHaarProduct
+-/
 
 @[to_additive]
 theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
@@ -392,14 +408,15 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
   · simp only [mem_Inter]; rintro ⟨V, hV⟩ h2V; apply subset_closure
     apply mem_image_of_mem; rw [mem_set_of_eq]
     exact ⟨subset.trans (Inter_subset _ ⟨V, hV⟩) (Inter_subset _ h2V), h1V₀, h2V₀⟩
-#align measure_theory.measure.haar.nonempty_Inter_cl_prehaar MeasureTheory.Measure.Haar.nonempty_iInter_clPrehaar
-#align measure_theory.measure.haar.nonempty_Inter_cl_add_prehaar MeasureTheory.Measure.Haar.nonempty_iInter_cl_add_prehaar
+#align measure_theory.measure.haar.nonempty_Inter_cl_prehaar MeasureTheory.Measure.haar.nonempty_iInter_clPrehaar
+#align measure_theory.measure.haar.nonempty_Inter_cl_add_prehaar MeasureTheory.Measure.haar.nonempty_iInter_clAddPrehaar
 
 /-!
 ### Lemmas about `chaar`
 -/
 
 
+#print MeasureTheory.Measure.haar.chaar /-
 /-- This is the "limit" of `prehaar K₀ U K` as `U` becomes a smaller and smaller open
   neighborhood of `(1 : G)`. More precisely, it is defined to be an arbitrary element
   in the intersection of all the sets `cl_prehaar K₀ V` in `haar_product K₀`.
@@ -409,14 +426,17 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
 @[to_additive add_chaar "additive version of `measure_theory.measure.haar.chaar`"]
 def chaar (K₀ : PositiveCompacts G) (K : Compacts G) : ℝ :=
   Classical.choose (nonempty_iInter_clPrehaar K₀) K
-#align measure_theory.measure.haar.chaar MeasureTheory.Measure.Haar.chaar
-#align measure_theory.measure.haar.add_chaar MeasureTheory.Measure.Haar.addChaar
+#align measure_theory.measure.haar.chaar MeasureTheory.Measure.haar.chaar
+#align measure_theory.measure.haar.add_chaar MeasureTheory.Measure.haar.addCHaar
+-/
 
+#print MeasureTheory.Measure.haar.chaar_mem_haarProduct /-
 @[to_additive add_chaar_mem_add_haar_product]
 theorem chaar_mem_haarProduct (K₀ : PositiveCompacts G) : chaar K₀ ∈ haarProduct (K₀ : Set G) :=
   (Classical.choose_spec (nonempty_iInter_clPrehaar K₀)).1
-#align measure_theory.measure.haar.chaar_mem_haar_product MeasureTheory.Measure.Haar.chaar_mem_haarProduct
-#align measure_theory.measure.haar.add_chaar_mem_add_haar_product MeasureTheory.Measure.Haar.add_chaar_mem_add_haarProduct
+#align measure_theory.measure.haar.chaar_mem_haar_product MeasureTheory.Measure.haar.chaar_mem_haarProduct
+#align measure_theory.measure.haar.add_chaar_mem_add_haar_product MeasureTheory.Measure.haar.addCHaar_mem_addHaarProduct
+-/
 
 @[to_additive add_chaar_mem_cl_add_prehaar]
 theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
@@ -424,14 +444,14 @@ theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G))
   by
   have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this
   exact this V
-#align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.Haar.chaar_mem_clPrehaar
-#align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.Haar.add_chaar_mem_cl_add_prehaar
+#align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.haar.chaar_mem_clPrehaar
+#align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.haar.addCHaar_mem_clAddPrehaar
 
 @[to_additive add_chaar_nonneg]
 theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K := by
   have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this; exact this.1
-#align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.Haar.chaar_nonneg
-#align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.Haar.add_chaar_nonneg
+#align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.haar.chaar_nonneg
+#align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.haar.addCHaar_nonneg
 
 @[to_additive add_chaar_empty]
 theorem chaar_empty (K₀ : PositiveCompacts G) : chaar K₀ ⊥ = 0 :=
@@ -443,8 +463,8 @@ theorem chaar_empty (K₀ : PositiveCompacts G) : chaar K₀ ⊥ = 0 :=
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; apply prehaar_empty
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
-#align measure_theory.measure.haar.chaar_empty MeasureTheory.Measure.Haar.chaar_empty
-#align measure_theory.measure.haar.add_chaar_empty MeasureTheory.Measure.Haar.add_chaar_empty
+#align measure_theory.measure.haar.chaar_empty MeasureTheory.Measure.haar.chaar_empty
+#align measure_theory.measure.haar.add_chaar_empty MeasureTheory.Measure.haar.addCHaar_empty
 
 @[to_additive add_chaar_self]
 theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1 :=
@@ -457,8 +477,8 @@ theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; apply prehaar_self
     rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
-#align measure_theory.measure.haar.chaar_self MeasureTheory.Measure.Haar.chaar_self
-#align measure_theory.measure.haar.add_chaar_self MeasureTheory.Measure.Haar.add_chaar_self
+#align measure_theory.measure.haar.chaar_self MeasureTheory.Measure.haar.chaar_self
+#align measure_theory.measure.haar.add_chaar_self MeasureTheory.Measure.haar.addCHaar_self
 
 @[to_additive add_chaar_mono]
 theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂) :
@@ -472,8 +492,8 @@ theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
     apply prehaar_mono _ h; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
-#align measure_theory.measure.haar.chaar_mono MeasureTheory.Measure.Haar.chaar_mono
-#align measure_theory.measure.haar.add_chaar_mono MeasureTheory.Measure.Haar.add_chaar_mono
+#align measure_theory.measure.haar.chaar_mono MeasureTheory.Measure.haar.chaar_mono
+#align measure_theory.measure.haar.add_chaar_mono MeasureTheory.Measure.haar.addCHaar_mono
 
 @[to_additive add_chaar_sup_le]
 theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
@@ -489,8 +509,8 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
     apply prehaar_sup_le; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
-#align measure_theory.measure.haar.chaar_sup_le MeasureTheory.Measure.Haar.chaar_sup_le
-#align measure_theory.measure.haar.add_chaar_sup_le MeasureTheory.Measure.Haar.add_chaar_sup_le
+#align measure_theory.measure.haar.chaar_sup_le MeasureTheory.Measure.haar.chaar_sup_le
+#align measure_theory.measure.haar.add_chaar_sup_le MeasureTheory.Measure.haar.addCHaar_sup_le
 
 @[to_additive add_chaar_sup_eq]
 theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G}
@@ -525,8 +545,8 @@ theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compac
       · refine' subset.trans (mul_subset_mul subset.rfl _) h2L₂
         exact subset.trans (inv_subset.mpr h1U) (inter_subset_right _ _)
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
-#align measure_theory.measure.haar.chaar_sup_eq MeasureTheory.Measure.Haar.chaar_sup_eq
-#align measure_theory.measure.haar.add_chaar_sup_eq MeasureTheory.Measure.Haar.add_chaar_sup_eq
+#align measure_theory.measure.haar.chaar_sup_eq MeasureTheory.Measure.haar.chaar_sup_eq
+#align measure_theory.measure.haar.add_chaar_sup_eq MeasureTheory.Measure.haar.addCHaar_sup_eq
 
 @[to_additive is_left_invariant_add_chaar]
 theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
@@ -541,11 +561,12 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact
     simp only [mem_singleton_iff, mem_preimage, eval, sub_eq_zero]
     apply is_left_invariant_prehaar; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
-#align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.Haar.is_left_invariant_chaar
-#align measure_theory.measure.haar.is_left_invariant_add_chaar MeasureTheory.Measure.Haar.is_left_invariant_add_chaar
+#align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.haar.is_left_invariant_chaar
+#align measure_theory.measure.haar.is_left_invariant_add_chaar MeasureTheory.Measure.haar.is_left_invariant_addCHaar
 
 variable [T2Space G]
 
+#print MeasureTheory.Measure.haar.haarContent /-
 /-- The function `chaar` interpreted in `ℝ≥0`, as a content -/
 @[to_additive "additive version of `measure_theory.measure.haar.haar_content`"]
 def haarContent (K₀ : PositiveCompacts G) : Content G
@@ -554,8 +575,9 @@ def haarContent (K₀ : PositiveCompacts G) : Content G
   mono' K₁ K₂ h := by simp only [← NNReal.coe_le_coe, Subtype.coe_mk, chaar_mono, h]
   sup_disjoint' K₁ K₂ h := by simp only [chaar_sup_eq h]; rfl
   sup_le' K₁ K₂ := by simp only [← NNReal.coe_le_coe, NNReal.coe_add, Subtype.coe_mk, chaar_sup_le]
-#align measure_theory.measure.haar.haar_content MeasureTheory.Measure.Haar.haarContent
-#align measure_theory.measure.haar.add_haar_content MeasureTheory.Measure.Haar.addHaarContent
+#align measure_theory.measure.haar.haar_content MeasureTheory.Measure.haar.haarContent
+#align measure_theory.measure.haar.add_haar_content MeasureTheory.Measure.haar.addHaarContent
+-/
 
 /-! We only prove the properties for `haar_content` that we use at least twice below. -/
 
@@ -564,15 +586,17 @@ def haarContent (K₀ : PositiveCompacts G) : Content G
 theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
     haarContent K₀ K = show NNReal from ⟨chaar K₀ K, chaar_nonneg _ _⟩ :=
   rfl
-#align measure_theory.measure.haar.haar_content_apply MeasureTheory.Measure.Haar.haarContent_apply
-#align measure_theory.measure.haar.add_haar_content_apply MeasureTheory.Measure.Haar.add_haar_content_apply
+#align measure_theory.measure.haar.haar_content_apply MeasureTheory.Measure.haar.haarContent_apply
+#align measure_theory.measure.haar.add_haar_content_apply MeasureTheory.Measure.haar.addHaarContent_apply
 
+#print MeasureTheory.Measure.haar.haarContent_self /-
 /-- The variant of `chaar_self` for `haar_content` -/
 @[to_additive "The variant of `add_chaar_self` for `add_haar_content`."]
 theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 := by
   simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_eq_coe, chaar_self]; rfl
-#align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.Haar.haarContent_self
-#align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.Haar.add_haarContent_self
+#align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.haar.haarContent_self
+#align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.haar.addHaarContent_self
+-/
 
 /-- The variant of `is_left_invariant_chaar` for `haar_content` -/
 @[to_additive "The variant of `is_left_invariant_add_chaar` for `add_haar_content`"]
@@ -580,8 +604,8 @@ theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : C
     haarContent K₀ (K.map _ <| continuous_mul_left g) = haarContent K₀ K := by
   simpa only [ENNReal.coe_eq_coe, ← NNReal.coe_eq, haar_content_apply] using
     is_left_invariant_chaar g K
-#align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.Haar.is_left_invariant_haarContent
-#align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.Haar.is_left_invariant_add_haarContent
+#align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
+#align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
 
 @[to_additive]
 theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
@@ -591,8 +615,8 @@ theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
   rw [content.outer_measure_eq_infi]
   refine' le_iInf₂ fun U hU => le_iInf fun hK₀ => le_trans _ <| le_iSup₂ K₀.to_compacts hK₀
   exact haar_content_self.ge
-#align measure_theory.measure.haar.haar_content_outer_measure_self_pos MeasureTheory.Measure.Haar.haarContent_outerMeasure_self_pos
-#align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.Haar.add_haarContent_outerMeasure_self_pos
+#align measure_theory.measure.haar.haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.haarContent_outerMeasure_self_pos
+#align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.addHaarContent_outerMeasure_self_pos
 
 end Haar
 
@@ -605,6 +629,7 @@ open Haar
 
 variable [TopologicalSpace G] [T2Space G] [TopologicalGroup G] [MeasurableSpace G] [BorelSpace G]
 
+#print MeasureTheory.Measure.haarMeasure /-
 /-- The Haar measure on the locally compact group `G`, scaled so that `haar_measure K₀ K₀ = 1`. -/
 @[to_additive
       "The Haar measure on the locally compact additive group `G`,\nscaled so that `add_haar_measure K₀ K₀ = 1`."]
@@ -612,6 +637,7 @@ def haarMeasure (K₀ : PositiveCompacts G) : Measure G :=
   ((haarContent K₀).OuterMeasure K₀)⁻¹ • (haarContent K₀).Measure
 #align measure_theory.measure.haar_measure MeasureTheory.Measure.haarMeasure
 #align measure_theory.measure.add_haar_measure MeasureTheory.Measure.addHaarMeasure
+-/
 
 @[to_additive]
 theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
@@ -620,11 +646,11 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
   change ((haar_content K₀).OuterMeasure K₀)⁻¹ * (haar_content K₀).Measure s = _
   simp only [hs, div_eq_mul_inv, mul_comm, content.measure_apply]
 #align measure_theory.measure.haar_measure_apply MeasureTheory.Measure.haarMeasure_apply
-#align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.add_haarMeasure_apply
+#align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.addHaarMeasure_apply
 
 @[to_additive]
-instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
-    IsMulLeftInvariant (haarMeasure K₀) :=
+instance mulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
+    MulLeftInvariant (haarMeasure K₀) :=
   by
   rw [← forall_measure_preimage_mul_iff]
   intro g A hA
@@ -632,9 +658,10 @@ instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
   congr 1
   apply content.is_mul_left_invariant_outer_measure
   apply is_left_invariant_haar_content
-#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.isMulLeftInvariant_haarMeasure
-#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.is_add_left_invariant_add_haarMeasure
+#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.mulLeftInvariant_haarMeasure
+#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.addLeftInvariant_addHaarMeasure
 
+#print MeasureTheory.Measure.haarMeasure_self /-
 @[to_additive]
 theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1 :=
   by
@@ -643,8 +670,10 @@ theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1
   · rw [← pos_iff_ne_zero]; exact haar_content_outer_measure_self_pos
   · exact (content.outer_measure_lt_top_of_is_compact _ K₀.is_compact).Ne
 #align measure_theory.measure.haar_measure_self MeasureTheory.Measure.haarMeasure_self
-#align measure_theory.measure.add_haar_measure_self MeasureTheory.Measure.add_haarMeasure_self
+#align measure_theory.measure.add_haar_measure_self MeasureTheory.Measure.addHaarMeasure_self
+-/
 
+#print MeasureTheory.Measure.regular_haarMeasure /-
 /-- The Haar measure is regular. -/
 @[to_additive "The additive Haar measure is regular."]
 instance regular_haarMeasure {K₀ : PositiveCompacts G} : (haarMeasure K₀).regular :=
@@ -654,30 +683,36 @@ instance regular_haarMeasure {K₀ : PositiveCompacts G} : (haarMeasure K₀).re
   rw [ENNReal.inv_ne_top]
   exact haar_content_outer_measure_self_pos.ne'
 #align measure_theory.measure.regular_haar_measure MeasureTheory.Measure.regular_haarMeasure
-#align measure_theory.measure.regular_add_haar_measure MeasureTheory.Measure.regular_add_haarMeasure
+#align measure_theory.measure.regular_add_haar_measure MeasureTheory.Measure.regular_addHaarMeasure
+-/
 
+#print MeasureTheory.Measure.sigmaFinite_haarMeasure /-
 /-- The Haar measure is sigma-finite in a second countable group. -/
 @[to_additive "The additive Haar measure is sigma-finite in a second countable group."]
 instance sigmaFinite_haarMeasure [SecondCountableTopology G] {K₀ : PositiveCompacts G} :
     SigmaFinite (haarMeasure K₀) := by
   haveI : LocallyCompactSpace G := K₀.locally_compact_space_of_group; infer_instance
 #align measure_theory.measure.sigma_finite_haar_measure MeasureTheory.Measure.sigmaFinite_haarMeasure
-#align measure_theory.measure.sigma_finite_add_haar_measure MeasureTheory.Measure.sigmaFinite_add_haarMeasure
+#align measure_theory.measure.sigma_finite_add_haar_measure MeasureTheory.Measure.sigmaFinite_addHaarMeasure
+-/
 
+#print MeasureTheory.Measure.haarMeasure_haarMeasure /-
 /-- The Haar measure is a Haar measure, i.e., it is invariant and gives finite mass to compact
 sets and positive mass to nonempty open sets. -/
 @[to_additive
       "The additive Haar measure is an additive Haar measure, i.e., it is invariant and\ngives  finite mass to compact sets and positive mass to nonempty open sets."]
-instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure (haarMeasure K₀) :=
+instance haarMeasure_haarMeasure (K₀ : PositiveCompacts G) : HaarMeasure (haarMeasure K₀) :=
   by
   apply
     is_haar_measure_of_is_compact_nonempty_interior (haar_measure K₀) K₀ K₀.is_compact
       K₀.interior_nonempty
   · simp only [haar_measure_self]; exact one_ne_zero
   · simp only [haar_measure_self]; exact ENNReal.coe_ne_top
-#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.isHaarMeasure_haarMeasure
-#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.is_add_haarMeasure_add_haarMeasure
+#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.haarMeasure_haarMeasure
+#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.addHaarMeasure_addHaarMeasure
+-/
 
+#print MeasureTheory.Measure.haar /-
 /-- `haar` is some choice of a Haar measure, on a locally compact group. -/
 @[reducible,
   to_additive "`add_haar` is some choice of a Haar measure, on a locally compact\nadditive group."]
@@ -685,6 +720,7 @@ def haar [LocallyCompactSpace G] : Measure G :=
   haarMeasure <| Classical.arbitrary _
 #align measure_theory.measure.haar MeasureTheory.Measure.haar
 #align measure_theory.measure.add_haar MeasureTheory.Measure.addHaar
+-/
 
 section SecondCountable
 
@@ -696,16 +732,16 @@ variable [SecondCountableTopology G]
   `μ ≠ 0`). -/
 @[to_additive
       "The additive Haar measure is unique up to scaling. More precisely: every σ-finite\nleft invariant measure is a scalar multiple of the additive Haar measure. This is slightly weaker\nthan assuming that `μ` is an additive Haar measure (in particular we don't require `μ ≠ 0`)."]
-theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
+theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [MulLeftInvariant μ]
     (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ :=
   (measure_eq_div_smul μ (haarMeasure K₀) K₀.IsCompact.MeasurableSet
         (measure_pos_of_nonempty_interior _ K₀.interior_nonempty).ne'
         K₀.IsCompact.measure_lt_top.Ne).trans
     (by rw [haar_measure_self, div_one])
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
-#align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.add_haar_measure_unique
+#align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
-example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : PositiveCompacts G) :
+example [LocallyCompactSpace G] (μ : Measure G) [HaarMeasure μ] (K₀ : PositiveCompacts G) :
     μ = μ K₀.1 • haarMeasure K₀ :=
   haarMeasure_unique μ K₀
 
@@ -713,15 +749,15 @@ example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : Posi
   on some compact set with non-empty interior. -/
 @[to_additive
       "To show that an invariant σ-finite measure is regular it is sufficient to show that\nit is finite on some compact set with non-empty interior."]
-theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLeftInvariant μ]
-    {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
+theorem regular_of_mulLeftInvariant {μ : Measure G} [SigmaFinite μ] [MulLeftInvariant μ] {K : Set G}
+    (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
   rw [haar_measure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact regular.smul hμK
-#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
-#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_is_add_left_invariant
+#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_mulLeftInvariant
+#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_addLeftInvariant
 
 @[to_additive is_add_haar_measure_eq_smul_is_add_haar_measure]
-theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
-    [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
+theorem haarMeasure_eq_smul_haarMeasure [LocallyCompactSpace G] (μ ν : Measure G) [HaarMeasure μ]
+    [HaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν :=
   by
   have K : positive_compacts G := Classical.arbitrary _
   have νpos : 0 < ν K := measure_pos_of_nonempty_interior _ K.interior_nonempty
@@ -741,27 +777,29 @@ theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Mea
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haar_measure_unique ν K]
       
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.is_add_haar_measure_eq_smul_is_add_haar_measure
+#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.haarMeasure_eq_smul_haarMeasure
+#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.addHaarMeasure_eq_smul_addHaarMeasure
 
+#print MeasureTheory.Measure.regular_of_haarMeasure /-
 -- see Note [lower instance priority]
 @[to_additive]
-instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
-    [IsHaarMeasure μ] : Regular μ :=
+instance (priority := 90) regular_of_haarMeasure [LocallyCompactSpace G] (μ : Measure G)
+    [HaarMeasure μ] : Regular μ :=
   by
   have K : positive_compacts G := Classical.arbitrary _
   obtain ⟨c, c0, ctop, hμ⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • haar_measure K :=
     is_haar_measure_eq_smul_is_haar_measure μ _
   rw [hμ]
   exact regular.smul Ctop
-#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_isHaarMeasure
-#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_is_add_haar_measure
+#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_haarMeasure
+#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_addHaarMeasure
+-/
 
 /-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
   measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
 @[to_additive
       "**Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`,\n  for any measurable set `E` of positive measure, the set `E - E` is a neighbourhood of `0`."]
-theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [LocallyCompactSpace G]
+theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [HaarMeasure μ] [LocallyCompactSpace G]
     (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) : E / E ∈ 𝓝 (1 : G) :=
   by
   /- For any regular measure `μ` and set `E` of positive measure, we can find a compact set `K` of
@@ -806,7 +844,7 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
     simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
   · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
 #align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
-#align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_add_haar_pos
+#align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
 
 end SecondCountable
 
@@ -815,19 +853,18 @@ end Group
 section CommGroup
 
 variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
-  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
+  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [HaarMeasure μ]
 
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
 @[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
-instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
-    IsInvInvariant μ :=
+instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] : InvInvariant μ :=
   by
   -- the image measure is a Haar measure. By uniqueness up to multiplication, it is of the form
   -- `c μ`. Applying again inversion, one gets the measure `c^2 μ`. But since inversion is an
   -- involution, this is also `μ`. Hence, `c^2 = 1`, which implies `c = 1`.
   constructor
   haveI : is_haar_measure (measure.map Inv.inv μ) :=
-    (MulEquiv.inv G).isHaarMeasure_map μ continuous_inv continuous_inv
+    (MulEquiv.inv G).haarMeasure_map μ continuous_inv continuous_inv
   obtain ⟨c, cpos, clt, hc⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ measure.map Inv.inv μ = c • μ :=
     is_haar_measure_eq_smul_is_haar_measure _ _
   have : map Inv.inv (map Inv.inv μ) = c ^ 2 • μ := by
@@ -847,9 +884,10 @@ instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G]
       this
   have : c = 1 := (ENNReal.pow_strictMono two_ne_zero).Injective this
   rw [measure.inv, hc, this, one_smul]
-#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
-#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.is_neg_invariant
+#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.HaarMeasure.invInvariant
+#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.AddHaarMeasure.negInvariant
 
+#print MeasureTheory.Measure.measurePreserving_zpow /-
 @[to_additive]
 theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) :
     MeasurePreserving (fun g : G => g ^ n) μ μ :=
@@ -857,7 +895,7 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
     map_eq := by
       let f := @zpowGroupHom G _ n
       have hf : Continuous f := continuous_zpow n
-      haveI : (μ.map f).IsHaarMeasure :=
+      haveI : (μ.map f).HaarMeasure :=
         is_haar_measure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
       obtain ⟨C, -, -, hC⟩ := is_haar_measure_eq_smul_is_haar_measure (μ.map f) μ
       suffices C = 1 by rwa [this, one_smul] at hC
@@ -870,6 +908,7 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
         ENNReal.div_self hμ₀ hμ₁] at h_univ }
 #align measure_theory.measure.measure_preserving_zpow MeasureTheory.Measure.measurePreserving_zpow
 #align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
+-/
 
 @[to_additive]
 theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) {X : Type _}
Diff
@@ -70,7 +70,7 @@ noncomputable section
 
 open Set Inv Function TopologicalSpace MeasurableSpace
 
-open NNReal Classical ENNReal Pointwise Topology
+open scoped NNReal Classical ENNReal Pointwise Topology
 
 namespace MeasureTheory
 
Diff
@@ -168,19 +168,15 @@ variable [TopologicalGroup G]
 @[to_additive add_index_defined
       "If `K` is compact and `V` has nonempty interior, then the index\n`(K : V)` is well-defined, there is a finite set `t` satisfying the desired properties."]
 theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
-    ∃ n : ℕ, n ∈ Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V } :=
-  by
-  rcases compact_covered_by_mul_left_translates hK hV with ⟨t, ht⟩
-  exact ⟨t.card, t, ht, rfl⟩
+    ∃ n : ℕ, n ∈ Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V } := by
+  rcases compact_covered_by_mul_left_translates hK hV with ⟨t, ht⟩; exact ⟨t.card, t, ht, rfl⟩
 #align measure_theory.measure.haar.index_defined MeasureTheory.Measure.Haar.index_defined
 #align measure_theory.measure.haar.add_index_defined MeasureTheory.Measure.Haar.add_index_defined
 
 @[to_additive add_index_elim]
 theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
-    ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V :=
-  by
-  have := Nat.sInf_mem (index_defined hK hV)
-  rwa [mem_image] at this
+    ∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by
+  have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this
 #align measure_theory.measure.haar.index_elim MeasureTheory.Measure.Haar.index_elim
 #align measure_theory.measure.haar.add_index_elim MeasureTheory.Measure.Haar.add_index_elim
 
@@ -205,14 +201,9 @@ theorem le_index_mul (K₀ : PositiveCompacts G) (K : Compacts G) {V : Set G}
 theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) :
     0 < index (K : Set G) V := by
   unfold index; rw [Nat.sInf_def, Nat.find_pos, mem_image]
-  · rintro ⟨t, h1t, h2t⟩
-    rw [Finset.card_eq_zero] at h2t
-    subst h2t
+  · rintro ⟨t, h1t, h2t⟩; rw [Finset.card_eq_zero] at h2t; subst h2t
     obtain ⟨g, hg⟩ := K.interior_nonempty
-    show g ∈ (∅ : Set G)
-    convert h1t (interior_subset hg)
-    symm
-    apply bUnion_empty
+    show g ∈ (∅ : Set G); convert h1t (interior_subset hg); symm; apply bUnion_empty
   · exact index_defined K.is_compact hV
 #align measure_theory.measure.haar.index_pos MeasureTheory.Measure.Haar.index_pos
 #align measure_theory.measure.haar.add_index_pos MeasureTheory.Measure.Haar.add_index_pos
@@ -249,25 +240,17 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V :=
   by
   apply le_antisymm (index_union_le K₁ K₂ hV)
-  rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩
-  rw [← h2s]
+  rcases index_elim (K₁.2.union K₂.2) hV with ⟨s, h1s, h2s⟩; rw [← h2s]
   have :
     ∀ K : Set G,
       (K ⊆ ⋃ g ∈ s, (fun h => g * h) ⁻¹' V) →
         index K V ≤ (s.filter fun g => ((fun h : G => g * h) ⁻¹' V ∩ K).Nonempty).card :=
     by
-    intro K hK
-    apply Nat.sInf_le
-    refine' ⟨_, _, rfl⟩
-    rw [mem_set_of_eq]
-    intro g hg
-    rcases hK hg with ⟨_, ⟨g₀, rfl⟩, _, ⟨h1g₀, rfl⟩, h2g₀⟩
+    intro K hK; apply Nat.sInf_le; refine' ⟨_, _, rfl⟩; rw [mem_set_of_eq]
+    intro g hg; rcases hK hg with ⟨_, ⟨g₀, rfl⟩, _, ⟨h1g₀, rfl⟩, h2g₀⟩
     simp only [mem_preimage] at h2g₀
-    simp only [mem_Union]
-    use g₀
-    constructor
-    · simp only [Finset.mem_filter, h1g₀, true_and_iff]
-      use g
+    simp only [mem_Union]; use g₀; constructor
+    · simp only [Finset.mem_filter, h1g₀, true_and_iff]; use g
       simp only [hg, h2g₀, mem_inter_iff, mem_preimage, and_self_iff]
     exact h2g₀
   refine'
@@ -282,11 +265,9 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
   simp only [mem_preimage] at h1g₃ h1g₂
   refine' h.le_bot (_ : g₁⁻¹ ∈ _)
   constructor <;> simp only [Set.mem_inv, Set.mem_mul, exists_exists_and_eq_and, exists_and_left]
-  · refine' ⟨_, h2g₂, (g₁ * g₂)⁻¹, _, _⟩
-    simp only [inv_inv, h1g₂]
+  · refine' ⟨_, h2g₂, (g₁ * g₂)⁻¹, _, _⟩; simp only [inv_inv, h1g₂]
     simp only [mul_inv_rev, mul_inv_cancel_left]
-  · refine' ⟨_, h2g₃, (g₁ * g₃)⁻¹, _, _⟩
-    simp only [inv_inv, h1g₃]
+  · refine' ⟨_, h2g₃, (g₁ * g₃)⁻¹, _, _⟩; simp only [inv_inv, h1g₃]
     simp only [mul_inv_rev, mul_inv_cancel_left]
 #align measure_theory.measure.haar.index_union_eq MeasureTheory.Measure.Haar.index_union_eq
 #align measure_theory.measure.haar.add_index_union_eq MeasureTheory.Measure.Haar.add_index_union_eq
@@ -298,14 +279,12 @@ theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (inte
   rcases index_elim hK hV with ⟨s, h1s, h2s⟩; rw [← h2s]
   apply Nat.sInf_le; rw [mem_image]
   refine' ⟨s.map (Equiv.mulRight g⁻¹).toEmbedding, _, Finset.card_map _⟩
-  · simp only [mem_set_of_eq]
-    refine' subset.trans (image_subset _ h1s) _
+  · simp only [mem_set_of_eq]; refine' subset.trans (image_subset _ h1s) _
     rintro _ ⟨g₁, ⟨_, ⟨g₂, rfl⟩, ⟨_, ⟨hg₂, rfl⟩, hg₁⟩⟩, rfl⟩
-    simp only [mem_preimage] at hg₁
+    simp only [mem_preimage] at hg₁;
     simp only [exists_prop, mem_Union, Finset.mem_map, Equiv.coe_mulRight, exists_exists_and_eq_and,
       mem_preimage, Equiv.toEmbedding_apply]
-    refine' ⟨_, hg₂, _⟩
-    simp only [mul_assoc, hg₁, inv_mul_cancel_left]
+    refine' ⟨_, hg₂, _⟩; simp only [mul_assoc, hg₁, inv_mul_cancel_left]
 #align measure_theory.measure.haar.mul_left_index_le MeasureTheory.Measure.Haar.mul_left_index_le
 #align measure_theory.measure.haar.add_left_add_index_le MeasureTheory.Measure.Haar.add_left_add_index_le
 
@@ -336,11 +315,8 @@ theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G
 
 @[to_additive]
 theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) {K : Set G}
-    (h1K : IsCompact K) (h2K : (interior K).Nonempty) : 0 < prehaar (K₀ : Set G) U ⟨K, h1K⟩ :=
-  by
-  apply div_pos <;> norm_cast
-  apply index_pos ⟨⟨K, h1K⟩, h2K⟩ hU
-  exact index_pos K₀ hU
+    (h1K : IsCompact K) (h2K : (interior K).Nonempty) : 0 < prehaar (K₀ : Set G) U ⟨K, h1K⟩ := by
+  apply div_pos <;> norm_cast; apply index_pos ⟨⟨K, h1K⟩, h2K⟩ hU; exact index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_pos MeasureTheory.Measure.Haar.prehaar_pos
 #align measure_theory.measure.haar.add_prehaar_pos MeasureTheory.Measure.Haar.add_prehaar_pos
 
@@ -374,12 +350,8 @@ theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Comp
 @[to_additive]
 theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Compacts G}
     (hU : (interior U).Nonempty) (h : Disjoint (K₁.1 * U⁻¹) (K₂.1 * U⁻¹)) :
-    prehaar (K₀ : Set G) U (K₁ ⊔ K₂) = prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂ :=
-  by
-  simp only [prehaar]
-  rw [div_add_div_same]
-  congr
-  exact_mod_cast index_union_eq K₁ K₂ hU h
+    prehaar (K₀ : Set G) U (K₁ ⊔ K₂) = prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂ := by
+  simp only [prehaar]; rw [div_add_div_same]; congr ; exact_mod_cast index_union_eq K₁ K₂ hU h
 #align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.Haar.prehaar_sup_eq
 #align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.Haar.add_prehaar_sup_eq
 
@@ -398,10 +370,7 @@ theorem is_left_invariant_prehaar {K₀ : PositiveCompacts G} {U : Set G} (hU :
 
 @[to_additive]
 theorem prehaar_mem_haarProduct (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) :
-    prehaar (K₀ : Set G) U ∈ haarProduct (K₀ : Set G) :=
-  by
-  rintro ⟨K, hK⟩ h2K
-  rw [mem_Icc]
+    prehaar (K₀ : Set G) U ∈ haarProduct (K₀ : Set G) := by rintro ⟨K, hK⟩ h2K; rw [mem_Icc];
   exact ⟨prehaar_nonneg K₀ _, prehaar_le_index K₀ _ hU⟩
 #align measure_theory.measure.haar.prehaar_mem_haar_product MeasureTheory.Measure.Haar.prehaar_mem_haarProduct
 #align measure_theory.measure.haar.add_prehaar_mem_add_haar_product MeasureTheory.Measure.Haar.add_prehaar_mem_add_haarProduct
@@ -410,32 +379,18 @@ theorem prehaar_mem_haarProduct (K₀ : PositiveCompacts G) {U : Set G} (hU : (i
 theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     (haarProduct (K₀ : Set G) ∩ ⋂ V : OpenNhdsOf (1 : G), clPrehaar K₀ V).Nonempty :=
   by
-  have : IsCompact (haar_product (K₀ : Set G)) :=
-    by
-    apply isCompact_univ_pi
-    intro K
+  have : IsCompact (haar_product (K₀ : Set G)) := by apply isCompact_univ_pi; intro K;
     apply is_compact_Icc
   refine' this.inter_Inter_nonempty (cl_prehaar K₀) (fun s => isClosed_closure) fun t => _
   let V₀ := ⋂ V ∈ t, (V : open_nhds_of 1).carrier
-  have h1V₀ : IsOpen V₀ := by
-    apply isOpen_biInter
-    apply Finset.finite_toSet
-    rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V
-    exact hV₁
-  have h2V₀ : (1 : G) ∈ V₀ := by
-    simp only [mem_Inter]
-    rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V
-    exact hV₂
+  have h1V₀ : IsOpen V₀ := by apply isOpen_biInter; apply Finset.finite_toSet;
+    rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V; exact hV₁
+  have h2V₀ : (1 : G) ∈ V₀ := by simp only [mem_Inter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ h2V; exact hV₂
   refine' ⟨prehaar K₀ V₀, _⟩
   constructor
-  · apply prehaar_mem_haar_product K₀
-    use 1
-    rwa [h1V₀.interior_eq]
-  · simp only [mem_Inter]
-    rintro ⟨V, hV⟩ h2V
-    apply subset_closure
-    apply mem_image_of_mem
-    rw [mem_set_of_eq]
+  · apply prehaar_mem_haar_product K₀; use 1; rwa [h1V₀.interior_eq]
+  · simp only [mem_Inter]; rintro ⟨V, hV⟩ h2V; apply subset_closure
+    apply mem_image_of_mem; rw [mem_set_of_eq]
     exact ⟨subset.trans (Inter_subset _ ⟨V, hV⟩) (Inter_subset _ h2V), h1V₀, h2V₀⟩
 #align measure_theory.measure.haar.nonempty_Inter_cl_prehaar MeasureTheory.Measure.Haar.nonempty_iInter_clPrehaar
 #align measure_theory.measure.haar.nonempty_Inter_cl_add_prehaar MeasureTheory.Measure.Haar.nonempty_iInter_cl_add_prehaar
@@ -467,18 +422,14 @@ theorem chaar_mem_haarProduct (K₀ : PositiveCompacts G) : chaar K₀ ∈ haarP
 theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
     chaar K₀ ∈ clPrehaar (K₀ : Set G) V :=
   by
-  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2
-  rw [mem_Inter] at this
+  have := (Classical.choose_spec (nonempty_Inter_cl_prehaar K₀)).2; rw [mem_Inter] at this
   exact this V
 #align measure_theory.measure.haar.chaar_mem_cl_prehaar MeasureTheory.Measure.Haar.chaar_mem_clPrehaar
 #align measure_theory.measure.haar.add_chaar_mem_cl_add_prehaar MeasureTheory.Measure.Haar.add_chaar_mem_cl_add_prehaar
 
 @[to_additive add_chaar_nonneg]
-theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K :=
-  by
-  have := chaar_mem_haar_product K₀ K (mem_univ _)
-  rw [mem_Icc] at this
-  exact this.1
+theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K := by
+  have := chaar_mem_haar_product K₀ K (mem_univ _); rw [mem_Icc] at this; exact this.1
 #align measure_theory.measure.haar.chaar_nonneg MeasureTheory.Measure.Haar.chaar_nonneg
 #align measure_theory.measure.haar.add_chaar_nonneg MeasureTheory.Measure.Haar.add_chaar_nonneg
 
@@ -490,10 +441,8 @@ theorem chaar_empty (K₀ : PositiveCompacts G) : chaar K₀ ⊥ = 0 :=
   show chaar K₀ ∈ eval ⁻¹' {(0 : ℝ)}
   apply mem_of_subset_of_mem _ (chaar_mem_cl_prehaar K₀ ⊤)
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    apply prehaar_empty
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_singleton
+  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; apply prehaar_empty
+  · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_empty MeasureTheory.Measure.Haar.chaar_empty
 #align measure_theory.measure.haar.add_chaar_empty MeasureTheory.Measure.Haar.add_chaar_empty
 
@@ -505,12 +454,9 @@ theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1
   show chaar K₀ ∈ eval ⁻¹' {(1 : ℝ)}
   apply mem_of_subset_of_mem _ (chaar_mem_cl_prehaar K₀ ⊤)
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    apply prehaar_self
-    rw [h2U.interior_eq]
-    exact ⟨1, h3U⟩
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_singleton
+  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; apply prehaar_self
+    rw [h2U.interior_eq]; exact ⟨1, h3U⟩
+  · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_self MeasureTheory.Measure.Haar.chaar_self
 #align measure_theory.measure.haar.add_chaar_self MeasureTheory.Measure.Haar.add_chaar_self
 
@@ -523,13 +469,9 @@ theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K
   rw [← sub_nonneg]; show chaar K₀ ∈ eval ⁻¹' Ici (0 : ℝ)
   apply mem_of_subset_of_mem _ (chaar_mem_cl_prehaar K₀ ⊤)
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
-    apply prehaar_mono _ h
-    rw [h2U.interior_eq]
-    exact ⟨1, h3U⟩
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_Ici
+  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
+    apply prehaar_mono _ h; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
+  · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_mono MeasureTheory.Measure.Haar.chaar_mono
 #align measure_theory.measure.haar.add_chaar_mono MeasureTheory.Measure.Haar.add_chaar_mono
 
@@ -544,13 +486,9 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
   rw [← sub_nonneg]; show chaar K₀ ∈ eval ⁻¹' Ici (0 : ℝ)
   apply mem_of_subset_of_mem _ (chaar_mem_cl_prehaar K₀ ⊤)
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
-    apply prehaar_sup_le
-    rw [h2U.interior_eq]
-    exact ⟨1, h3U⟩
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_Ici
+  · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, eval, sub_nonneg]
+    apply prehaar_sup_le; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
+  · apply continuous_iff_is_closed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_sup_le MeasureTheory.Measure.Haar.chaar_sup_le
 #align measure_theory.measure.haar.add_chaar_sup_le MeasureTheory.Measure.Haar.add_chaar_sup_le
 
@@ -578,18 +516,15 @@ theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compac
           simp only [mem_inv, inv_one, h3V₁, h3V₂, V, mem_inter_iff, true_and_iff]⟩)
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    simp only [mem_preimage, eval, sub_eq_zero, mem_singleton_iff]
-    rw [eq_comm]
+    simp only [mem_preimage, eval, sub_eq_zero, mem_singleton_iff]; rw [eq_comm]
     apply prehaar_sup_eq
-    · rw [h2U.interior_eq]
-      exact ⟨1, h3U⟩
+    · rw [h2U.interior_eq]; exact ⟨1, h3U⟩
     · refine' disjoint_of_subset _ _ hU
       · refine' subset.trans (mul_subset_mul subset.rfl _) h2L₁
         exact subset.trans (inv_subset.mpr h1U) (inter_subset_left _ _)
       · refine' subset.trans (mul_subset_mul subset.rfl _) h2L₂
         exact subset.trans (inv_subset.mpr h1U) (inter_subset_right _ _)
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_singleton
+  · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.chaar_sup_eq MeasureTheory.Measure.Haar.chaar_sup_eq
 #align measure_theory.measure.haar.add_chaar_sup_eq MeasureTheory.Measure.Haar.add_chaar_sup_eq
 
@@ -604,11 +539,8 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact
   unfold cl_prehaar; rw [IsClosed.closure_subset_iff]
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
     simp only [mem_singleton_iff, mem_preimage, eval, sub_eq_zero]
-    apply is_left_invariant_prehaar
-    rw [h2U.interior_eq]
-    exact ⟨1, h3U⟩
-  · apply continuous_iff_is_closed.mp this
-    exact isClosed_singleton
+    apply is_left_invariant_prehaar; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
+  · apply continuous_iff_is_closed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.Haar.is_left_invariant_chaar
 #align measure_theory.measure.haar.is_left_invariant_add_chaar MeasureTheory.Measure.Haar.is_left_invariant_add_chaar
 
@@ -620,9 +552,7 @@ def haarContent (K₀ : PositiveCompacts G) : Content G
     where
   toFun K := ⟨chaar K₀ K, chaar_nonneg _ _⟩
   mono' K₁ K₂ h := by simp only [← NNReal.coe_le_coe, Subtype.coe_mk, chaar_mono, h]
-  sup_disjoint' K₁ K₂ h := by
-    simp only [chaar_sup_eq h]
-    rfl
+  sup_disjoint' K₁ K₂ h := by simp only [chaar_sup_eq h]; rfl
   sup_le' K₁ K₂ := by simp only [← NNReal.coe_le_coe, NNReal.coe_add, Subtype.coe_mk, chaar_sup_le]
 #align measure_theory.measure.haar.haar_content MeasureTheory.Measure.Haar.haarContent
 #align measure_theory.measure.haar.add_haar_content MeasureTheory.Measure.Haar.addHaarContent
@@ -639,10 +569,8 @@ theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
 
 /-- The variant of `chaar_self` for `haar_content` -/
 @[to_additive "The variant of `add_chaar_self` for `add_haar_content`."]
-theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 :=
-  by
-  simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_eq_coe, chaar_self]
-  rfl
+theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 := by
+  simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_eq_coe, chaar_self]; rfl
 #align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.Haar.haarContent_self
 #align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.Haar.add_haarContent_self
 
@@ -712,8 +640,7 @@ theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1
   by
   haveI : LocallyCompactSpace G := K₀.locally_compact_space_of_group
   rw [haar_measure_apply K₀.is_compact.measurable_set, ENNReal.div_self]
-  · rw [← pos_iff_ne_zero]
-    exact haar_content_outer_measure_self_pos
+  · rw [← pos_iff_ne_zero]; exact haar_content_outer_measure_self_pos
   · exact (content.outer_measure_lt_top_of_is_compact _ K₀.is_compact).Ne
 #align measure_theory.measure.haar_measure_self MeasureTheory.Measure.haarMeasure_self
 #align measure_theory.measure.add_haar_measure_self MeasureTheory.Measure.add_haarMeasure_self
@@ -732,10 +659,8 @@ instance regular_haarMeasure {K₀ : PositiveCompacts G} : (haarMeasure K₀).re
 /-- The Haar measure is sigma-finite in a second countable group. -/
 @[to_additive "The additive Haar measure is sigma-finite in a second countable group."]
 instance sigmaFinite_haarMeasure [SecondCountableTopology G] {K₀ : PositiveCompacts G} :
-    SigmaFinite (haarMeasure K₀) :=
-  by
-  haveI : LocallyCompactSpace G := K₀.locally_compact_space_of_group
-  infer_instance
+    SigmaFinite (haarMeasure K₀) := by
+  haveI : LocallyCompactSpace G := K₀.locally_compact_space_of_group; infer_instance
 #align measure_theory.measure.sigma_finite_haar_measure MeasureTheory.Measure.sigmaFinite_haarMeasure
 #align measure_theory.measure.sigma_finite_add_haar_measure MeasureTheory.Measure.sigmaFinite_add_haarMeasure
 
@@ -748,10 +673,8 @@ instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure (
   apply
     is_haar_measure_of_is_compact_nonempty_interior (haar_measure K₀) K₀ K₀.is_compact
       K₀.interior_nonempty
-  · simp only [haar_measure_self]
-    exact one_ne_zero
-  · simp only [haar_measure_self]
-    exact ENNReal.coe_ne_top
+  · simp only [haar_measure_self]; exact one_ne_zero
+  · simp only [haar_measure_self]; exact ENNReal.coe_ne_top
 #align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.isHaarMeasure_haarMeasure
 #align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.is_add_haarMeasure_add_haarMeasure
 
@@ -791,10 +714,8 @@ example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : Posi
 @[to_additive
       "To show that an invariant σ-finite measure is regular it is sufficient to show that\nit is finite on some compact set with non-empty interior."]
 theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLeftInvariant μ]
-    {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ :=
-  by
-  rw [haar_measure_unique μ ⟨⟨K, hK⟩, h2K⟩]
-  exact regular.smul hμK
+    {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
+  rw [haar_measure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact regular.smul hμK
 #align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
 #align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_is_add_left_invariant
 
@@ -877,11 +798,9 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
       simp only [singleton_mul, image_mul_left, measure_preimage_mul]
     rw [hKtranslate, lt_self_iff_false] at hcontr
     assumption
-  suffices : V ⊆ E / E
-  exact Filter.mem_of_superset hV1 this
+  suffices : V ⊆ E / E; exact Filter.mem_of_superset hV1 this
   intro v hvV
-  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K
-  exact Set.not_disjoint_iff.1 (hv v hvV)
+  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K; exact Set.not_disjoint_iff.1 (hv v hvV)
   refine' ⟨x, v⁻¹ * x, hLE (hKL hxvK), _, _⟩
   · apply hKL.trans hLE
     simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
Diff
@@ -625,7 +625,7 @@ def haarContent (K₀ : PositiveCompacts G) : Content G
     rfl
   sup_le' K₁ K₂ := by simp only [← NNReal.coe_le_coe, NNReal.coe_add, Subtype.coe_mk, chaar_sup_le]
 #align measure_theory.measure.haar.haar_content MeasureTheory.Measure.Haar.haarContent
-#align measure_theory.measure.haar.add_haar_content MeasureTheory.Measure.Haar.add_haar_content
+#align measure_theory.measure.haar.add_haar_content MeasureTheory.Measure.Haar.addHaarContent
 
 /-! We only prove the properties for `haar_content` that we use at least twice below. -/
 
@@ -644,7 +644,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
   simp_rw [← ENNReal.coe_one, haar_content_apply, ENNReal.coe_eq_coe, chaar_self]
   rfl
 #align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.Haar.haarContent_self
-#align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.Haar.add_haar_content_self
+#align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.Haar.add_haarContent_self
 
 /-- The variant of `is_left_invariant_chaar` for `haar_content` -/
 @[to_additive "The variant of `is_left_invariant_add_chaar` for `add_haar_content`"]
@@ -653,7 +653,7 @@ theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : C
   simpa only [ENNReal.coe_eq_coe, ← NNReal.coe_eq, haar_content_apply] using
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.Haar.is_left_invariant_haarContent
-#align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.Haar.is_left_invariant_add_haar_content
+#align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.Haar.is_left_invariant_add_haarContent
 
 @[to_additive]
 theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
@@ -664,7 +664,7 @@ theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
   refine' le_iInf₂ fun U hU => le_iInf fun hK₀ => le_trans _ <| le_iSup₂ K₀.to_compacts hK₀
   exact haar_content_self.ge
 #align measure_theory.measure.haar.haar_content_outer_measure_self_pos MeasureTheory.Measure.Haar.haarContent_outerMeasure_self_pos
-#align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.Haar.add_haar_content_outer_measure_self_pos
+#align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.Haar.add_haarContent_outerMeasure_self_pos
 
 end Haar
 
@@ -692,7 +692,7 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
   change ((haar_content K₀).OuterMeasure K₀)⁻¹ * (haar_content K₀).Measure s = _
   simp only [hs, div_eq_mul_inv, mul_comm, content.measure_apply]
 #align measure_theory.measure.haar_measure_apply MeasureTheory.Measure.haarMeasure_apply
-#align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.add_haar_measure_apply
+#align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.add_haarMeasure_apply
 
 @[to_additive]
 instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
-! This file was ported from Lean 3 source module measure_theory.measure.haar
-! leanprover-community/mathlib commit 57ac39bd365c2f80589a700f9fbb664d3a1a30c2
+! This file was ported from Lean 3 source module measure_theory.measure.haar.basic
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/

Changes in mathlib4

mathlib3
mathlib4
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
@@ -375,7 +375,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
   refine' this.inter_iInter_nonempty (clPrehaar K₀) (fun s => isClosed_closure) fun t => _
   let V₀ := ⋂ V ∈ t, (V : OpenNhdsOf (1 : G)).carrier
   have h1V₀ : IsOpen V₀ := isOpen_biInter_finset <| by rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₁
-  have h2V₀ : (1 : G) ∈ V₀ := by simp only [mem_iInter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₂
+  have h2V₀ : (1 : G) ∈ V₀ := by simp only [V₀, mem_iInter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₂
   refine' ⟨prehaar K₀ V₀, _⟩
   constructor
   · apply prehaar_mem_haarProduct K₀; use 1; rwa [h1V₀.interior_eq]
@@ -459,7 +459,7 @@ theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K
   rw [← sub_nonneg]; show chaar K₀ ∈ eval ⁻¹' Ici (0 : ℝ)
   apply mem_of_subset_of_mem _ (chaar_mem_clPrehaar K₀ ⊤)
   unfold clPrehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨_, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, sub_nonneg]
+  · rintro _ ⟨U, ⟨_, h2U, h3U⟩, rfl⟩; simp only [eval, mem_preimage, mem_Ici, sub_nonneg]
     apply prehaar_mono _ h; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_isClosed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_mono MeasureTheory.Measure.haar.chaar_mono
@@ -474,7 +474,7 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
   rw [← sub_nonneg]; show chaar K₀ ∈ eval ⁻¹' Ici (0 : ℝ)
   apply mem_of_subset_of_mem _ (chaar_mem_clPrehaar K₀ ⊤)
   unfold clPrehaar; rw [IsClosed.closure_subset_iff]
-  · rintro _ ⟨U, ⟨_, h2U, h3U⟩, rfl⟩; simp only [mem_preimage, mem_Ici, sub_nonneg]
+  · rintro _ ⟨U, ⟨_, h2U, h3U⟩, rfl⟩; simp only [eval, mem_preimage, mem_Ici, sub_nonneg]
     apply prehaar_sup_le; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_isClosed.mp this; exact isClosed_Ici
 #align measure_theory.measure.haar.chaar_sup_le MeasureTheory.Measure.haar.chaar_sup_le
@@ -501,10 +501,10 @@ theorem chaar_sup_eq {K₀ : PositiveCompacts G}
     mem_of_subset_of_mem _
       (chaar_mem_clPrehaar K₀
         ⟨⟨V⁻¹, (h2V₁.inter h2V₂).preimage continuous_inv⟩, by
-          simp only [mem_inv, inv_one, h3V₁, h3V₂, mem_inter_iff, true_and_iff]⟩)
+          simp only [V, mem_inv, inv_one, h3V₁, h3V₂, mem_inter_iff, true_and_iff]⟩)
   unfold clPrehaar; rw [IsClosed.closure_subset_iff]
   · rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩
-    simp only [mem_preimage, sub_eq_zero, mem_singleton_iff]; rw [eq_comm]
+    simp only [eval, mem_preimage, sub_eq_zero, mem_singleton_iff]; rw [eq_comm]
     apply prehaar_sup_eq
     · rw [h2U.interior_eq]; exact ⟨1, h3U⟩
     · refine' disjoint_of_subset _ _ hU
@@ -525,7 +525,7 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact
   apply mem_of_subset_of_mem _ (chaar_mem_clPrehaar K₀ ⊤)
   unfold clPrehaar; rw [IsClosed.closure_subset_iff]
   · rintro _ ⟨U, ⟨_, h2U, h3U⟩, rfl⟩
-    simp only [mem_singleton_iff, mem_preimage, sub_eq_zero]
+    simp only [eval, mem_singleton_iff, mem_preimage, sub_eq_zero]
     apply is_left_invariant_prehaar; rw [h2U.interior_eq]; exact ⟨1, h3U⟩
   · apply continuous_iff_isClosed.mp this; exact isClosed_singleton
 #align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.haar.is_left_invariant_chaar
feat: Complete NNReal coercion lemmas (#10214)

Add a few missing lemmas about the coercion NNReal → Real. Remove a bunch of protected on the existing coercion lemmas (so that it matches the convention for other coercions). Rename NNReal.coe_eq to NNReal.coe_inj

From LeanAPAP

Diff
@@ -568,7 +568,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
 @[to_additive "The variant of `is_left_invariant_addCHaar` for `addHaarContent`"]
 theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
     haarContent K₀ (K.map _ <| continuous_mul_left g) = haarContent K₀ K := by
-  simpa only [ENNReal.coe_inj, ← NNReal.coe_eq, haarContent_apply] using
+  simpa only [ENNReal.coe_inj, ← NNReal.coe_inj, haarContent_apply] using
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
feat: (s ∩ t).card = s.card + t.card - (s ∪ t).card (#10224)

once coerced to an AddGroupWithOne. Also unify Finset.card_disjoint_union and Finset.card_union_eq

From LeanAPAP

Diff
@@ -253,7 +253,7 @@ theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).N
     le_trans
       (add_le_add (this K₁.1 <| Subset.trans (subset_union_left _ _) h1s)
         (this K₂.1 <| Subset.trans (subset_union_right _ _) h1s)) _
-  rw [← Finset.card_union_eq, Finset.filter_union_right]
+  rw [← Finset.card_union_of_disjoint, Finset.filter_union_right]
   exact s.card_filter_le _
   apply Finset.disjoint_filter.mpr
   rintro g₁ _ ⟨g₂, h1g₂, h2g₂⟩ ⟨g₃, h1g₃, h2g₃⟩
feat: Make the coercion ℝ≥0 → ℝ≥0∞ commute defeqly with nsmul and pow (#10225)

by tweaking the definition of the AddMonoid and MonoidWithZero instances for WithTop. Also unprotect ENNReal.coe_injective and rename ENNReal.coe_eq_coe → ENNReal.coe_inj.

From LeanAPAP

Diff
@@ -560,7 +560,7 @@ theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
 /-- The variant of `chaar_self` for `haarContent` -/
 @[to_additive "The variant of `addCHaar_self` for `addHaarContent`."]
 theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 := by
-  simp_rw [← ENNReal.coe_one, haarContent_apply, ENNReal.coe_eq_coe, chaar_self]; rfl
+  simp_rw [← ENNReal.coe_one, haarContent_apply, ENNReal.coe_inj, chaar_self]; rfl
 #align measure_theory.measure.haar.haar_content_self MeasureTheory.Measure.haar.haarContent_self
 #align measure_theory.measure.haar.add_haar_content_self MeasureTheory.Measure.haar.addHaarContent_self
 
@@ -568,7 +568,7 @@ theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toC
 @[to_additive "The variant of `is_left_invariant_addCHaar` for `addHaarContent`"]
 theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
     haarContent K₀ (K.map _ <| continuous_mul_left g) = haarContent K₀ K := by
-  simpa only [ENNReal.coe_eq_coe, ← NNReal.coe_eq, haarContent_apply] using
+  simpa only [ENNReal.coe_inj, ← NNReal.coe_eq, haarContent_apply] using
     is_left_invariant_chaar g K
 #align measure_theory.measure.haar.is_left_invariant_haar_content MeasureTheory.Measure.haar.is_left_invariant_haarContent
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
feat(Group/Measure): reformulate exists_nhds_measure_smul_diff_lt (#10093)
  • Formulate the lemma as ∀ᶠ g in 𝓝 1, _ instead of ∃ V ∈ 𝓝 1, ∀ g ∈ V, _.
  • Add a version in terms of Filter.Tendsto.
  • Golf Steinhaus Theorem.
Diff
@@ -719,19 +719,12 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
     refine ⟨closure K, ?_, K_comp.closure, isClosed_closure, ?_⟩
     · exact K_comp.closure_subset_measurableSet hE KE
     · rwa [K_comp.measure_closure_eq_of_group]
-  obtain ⟨V, hV1, hV⟩ : ∃ V ∈ 𝓝 (1 : G), ∀ g ∈ V, μ (g • K \ K) < μ K :=
-    exists_nhds_measure_smul_diff_lt hK K_closed hKpos.ne'
-  have hv : ∀ v : G, v ∈ V → ¬Disjoint (v • K) K := by
-    intro v hv hKv
-    have Z := hV v hv
-    rw [hKv.symm.sdiff_eq_right, measure_smul] at Z
-    exact lt_irrefl _ Z
-  suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
-  intro v hvV
-  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ v • K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
-  refine ⟨x, hKE hxvK, v⁻¹ * x, hKE ?_, ?_⟩
-  · simpa [mem_smul_set_iff_inv_smul_mem] using hxK
-  · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
+  filter_upwards [eventually_nhds_one_measure_smul_diff_lt hK K_closed hKpos.ne' (μ := μ)] with g hg
+  have : ¬Disjoint (g • K) K := fun hd ↦ by
+    rw [hd.symm.sdiff_eq_right, measure_smul] at hg
+    exact hg.false
+  rcases Set.not_disjoint_iff.1 this with ⟨_, ⟨x, hxK, rfl⟩, hgxK⟩
+  simpa using div_mem_div (hKE hgxK) (hKE hxK)
 #align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
 #align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
 
feat(Topology/Separation): define R₁ spaces, review API (#10085)

Main API changes

  • Define R1Space, a.k.a. preregular space.
  • Drop T2OrLocallyCompactRegularSpace.
  • Generalize all existing theorems about T2OrLocallyCompactRegularSpace to R1Space.
  • Drop the [T2OrLocallyCompactRegularSpace _] assumption if the space is known to be regular for other reason (e.g., because it's a topological group).

New theorems

  • Specializes.not_disjoint: if x ⤳ y, then 𝓝 x and 𝓝 y aren't disjoint;
  • specializes_iff_not_disjoint, Specializes.inseparable, disjoint_nhds_nhds_iff_not_inseparable, r1Space_iff_inseparable_or_disjoint_nhds: basic API about R1Spaces;
  • Inducing.r1Space, R1Space.induced, R1Space.sInf, R1Space.iInf, R1Space.inf, instances for Subtype _, X × Y, and ∀ i, X i: basic instances for R1Space;
  • IsCompact.mem_closure_iff_exists_inseparable, IsCompact.closure_eq_biUnion_inseparable: characterizations of the closure of a compact set in a preregular space;
  • Inseparable.mem_measurableSet_iff: topologically inseparable points can't be separated by a Borel measurable set;
  • IsCompact.closure_subset_measurableSet, IsCompact.measure_closure: in a preregular space, a measurable superset of a compact set includes its closure as well; as a corollary, closure K has the same measure as K.
  • exists_mem_nhds_isCompact_mapsTo_of_isCompact_mem_nhds: an auxiliary lemma extracted from a LocallyCompactPair instance;
  • IsCompact.isCompact_isClosed_basis_nhds: if x admits a compact neighborhood, then it admits a basis of compact closed neighborhoods; in particular, a weakly locally compact preregular space is a locally compact regular space;
  • isCompact_isClosed_basis_nhds: a version of the previous theorem for weakly locally compact spaces;
  • exists_mem_nhds_isCompact_isClosed: in a locally compact regular space, each point admits a compact closed neighborhood.

Deprecated theorems

Some theorems about topological groups are true for any (pre)regular space, so we deprecate the special cases.

  • exists_isCompact_isClosed_subset_isCompact_nhds_one: use new IsCompact.isCompact_isClosed_basis_nhds instead;
  • instLocallyCompactSpaceOfWeaklyOfGroup, instLocallyCompactSpaceOfWeaklyOfAddGroup: are now implied by WeaklyLocallyCompactSpace.locallyCompactSpace;
  • local_isCompact_isClosed_nhds_of_group, local_isCompact_isClosed_nhds_of_addGroup: use isCompact_isClosed_basis_nhds instead;
  • exists_isCompact_isClosed_nhds_one, exists_isCompact_isClosed_nhds_zero: use exists_mem_nhds_isCompact_isClosed instead.

Renamed/moved theorems

For each renamed theorem, the old theorem is redefined as a deprecated alias.

  • isOpen_setOf_disjoint_nhds_nhds: moved to Constructions;
  • isCompact_closure_of_subset_compact -> IsCompact.closure_of_subset;
  • IsCompact.measure_eq_infi_isOpen -> IsCompact.measure_eq_iInf_isOpen;
  • exists_compact_superset_iff -> exists_isCompact_superset_iff;
  • separatedNhds_of_isCompact_isCompact_isClosed -> SeparatedNhds.of_isCompact_isCompact_isClosed;
  • separatedNhds_of_isCompact_isCompact -> SeparatedNhds.of_isCompact_isCompact;
  • separatedNhds_of_finset_finset -> SeparatedNhds.of_finset_finset;
  • point_disjoint_finset_opens_of_t2 -> SeparatedNhds.of_singleton_finset;
  • separatedNhds_of_isCompact_isClosed -> SeparatedNhds.of_isCompact_isClosed;
  • exists_open_superset_and_isCompact_closure -> exists_isOpen_superset_and_isCompact_closure;
  • exists_open_with_compact_closure -> exists_isOpen_mem_isCompact_closure;
Diff
@@ -484,8 +484,7 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
 theorem chaar_sup_eq {K₀ : PositiveCompacts G}
     {K₁ K₂ : Compacts G} (h : Disjoint K₁.1 K₂.1) (h₂ : IsClosed K₂.1) :
     chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ := by
-  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
-  rcases separatedNhds_of_isCompact_isCompact_isClosed K₁.2 K₂.2 h₂ h
+  rcases SeparatedNhds.of_isCompact_isCompact_isClosed K₁.2 K₂.2 h₂ h
     with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
   rcases compact_open_separated_mul_right K₁.2 h1U₁ h2U₁ with ⟨L₁, h1L₁, h2L₁⟩
   rcases mem_nhds_iff.mp h1L₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩
@@ -577,7 +576,6 @@ theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : C
 @[to_additive]
 theorem haarContent_outerMeasure_self_pos (K₀ : PositiveCompacts G) :
     0 < (haarContent K₀).outerMeasure K₀ := by
-  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   refine' zero_lt_one.trans_le _
   rw [Content.outerMeasure_eq_iInf]
   refine' le_iInf₂ fun U hU => le_iInf fun hK₀ => le_trans _ <| le_iSup₂ K₀.toCompacts hK₀
@@ -610,14 +608,12 @@ variable [TopologicalSpace G] [TopologicalGroup G] [MeasurableSpace G] [BorelSpa
 "The Haar measure on the locally compact additive group `G`, scaled so that
 `addHaarMeasure K₀ K₀ = 1`."]
 noncomputable def haarMeasure (K₀ : PositiveCompacts G) : Measure G :=
-  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   ((haarContent K₀).measure K₀)⁻¹ • (haarContent K₀).measure
 #align measure_theory.measure.haar_measure MeasureTheory.Measure.haarMeasure
 #align measure_theory.measure.add_haar_measure MeasureTheory.Measure.addHaarMeasure
 
 @[to_additive]
-theorem haarMeasure_apply [LocallyCompactSpace G]
-    {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
+theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
     haarMeasure K₀ s = (haarContent K₀).outerMeasure s / (haarContent K₀).measure K₀ := by
   change ((haarContent K₀).measure K₀)⁻¹ * (haarContent K₀).measure s = _
   simp only [hs, div_eq_mul_inv, mul_comm, Content.measure_apply]
@@ -627,7 +623,6 @@ theorem haarMeasure_apply [LocallyCompactSpace G]
 @[to_additive]
 instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
     IsMulLeftInvariant (haarMeasure K₀) := by
-  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   rw [← forall_measure_preimage_mul_iff]
   intro g A hA
   rw [haarMeasure_apply hA, haarMeasure_apply (measurable_const_mul g hA)]
@@ -663,7 +658,7 @@ instance regular_haarMeasure {K₀ : PositiveCompacts G} : (haarMeasure K₀).Re
 
 @[to_additive]
 theorem haarMeasure_closure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ (closure K₀) = 1 := by
-  rw [IsCompact.measure_closure_eq_of_group K₀.isCompact, haarMeasure_self]
+  rw [K₀.isCompact.measure_closure, haarMeasure_self]
 
 /-- The Haar measure is sigma-finite in a second countable group. -/
 @[to_additive "The additive Haar measure is sigma-finite in a second countable group."]
@@ -722,7 +717,7 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
       ∃ (K : Set G), K ⊆ E ∧ IsCompact K ∧ IsClosed K ∧ 0 < μ K := by
     rcases MeasurableSet.exists_lt_isCompact hE hEpos with ⟨K, KE, K_comp, K_meas⟩
     refine ⟨closure K, ?_, K_comp.closure, isClosed_closure, ?_⟩
-    · exact IsCompact.closure_subset_of_measurableSet_of_group K_comp hE KE
+    · exact K_comp.closure_subset_measurableSet hE KE
     · rwa [K_comp.measure_closure_eq_of_group]
   obtain ⟨V, hV1, hV⟩ : ∃ V ∈ 𝓝 (1 : G), ∀ g ∈ V, μ (g • K \ K) < μ K :=
     exists_nhds_measure_smul_diff_lt hK K_closed hKpos.ne'
@@ -767,13 +762,11 @@ variable [SecondCountableTopology G]
   See also `isAddHaarMeasure_eq_smul_of_regular` for a statement not assuming second-countability."]
 theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
     (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ := by
-  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   have A : Set.Nonempty (interior (closure (K₀ : Set G))) :=
     K₀.interior_nonempty.mono (interior_mono subset_closure)
   have := measure_eq_div_smul μ (haarMeasure K₀) (isClosed_closure (s := K₀)).measurableSet
     (measure_pos_of_nonempty_interior _ A).ne' K₀.isCompact.closure.measure_lt_top.ne
-  rwa [haarMeasure_closure_self, div_one, IsCompact.measure_closure_eq_of_group K₀.isCompact]
-    at this
+  rwa [haarMeasure_closure_self, div_one, K₀.isCompact.measure_closure] at this
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
chore: factor out a lemma from the proof of Steinhaus theorem (#9907)

Given a measure in a locally compact group, and a compact set k, then for g close enough to the identity, the set g • k \ k has arbitrarily small measure. A slightly weaker version of this fact is used implicitly in our current proof of Steinhaus theorem that E - E is a neighborhood of the identity if E has positive measure. Since I will need this lemma later on, I extract it from the proof of Steinhaus theorem in this PR.

Diff
@@ -702,6 +702,8 @@ but `E / E` does not contain a neighborhood of zero. On the other hand, it is al
 inner regular Haar measures (and in particular for any Haar measure on a second countable group).
 -/
 
+open Pointwise
+
 /-- **Steinhaus Theorem** In any locally compact group `G` with an inner regular Haar measure `μ`,
 for any measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
 @[to_additive
@@ -711,42 +713,29 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
     [InnerRegular μ] (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) :
     E / E ∈ 𝓝 (1 : G) := by
   /- For any inner regular measure `μ` and set `E` of positive measure, we can find a compact
-       set `K` of positive measure inside `E`. Further, there exists an open
-       set `U` containing `K` with measure arbitrarily close to `K` (here `μ U < 2 * μ K` suffices).
-       Then, we can pick an open neighborhood of `1`, say `V` such that such that `V * K` is
-       contained in `U`. Now note that for any `v` in `V`, the sets `K` and `{v} * K` can not be
-       disjoint because they are both of measure `μ K` (since `μ` is left invariant) and also
-       contained in `U`, yet we have that `μ U < 2 * μ K`. This show that `K / K` contains the
-       neighborhood `V` of `1`, and therefore that it is itself such a neighborhood. -/
+    set `K` of positive measure inside `E`. Further, there exists a neighborhood `V` of the
+    identity such that `v • K \ K` has small measure for all `v ∈ V`, say `< μ K`.
+    Then `v • K` and `K` can not be disjoint, as otherwise `μ (v • K \ K) = μ (v • K) = μ K`.
+    This show that `K / K` contains the neighborhood `V` of `1`, and therefore that it is
+    itself such a neighborhood. -/
   obtain ⟨K, hKE, hK, K_closed, hKpos⟩ :
       ∃ (K : Set G), K ⊆ E ∧ IsCompact K ∧ IsClosed K ∧ 0 < μ K := by
     rcases MeasurableSet.exists_lt_isCompact hE hEpos with ⟨K, KE, K_comp, K_meas⟩
     refine ⟨closure K, ?_, K_comp.closure, isClosed_closure, ?_⟩
     · exact IsCompact.closure_subset_of_measurableSet_of_group K_comp hE KE
     · rwa [K_comp.measure_closure_eq_of_group]
-  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G), K ⊆ U ∧ IsOpen U ∧ μ U < μ K + μ K :=
-    hK.exists_isOpen_lt_add hKpos.ne'
-  obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U :=
-    compact_open_separated_mul_left hK hU hUK
-  have hv : ∀ v : G, v ∈ V → ¬Disjoint ({v} * K) K := by
+  obtain ⟨V, hV1, hV⟩ : ∃ V ∈ 𝓝 (1 : G), ∀ g ∈ V, μ (g • K \ K) < μ K :=
+    exists_nhds_measure_smul_diff_lt hK K_closed hKpos.ne'
+  have hv : ∀ v : G, v ∈ V → ¬Disjoint (v • K) K := by
     intro v hv hKv
-    have hKvsub : {v} * K ∪ K ⊆ U := by
-      apply Set.union_subset _ hUK
-      apply _root_.subset_trans _ hVKU
-      apply Set.mul_subset_mul _ (Set.Subset.refl K)
-      simp only [Set.singleton_subset_iff, hv]
-    replace hKvsub := @measure_mono _ _ μ _ _ hKvsub
-    have hcontr := lt_of_le_of_lt hKvsub hμUK
-    rw [measure_union hKv K_closed.measurableSet] at hcontr
-    have hKtranslate : μ ({v} * K) = μ K := by
-      simp only [singleton_mul, image_mul_left, measure_preimage_mul]
-    rw [hKtranslate, lt_self_iff_false] at hcontr
-    assumption
+    have Z := hV v hv
+    rw [hKv.symm.sdiff_eq_right, measure_smul] at Z
+    exact lt_irrefl _ Z
   suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
   intro v hvV
-  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
+  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ v • K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
   refine ⟨x, hKE hxvK, v⁻¹ * x, hKE ?_, ?_⟩
-  · simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
+  · simpa [mem_smul_set_iff_inv_smul_mem] using hxK
   · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
 #align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
 #align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -5,7 +5,6 @@ Authors: Floris van Doorn
 -/
 import Mathlib.MeasureTheory.Measure.Content
 import Mathlib.MeasureTheory.Group.Prod
-import Mathlib.GroupTheory.Divisible
 import Mathlib.Topology.Algebra.Group.Compact
 
 #align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
feat: construct Haar measure in locally compact non-Hausdorff groups (#9746)

The construction we have is given in T2 spaces, but it works in non-Hausdorff spaces modulo a few modifications.

For this, we introduce an ad hoc class T2OrLocallyCompactRegularSpace, which is just enough to unify the arguments, as a replacement for the class ClosableCompactSubsetOpenSpace (which is not strong enough). In the file Separation.lean, we move some material that was only available on T2 spaces to this new class.

The construction is needed for a forthcoming improvement of uniqueness results for Haar measures, based on https://mathoverflow.net/questions/456670/uniqueness-of-left-invariant-borel-probability-measure-on-compact-groups.

Diff
@@ -482,9 +482,12 @@ theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
 #align measure_theory.measure.haar.add_chaar_sup_le MeasureTheory.Measure.haar.addCHaar_sup_le
 
 @[to_additive addCHaar_sup_eq]
-theorem chaar_sup_eq [T2Space G] {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G}
-    (h : Disjoint K₁.1 K₂.1) : chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ := by
-  rcases isCompact_isCompact_separated K₁.2 K₂.2 h with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
+theorem chaar_sup_eq {K₀ : PositiveCompacts G}
+    {K₁ K₂ : Compacts G} (h : Disjoint K₁.1 K₂.1) (h₂ : IsClosed K₂.1) :
+    chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂ := by
+  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
+  rcases separatedNhds_of_isCompact_isCompact_isClosed K₁.2 K₂.2 h₂ h
+    with ⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩
   rcases compact_open_separated_mul_right K₁.2 h1U₁ h2U₁ with ⟨L₁, h1L₁, h2L₁⟩
   rcases mem_nhds_iff.mp h1L₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩
   replace h2L₁ := Subset.trans (mul_subset_mul_left h1V₁) h2L₁
@@ -530,8 +533,6 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact
 #align measure_theory.measure.haar.is_left_invariant_chaar MeasureTheory.Measure.haar.is_left_invariant_chaar
 #align measure_theory.measure.haar.is_left_invariant_add_chaar MeasureTheory.Measure.haar.is_left_invariant_addCHaar
 
-variable [T2Space G]
-
 -- Porting note: Even in `noncomputable section`, a definition with `to_additive` require
 --               `noncomputable` to generate an additive definition.
 --               Please refer to leanprover/lean4#2077.
@@ -541,7 +542,7 @@ variable [T2Space G]
 noncomputable def haarContent (K₀ : PositiveCompacts G) : Content G where
   toFun K := ⟨chaar K₀ K, chaar_nonneg _ _⟩
   mono' K₁ K₂ h := by simp only [← NNReal.coe_le_coe, NNReal.toReal, chaar_mono, h]
-  sup_disjoint' K₁ K₂ h := by simp only [chaar_sup_eq h]; rfl
+  sup_disjoint' K₁ K₂ h _h₁ h₂ := by simp only [chaar_sup_eq h]; rfl
   sup_le' K₁ K₂ := by
     simp only [← NNReal.coe_le_coe, NNReal.coe_add]
     simp only [NNReal.toReal, chaar_sup_le]
@@ -575,8 +576,9 @@ theorem is_left_invariant_haarContent {K₀ : PositiveCompacts G} (g : G) (K : C
 #align measure_theory.measure.haar.is_left_invariant_add_haar_content MeasureTheory.Measure.haar.is_left_invariant_addHaarContent
 
 @[to_additive]
-theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
+theorem haarContent_outerMeasure_self_pos (K₀ : PositiveCompacts G) :
     0 < (haarContent K₀).outerMeasure K₀ := by
+  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   refine' zero_lt_one.trans_le _
   rw [Content.outerMeasure_eq_iInf]
   refine' le_iInf₂ fun U hU => le_iInf fun hK₀ => le_trans _ <| le_iSup₂ K₀.toCompacts hK₀
@@ -584,6 +586,11 @@ theorem haarContent_outerMeasure_self_pos {K₀ : PositiveCompacts G} :
 #align measure_theory.measure.haar.haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.haarContent_outerMeasure_self_pos
 #align measure_theory.measure.haar.add_haar_content_outer_measure_self_pos MeasureTheory.Measure.haar.addHaarContent_outerMeasure_self_pos
 
+@[to_additive]
+theorem haarContent_outerMeasure_closure_pos (K₀ : PositiveCompacts G) :
+    0 < (haarContent K₀).outerMeasure (closure K₀) :=
+  (haarContent_outerMeasure_self_pos K₀).trans_le (OuterMeasure.mono _ subset_closure)
+
 end haar
 
 open haar
@@ -593,7 +600,7 @@ open haar
 -/
 
 
-variable [TopologicalSpace G] [T2Space G] [TopologicalGroup G] [MeasurableSpace G] [BorelSpace G]
+variable [TopologicalSpace G] [TopologicalGroup G] [MeasurableSpace G] [BorelSpace G]
 
 -- Porting note: Even in `noncomputable section`, a definition with `to_additive` require
 --               `noncomputable` to generate an additive definition.
@@ -604,14 +611,16 @@ variable [TopologicalSpace G] [T2Space G] [TopologicalGroup G] [MeasurableSpace
 "The Haar measure on the locally compact additive group `G`, scaled so that
 `addHaarMeasure K₀ K₀ = 1`."]
 noncomputable def haarMeasure (K₀ : PositiveCompacts G) : Measure G :=
-  ((haarContent K₀).outerMeasure K₀)⁻¹ • (haarContent K₀).measure
+  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
+  ((haarContent K₀).measure K₀)⁻¹ • (haarContent K₀).measure
 #align measure_theory.measure.haar_measure MeasureTheory.Measure.haarMeasure
 #align measure_theory.measure.add_haar_measure MeasureTheory.Measure.addHaarMeasure
 
 @[to_additive]
-theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
-    haarMeasure K₀ s = (haarContent K₀).outerMeasure s / (haarContent K₀).outerMeasure K₀ := by
-  change ((haarContent K₀).outerMeasure K₀)⁻¹ * (haarContent K₀).measure s = _
+theorem haarMeasure_apply [LocallyCompactSpace G]
+    {K₀ : PositiveCompacts G} {s : Set G} (hs : MeasurableSet s) :
+    haarMeasure K₀ s = (haarContent K₀).outerMeasure s / (haarContent K₀).measure K₀ := by
+  change ((haarContent K₀).measure K₀)⁻¹ * (haarContent K₀).measure s = _
   simp only [hs, div_eq_mul_inv, mul_comm, Content.measure_apply]
 #align measure_theory.measure.haar_measure_apply MeasureTheory.Measure.haarMeasure_apply
 #align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.addHaarMeasure_apply
@@ -619,11 +628,12 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
 @[to_additive]
 instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
     IsMulLeftInvariant (haarMeasure K₀) := by
+  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   rw [← forall_measure_preimage_mul_iff]
   intro g A hA
   rw [haarMeasure_apply hA, haarMeasure_apply (measurable_const_mul g hA)]
   -- Porting note: Here was `congr 1`, but `to_additive` failed to generate a theorem.
-  refine congr_arg (fun x : ℝ≥0∞ => x / (haarContent K₀).outerMeasure K₀) ?_
+  refine congr_arg (fun x : ℝ≥0∞ => x / (haarContent K₀).measure K₀) ?_
   apply Content.is_mul_left_invariant_outerMeasure
   apply is_left_invariant_haarContent
 #align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.isMulLeftInvariant_haarMeasure
@@ -632,9 +642,12 @@ instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
 @[to_additive]
 theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1 := by
   haveI : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
-  rw [haarMeasure_apply K₀.isCompact.measurableSet, ENNReal.div_self]
-  · rw [← pos_iff_ne_zero]; exact haarContent_outerMeasure_self_pos
-  · exact (Content.outerMeasure_lt_top_of_isCompact _ K₀.isCompact).ne
+  simp only [haarMeasure, smul_toOuterMeasure, OuterMeasure.coe_smul, Pi.smul_apply,
+    smul_eq_mul]
+  rw [← OuterRegular.measure_closure_eq_of_isCompact K₀.isCompact,
+    Content.measure_apply _ isClosed_closure.measurableSet, ENNReal.inv_mul_cancel]
+  · exact (haarContent_outerMeasure_closure_pos K₀).ne'
+  · exact (Content.outerMeasure_lt_top_of_isCompact _ K₀.isCompact.closure).ne
 #align measure_theory.measure.haar_measure_self MeasureTheory.Measure.haarMeasure_self
 #align measure_theory.measure.add_haar_measure_self MeasureTheory.Measure.addHaarMeasure_self
 
@@ -643,11 +656,16 @@ theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1
 instance regular_haarMeasure {K₀ : PositiveCompacts G} : (haarMeasure K₀).Regular := by
   haveI : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
   apply Regular.smul
-  rw [ENNReal.inv_ne_top]
-  exact haarContent_outerMeasure_self_pos.ne'
+  rw [← OuterRegular.measure_closure_eq_of_isCompact K₀.isCompact,
+    Content.measure_apply _ isClosed_closure.measurableSet, ENNReal.inv_ne_top]
+  exact (haarContent_outerMeasure_closure_pos K₀).ne'
 #align measure_theory.measure.regular_haar_measure MeasureTheory.Measure.regular_haarMeasure
 #align measure_theory.measure.regular_add_haar_measure MeasureTheory.Measure.regular_addHaarMeasure
 
+@[to_additive]
+theorem haarMeasure_closure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ (closure K₀) = 1 := by
+  rw [IsCompact.measure_closure_eq_of_group K₀.isCompact, haarMeasure_self]
+
 /-- The Haar measure is sigma-finite in a second countable group. -/
 @[to_additive "The additive Haar measure is sigma-finite in a second countable group."]
 instance sigmaFinite_haarMeasure [SecondCountableTopology G] {K₀ : PositiveCompacts G} :
@@ -760,11 +778,14 @@ variable [SecondCountableTopology G]
   require `μ ≠ 0`).
   See also `isAddHaarMeasure_eq_smul_of_regular` for a statement not assuming second-countability."]
 theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
-    (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ :=
-  (measure_eq_div_smul μ (haarMeasure K₀) K₀.isCompact.measurableSet
-        (measure_pos_of_nonempty_interior _ K₀.interior_nonempty).ne'
-        K₀.isCompact.measure_lt_top.ne).trans
-    (by rw [haarMeasure_self, div_one])
+    (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ := by
+  have : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group
+  have A : Set.Nonempty (interior (closure (K₀ : Set G))) :=
+    K₀.interior_nonempty.mono (interior_mono subset_closure)
+  have := measure_eq_div_smul μ (haarMeasure K₀) (isClosed_closure (s := K₀)).measurableSet
+    (measure_pos_of_nonempty_interior _ A).ne' K₀.isCompact.closure.measure_lt_top.ne
+  rwa [haarMeasure_closure_self, div_one, IsCompact.measure_closure_eq_of_group K₀.isCompact]
+    at this
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -375,7 +375,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     apply isCompact_univ_pi; intro K; apply isCompact_Icc
   refine' this.inter_iInter_nonempty (clPrehaar K₀) (fun s => isClosed_closure) fun t => _
   let V₀ := ⋂ V ∈ t, (V : OpenNhdsOf (1 : G)).carrier
-  have h1V₀ : IsOpen V₀ := isOpen_biInter_finset $ by rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₁
+  have h1V₀ : IsOpen V₀ := isOpen_biInter_finset <| by rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₁
   have h2V₀ : (1 : G) ∈ V₀ := by simp only [mem_iInter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₂
   refine' ⟨prehaar K₀ V₀, _⟩
   constructor
refactor(*): change definition of Set.image2 etc (#9275)
  • Redefine Set.image2 to use ∃ a ∈ s, ∃ b ∈ t, f a b = c instead of ∃ a b, a ∈ s ∧ b ∈ t ∧ f a b = c.
  • Redefine Set.seq as Set.image2. The new definition is equal to the old one but rw [Set.seq] gives a different result.
  • Redefine Filter.map₂ to use ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s instead of ∃ u v, u ∈ f ∧ v ∈ g ∧ ...
  • Update lemmas like Set.mem_image2, Finset.mem_image₂, Set.mem_mul, Finset.mem_div etc

The two reasons to make the change are:

  • ∃ a ∈ s, ∃ b ∈ t, _ is a simp-normal form, and
  • it looks a bit nicer.
Diff
@@ -728,9 +728,8 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
   suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
   intro v hvV
   obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
-  refine' ⟨x, v⁻¹ * x, hKE hxvK, _, _⟩
-  · apply hKE
-    simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
+  refine ⟨x, hKE hxvK, v⁻¹ * x, hKE ?_, ?_⟩
+  · simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
   · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
 #align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
 #align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
feat: uniqueness of Haar measure in general locally compact groups (#8198)

We prove that two regular Haar measures in a locally compact group coincide up to scalar multiplication, and the same thing for inner regular Haar measures. This is implemented in a new file MeasureTheory.Measure.Haar.Unique. A few results that used to be in the MeasureTheory.Measure.Haar.Basic are moved to this file (and extended) so several imports have to be changed.

Diff
@@ -13,11 +13,10 @@ import Mathlib.Topology.Algebra.Group.Compact
 /-!
 # Haar measure
 
-In this file we prove the existence and uniqueness (up to scalar multiples) of Haar measure
-for a locally compact Hausdorff topological group.
+In this file we prove the existence of Haar measure for a locally compact Hausdorff topological
+group.
 
-For the construction, we follow the write-up by Jonathan Gleason,
-*Existence and Uniqueness of Haar Measure*.
+We follow the write-up by Jonathan Gleason, *Existence and Uniqueness of Haar Measure*.
 This is essentially the same argument as in
 https://en.wikipedia.org/wiki/Haar_measure#A_construction_using_compact_subsets.
 
@@ -31,13 +30,15 @@ formally using Tychonoff's theorem.
 This function `h` forms a content, which we can extend to an outer measure and then a measure
 (`haarMeasure`).
 We normalize the Haar measure so that the measure of `K₀` is `1`.
-We show that for second countable spaces any left invariant Borel measure is a scalar multiple of
-the Haar measure.
 
 Note that `μ` need not coincide with `h` on compact sets, according to
 [halmos1950measure, ch. X, §53 p.233]. However, we know that `h(K)` lies between `μ(Kᵒ)` and `μ(K)`,
 where `ᵒ` denotes the interior.
 
+We also give a form of uniqueness of Haar measure, for σ-finite measures on second-countable
+locally compact groups. For more involved statements not assuming second-countability, see
+the file `MeasureTheory.Measure.Haar.Unique`.
+
 ## Main Declarations
 
 * `haarMeasure`: the Haar measure on a locally compact Hausdorff group. This is a left invariant
@@ -50,8 +51,8 @@ where `ᵒ` denotes the interior.
   it is invariant and gives finite mass to compact sets and positive mass to nonempty open sets.
 * `haar` : some choice of a Haar measure, on a locally compact Hausdorff group, constructed as
   `haarMeasure K` where `K` is some arbitrary choice of a compact set with nonempty interior.
-* `haarMeasure_unique`: Every σ-finite left invariant measure on a locally compact Hausdorff group
-  is a scalar multiple of the Haar measure.
+* `haarMeasure_unique`: Every σ-finite left invariant measure on a second-countable locally compact
+  Hausdorff group is a scalar multiple of the Haar measure.
 
 ## References
 * Paul Halmos (1950), Measure Theory, §53
@@ -677,18 +678,88 @@ noncomputable def haar [LocallyCompactSpace G] : Measure G :=
 #align measure_theory.measure.haar MeasureTheory.Measure.haar
 #align measure_theory.measure.add_haar MeasureTheory.Measure.addHaar
 
-section SecondCountable
+/-! Steinhaus theorem: if `E` has positive measure, then `E / E` contains a neighborhood of zero.
+Note that this is not true for general regular Haar measures: in `ℝ × ℝ` where the first factor
+has the discrete topology, then `E = ℝ × {0}` has infinite measure for the regular Haar measure,
+but `E / E` does not contain a neighborhood of zero. On the other hand, it is always true for
+inner regular Haar measures (and in particular for any Haar measure on a second countable group).
+-/
+
+/-- **Steinhaus Theorem** In any locally compact group `G` with an inner regular Haar measure `μ`,
+for any measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
+@[to_additive
+"**Steinhaus Theorem** In any locally compact group `G` with an inner regular Haar measure `μ`,
+for any measurable set `E` of positive measure, the set `E - E` is a neighbourhood of `0`."]
+theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [LocallyCompactSpace G]
+    [InnerRegular μ] (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) :
+    E / E ∈ 𝓝 (1 : G) := by
+  /- For any inner regular measure `μ` and set `E` of positive measure, we can find a compact
+       set `K` of positive measure inside `E`. Further, there exists an open
+       set `U` containing `K` with measure arbitrarily close to `K` (here `μ U < 2 * μ K` suffices).
+       Then, we can pick an open neighborhood of `1`, say `V` such that such that `V * K` is
+       contained in `U`. Now note that for any `v` in `V`, the sets `K` and `{v} * K` can not be
+       disjoint because they are both of measure `μ K` (since `μ` is left invariant) and also
+       contained in `U`, yet we have that `μ U < 2 * μ K`. This show that `K / K` contains the
+       neighborhood `V` of `1`, and therefore that it is itself such a neighborhood. -/
+  obtain ⟨K, hKE, hK, K_closed, hKpos⟩ :
+      ∃ (K : Set G), K ⊆ E ∧ IsCompact K ∧ IsClosed K ∧ 0 < μ K := by
+    rcases MeasurableSet.exists_lt_isCompact hE hEpos with ⟨K, KE, K_comp, K_meas⟩
+    refine ⟨closure K, ?_, K_comp.closure, isClosed_closure, ?_⟩
+    · exact IsCompact.closure_subset_of_measurableSet_of_group K_comp hE KE
+    · rwa [K_comp.measure_closure_eq_of_group]
+  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G), K ⊆ U ∧ IsOpen U ∧ μ U < μ K + μ K :=
+    hK.exists_isOpen_lt_add hKpos.ne'
+  obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U :=
+    compact_open_separated_mul_left hK hU hUK
+  have hv : ∀ v : G, v ∈ V → ¬Disjoint ({v} * K) K := by
+    intro v hv hKv
+    have hKvsub : {v} * K ∪ K ⊆ U := by
+      apply Set.union_subset _ hUK
+      apply _root_.subset_trans _ hVKU
+      apply Set.mul_subset_mul _ (Set.Subset.refl K)
+      simp only [Set.singleton_subset_iff, hv]
+    replace hKvsub := @measure_mono _ _ μ _ _ hKvsub
+    have hcontr := lt_of_le_of_lt hKvsub hμUK
+    rw [measure_union hKv K_closed.measurableSet] at hcontr
+    have hKtranslate : μ ({v} * K) = μ K := by
+      simp only [singleton_mul, image_mul_left, measure_preimage_mul]
+    rw [hKtranslate, lt_self_iff_false] at hcontr
+    assumption
+  suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
+  intro v hvV
+  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
+  refine' ⟨x, v⁻¹ * x, hKE hxvK, _, _⟩
+  · apply hKE
+    simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
+  · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
+#align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
+#align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
+
+
+section SecondCountable_SigmaFinite
+/-! In this section, we investigate uniqueness of left-invariant measures without assuming that
+the measure is finite on compact sets, but assuming σ-finiteness instead. We also rely on
+second-countability, to ensure that the group operations are measurable: in this case, one can
+bypass all topological arguments, and conclude using uniqueness of σ-finite left-invariant measures
+in measurable groups.
+
+For more general uniqueness statements without second-countability assumptions,
+see the file `MeasureTheory.Measure.Haar.Unique`.
+-/
 
 variable [SecondCountableTopology G]
 
-/-- The Haar measure is unique up to scaling. More precisely: every σ-finite left invariant measure
-  is a scalar multiple of the Haar measure.
+/-- **Uniqueness of left-invariant measures**: In a second-countable locally compact group, any
+  σ-finite left-invariant measure is a scalar multiple of the Haar measure.
   This is slightly weaker than assuming that `μ` is a Haar measure (in particular we don't require
-  `μ ≠ 0`). -/
+  `μ ≠ 0`).
+  See also `isHaarMeasure_eq_smul_of_regular` for a statement not assuming second-countability. -/
 @[to_additive
-"The additive Haar measure is unique up to scaling. More precisely: every σ-finite left invariant
-measure is a scalar multiple of the additive Haar measure. This is slightly weaker than assuming
-that `μ` is an additive Haar measure (in particular we don't require `μ ≠ 0`)."]
+"**Uniqueness of left-invariant measures**: In a second-countable locally compact additive group,
+  any σ-finite left-invariant measure is a scalar multiple of the additive Haar measure.
+  This is slightly weaker than assuming that `μ` is a additive Haar measure (in particular we don't
+  require `μ ≠ 0`).
+  See also `isAddHaarMeasure_eq_smul_of_regular` for a statement not assuming second-countability."]
 theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
     (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ :=
   (measure_eq_div_smul μ (haarMeasure K₀) K₀.isCompact.measurableSet
@@ -721,168 +792,13 @@ theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLe
 #align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
 #align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
 
-@[to_additive isAddHaarMeasure_eq_smul_isAddHaarMeasure]
-theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
-    [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν := by
-  have K : PositiveCompacts G := Classical.arbitrary _
-  have νpos : 0 < ν K := measure_pos_of_nonempty_interior _ K.interior_nonempty
-  have νne : ν K ≠ ∞ := K.isCompact.measure_lt_top.ne
-  refine' ⟨μ K / ν K, _, _, _⟩
-  · simp only [νne, (μ.measure_pos_of_nonempty_interior K.interior_nonempty).ne', Ne.def,
-      ENNReal.div_eq_zero_iff, not_false_iff, or_self_iff]
-  · simp only [div_eq_mul_inv, νpos.ne', (K.isCompact.measure_lt_top (μ := μ)).ne, or_self_iff,
-      ENNReal.inv_eq_top, ENNReal.mul_eq_top, Ne.def, not_false_iff, and_false_iff,
-      false_and_iff]
-  · calc
-      μ = μ K • haarMeasure K := haarMeasure_unique μ K
-      _ = (μ K / ν K) • ν K • haarMeasure K := by
-        rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
-      _ = (μ K / ν K) • ν := by rw [← haarMeasure_unique ν K]
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
-
-/-- An invariant measure is absolutely continuous with respect to a Haar measure. -/
-@[to_additive
-"An invariant measure is absolutely continuous with respect to an additive Haar measure. "]
-theorem absolutelyContinuous_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
-    [SigmaFinite μ] [IsMulLeftInvariant μ] [IsHaarMeasure ν] : μ ≪ ν := by
-  have K : PositiveCompacts G := Classical.arbitrary _
-  obtain ⟨c, -, -, h⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ haarMeasure K = c • ν :=
-    isHaarMeasure_eq_smul_isHaarMeasure _ _
-  rw [haarMeasure_unique μ K, h, smul_smul]
-  exact AbsolutelyContinuous.smul (Eq.absolutelyContinuous rfl) _
-
--- see Note [lower instance priority]
-@[to_additive]
-instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
-    [IsHaarMeasure μ] : Regular μ := by
-  have K : PositiveCompacts G := Classical.arbitrary _
-  obtain ⟨c, _, ctop, hμ⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • haarMeasure K :=
-    isHaarMeasure_eq_smul_isHaarMeasure μ _
-  rw [hμ]
-  exact Regular.smul ctop
-#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_isHaarMeasure
-#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_isAddHaarMeasure
-
-/-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
-  measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
-@[to_additive
-"**Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any measurable
-set `E` of positive measure, the set `E - E` is a neighbourhood of `0`."]
-theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [LocallyCompactSpace G]
-    (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) : E / E ∈ 𝓝 (1 : G) := by
-  /- For any regular measure `μ` and set `E` of positive measure, we can find a compact set `K` of
-       positive measure inside `E`. Further, for any outer regular measure `μ` there exists an open
-       set `U` containing `K` with measure arbitrarily close to `K` (here `μ U < 2 * μ K` suffices).
-       Then, we can pick an open neighborhood of `1`, say `V` such that such that `V * K` is
-       contained in `U`. Now note that for any `v` in `V`, the sets `K` and `{v} * K` can not be
-       disjoint because they are both of measure `μ K` (since `μ` is left regular) and also
-       contained in `U`, yet we have that `μ U < 2 * μ K`. This show that `K / K` contains the
-       neighborhood `V` of `1`, and therefore that it is itself such a neighborhood. -/
-  obtain ⟨L, hL, hLE, hLpos, hLtop⟩ : ∃ L : Set G, MeasurableSet L ∧ L ⊆ E ∧ 0 < μ L ∧ μ L < ∞ :=
-    exists_subset_measure_lt_top hE hEpos
-  obtain ⟨K, hKL, hK, hKpos⟩ : ∃ (K : Set G), K ⊆ L ∧ IsCompact K ∧ 0 < μ K :=
-    MeasurableSet.exists_lt_isCompact_of_ne_top hL (ne_of_lt hLtop) hLpos
-  have hKtop : μ K ≠ ∞ := by
-    apply ne_top_of_le_ne_top (ne_of_lt hLtop)
-    apply measure_mono hKL
-  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G), U ⊇ K ∧ IsOpen U ∧ μ U < μ K + μ K :=
-    Set.exists_isOpen_lt_add K hKtop hKpos.ne'
-  obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U :=
-    compact_open_separated_mul_left hK hU hUK
-  have hv : ∀ v : G, v ∈ V → ¬Disjoint ({v} * K) K := by
-    intro v hv hKv
-    have hKvsub : {v} * K ∪ K ⊆ U := by
-      apply Set.union_subset _ hUK
-      apply _root_.subset_trans _ hVKU
-      apply Set.mul_subset_mul _ (Set.Subset.refl K)
-      simp only [Set.singleton_subset_iff, hv]
-    replace hKvsub := @measure_mono _ _ μ _ _ hKvsub
-    have hcontr := lt_of_le_of_lt hKvsub hμUK
-    rw [measure_union hKv (IsCompact.measurableSet hK)] at hcontr
-    have hKtranslate : μ ({v} * K) = μ K := by
-      simp only [singleton_mul, image_mul_left, measure_preimage_mul]
-    rw [hKtranslate, lt_self_iff_false] at hcontr
-    assumption
-  suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
-  intro v hvV
-  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
-  refine' ⟨x, v⁻¹ * x, hLE (hKL hxvK), _, _⟩
-  · apply hKL.trans hLE
-    simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
-  · simp only [div_eq_iff_eq_mul, ← mul_assoc, mul_right_inv, one_mul]
-#align measure_theory.measure.div_mem_nhds_one_of_haar_pos MeasureTheory.Measure.div_mem_nhds_one_of_haar_pos
-#align measure_theory.measure.sub_mem_nhds_zero_of_add_haar_pos MeasureTheory.Measure.sub_mem_nhds_zero_of_addHaar_pos
+#noalign measure_theory.measure.regular_of_is_haar_measure
+#noalign measure_theory.measure.regular_of_is_add_haar_measure
 
-end SecondCountable
+end SecondCountable_SigmaFinite
 
 end Group
 
-section CommGroup
-
-variable {G : Type*} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
-  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
-
-/-- Any Haar measure is invariant under inversion in an abelian group. -/
-@[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
-instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
-    IsInvInvariant μ := by
-  -- the image measure is a Haar measure. By uniqueness up to multiplication, it is of the form
-  -- `c μ`. Applying again inversion, one gets the measure `c^2 μ`. But since inversion is an
-  -- involution, this is also `μ`. Hence, `c^2 = 1`, which implies `c = 1`.
-  constructor
-  haveI : IsHaarMeasure (Measure.map Inv.inv μ) :=
-    (MulEquiv.inv G).isHaarMeasure_map μ continuous_inv continuous_inv
-  obtain ⟨c, _, _, hc⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ Measure.map Inv.inv μ = c • μ :=
-    isHaarMeasure_eq_smul_isHaarMeasure _ _
-  have : map Inv.inv (map Inv.inv μ) = c ^ 2 • μ := by
-    simp only [hc, smul_smul, pow_two, Measure.map_smul]
-  have μeq : μ = c ^ 2 • μ := by
-    rw [map_map continuous_inv.measurable continuous_inv.measurable] at this
-    simpa only [inv_involutive, Involutive.comp_self, map_id]
-  have K : PositiveCompacts G := Classical.arbitrary _
-  have : c ^ 2 * μ K = 1 ^ 2 * μ K := by
-    conv_rhs => rw [μeq]
-    simp
-  have : c ^ 2 = 1 ^ 2 :=
-    (ENNReal.mul_eq_mul_right (measure_pos_of_nonempty_interior _ K.interior_nonempty).ne'
-          K.isCompact.measure_lt_top.ne).1 this
-  have : c = 1 := (ENNReal.pow_strictMono two_ne_zero).injective this
-  rw [Measure.inv, hc, this, one_smul]
-#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
-#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant
-
-@[to_additive]
-theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) :
-    MeasurePreserving (fun g : G => g ^ n) μ μ :=
-  { measurable := (continuous_zpow n).measurable
-    map_eq := by
-      let f := @zpowGroupHom G _ n
-      have hf : Continuous f := continuous_zpow n
-      haveI : (μ.map f).IsHaarMeasure :=
-        isHaarMeasure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
-      obtain ⟨C, -, -, hC⟩ := isHaarMeasure_eq_smul_isHaarMeasure (μ.map f) μ
-      suffices C = 1 by rwa [this, one_smul] at hC
-      have h_univ : (μ.map f) univ = μ univ := by
-        rw [map_apply_of_aemeasurable hf.measurable.aemeasurable MeasurableSet.univ,
-          preimage_univ]
-      have hμ₀ : μ univ ≠ 0 := IsOpenPosMeasure.open_pos univ isOpen_univ univ_nonempty
-      have hμ₁ : μ univ ≠ ∞ := CompactSpace.isFiniteMeasure.measure_univ_lt_top.ne
-      rwa [hC, smul_apply, Algebra.id.smul_eq_mul, mul_comm, ← ENNReal.eq_div_iff hμ₀ hμ₁,
-        ENNReal.div_self hμ₀ hμ₁] at h_univ }
-#align measure_theory.measure.measure_preserving_zpow MeasureTheory.Measure.measurePreserving_zpow
-#align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
-
-@[to_additive]
-theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) {X : Type*}
-    [MeasurableSpace X] {μ' : Measure X} {f : X → G} (hf : MeasurePreserving f μ' μ) :
-    MeasurePreserving (fun x => f x ^ n) μ' μ :=
-  (measurePreserving_zpow μ hn).comp hf
-#align measure_theory.measure.measure_preserving.zpow MeasureTheory.Measure.MeasurePreserving.zpow
-#align measure_theory.measure.measure_preserving.zsmul MeasureTheory.Measure.MeasurePreserving.zsmul
-
-end CommGroup
-
 end Measure
 
 end MeasureTheory
chore: replace exact_mod_cast tactic with mod_cast elaborator where possible (#8404)

We still have the exact_mod_cast tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast are the ones that don't work using the term elaborator by itself.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -316,15 +316,15 @@ theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).N
 theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
     {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂.1) :
     prehaar (K₀ : Set G) U K₁ ≤ prehaar (K₀ : Set G) U K₂ := by
-  simp only [prehaar]; rw [div_le_div_right]; exact_mod_cast index_mono K₂.2 h hU
-  exact_mod_cast index_pos K₀ hU
+  simp only [prehaar]; rw [div_le_div_right]; exact mod_cast index_mono K₂.2 h hU
+  exact mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_mono MeasureTheory.Measure.haar.prehaar_mono
 #align measure_theory.measure.haar.add_prehaar_mono MeasureTheory.Measure.haar.addPrehaar_mono
 
 @[to_additive]
 theorem prehaar_self {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty) :
     prehaar (K₀ : Set G) U K₀.toCompacts = 1 :=
-  div_self <| ne_of_gt <| by exact_mod_cast index_pos K₀ hU
+  div_self <| ne_of_gt <| mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_self MeasureTheory.Measure.haar.prehaar_self
 #align measure_theory.measure.haar.add_prehaar_self MeasureTheory.Measure.haar.addPrehaar_self
 
@@ -333,7 +333,7 @@ theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Comp
     (hU : (interior U).Nonempty) :
     prehaar (K₀ : Set G) U (K₁ ⊔ K₂) ≤ prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂ := by
   simp only [prehaar]; rw [div_add_div_same, div_le_div_right]
-  exact_mod_cast index_union_le K₁ K₂ hU; exact_mod_cast index_pos K₀ hU
+  exact mod_cast index_union_le K₁ K₂ hU; exact mod_cast index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_sup_le MeasureTheory.Measure.haar.prehaar_sup_le
 #align measure_theory.measure.haar.add_prehaar_sup_le MeasureTheory.Measure.haar.addPrehaar_sup_le
 
@@ -344,7 +344,7 @@ theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Comp
   simp only [prehaar]; rw [div_add_div_same]
   -- Porting note: Here was `congr`, but `to_additive` failed to generate a theorem.
   refine congr_arg (fun x : ℝ => x / index K₀ U) ?_
-  exact_mod_cast index_union_eq K₁ K₂ hU h
+  exact mod_cast index_union_eq K₁ K₂ hU h
 #align measure_theory.measure.haar.prehaar_sup_eq MeasureTheory.Measure.haar.prehaar_sup_eq
 #align measure_theory.measure.haar.add_prehaar_sup_eq MeasureTheory.Measure.haar.addPrehaar_sup_eq
 
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -665,7 +665,7 @@ instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure (
     isHaarMeasure_of_isCompact_nonempty_interior (haarMeasure K₀) K₀ K₀.isCompact
       K₀.interior_nonempty
   · simp only [haarMeasure_self]; exact one_ne_zero
-  · simp only [haarMeasure_self]
+  · simp only [haarMeasure_self, ne_eq, ENNReal.one_ne_top, not_false_eq_true]
 #align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.isHaarMeasure_haarMeasure
 #align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_addHaarMeasure
 
feat: add some lemmas for Haar measures (#7034)

We prove some lemmas that will be useful in following PRs #6832 and #7037, mainly:

theorem Basis.addHaar_eq {b : Basis ι ℝ E} {b' : Basis ι' ℝ E} :
     b.addHaar = b'.addHaar ↔ b.addHaar b'.parallelepiped = 1

theorem Basis.parallelepiped_eq_map (b : Basis ι ℝ E) :
     b.parallelepiped = (TopologicalSpace.PositiveCompacts.piIcc01 ι).map b.equivFun.symm
       b.equivFunL.symm.continuous

theorem Basis.addHaar_map (b : Basis ι ℝ E) (f : E ≃L[ℝ] F) :
    map f b.addHaar = (b.map f.toLinearEquiv).addHaar

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -698,6 +698,14 @@ theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
+/-- Let `μ` be a σ-finite left invariant measure on `G`. Then `μ` is equal to the Haar measure
+defined by `K₀` iff `μ K₀ = 1`. -/
+@[to_additive]
+theorem haarMeasure_eq_iff (K₀ : PositiveCompacts G) (μ : Measure G) [SigmaFinite μ]
+    [IsMulLeftInvariant μ] :
+    haarMeasure K₀ = μ ↔ μ K₀ = 1 :=
+  ⟨fun h => h.symm ▸ haarMeasure_self, fun h => by rw [haarMeasure_unique μ K₀, h, one_smul]⟩
+
 example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : PositiveCompacts G) :
     μ = μ K₀.1 • haarMeasure K₀ :=
   haarMeasure_unique μ K₀
feat: expand API on locally integrable functions (#7006)

Measure theory prerequisites for Rademacher theorem in #7003.

Diff
@@ -733,6 +733,17 @@ theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Mea
 #align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
 #align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
 
+/-- An invariant measure is absolutely continuous with respect to a Haar measure. -/
+@[to_additive
+"An invariant measure is absolutely continuous with respect to an additive Haar measure. "]
+theorem absolutelyContinuous_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
+    [SigmaFinite μ] [IsMulLeftInvariant μ] [IsHaarMeasure ν] : μ ≪ ν := by
+  have K : PositiveCompacts G := Classical.arbitrary _
+  obtain ⟨c, -, -, h⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ haarMeasure K = c • ν :=
+    isHaarMeasure_eq_smul_isHaarMeasure _ _
+  rw [haarMeasure_unique μ K, h, smul_smul]
+  exact AbsolutelyContinuous.smul (Eq.absolutelyContinuous rfl) _
+
 -- see Note [lower instance priority]
 @[to_additive]
 instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
feat: Alexandrov-discrete spaces (#6962)

We define Alexandrov-discrete spaces as topological spaces where the intersection of a family of open sets is open.

This PR only gives a minimal API because the goal is to ensure that lemma names like isOpen_sInter are free to use for AlexandrovDiscrete. The existing lemmas are getting prefixed by Set.Finite or suffixed by _of_finite.

Diff
@@ -374,8 +374,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
     apply isCompact_univ_pi; intro K; apply isCompact_Icc
   refine' this.inter_iInter_nonempty (clPrehaar K₀) (fun s => isClosed_closure) fun t => _
   let V₀ := ⋂ V ∈ t, (V : OpenNhdsOf (1 : G)).carrier
-  have h1V₀ : IsOpen V₀ := by
-    apply isOpen_biInter; apply Finset.finite_toSet; rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₁
+  have h1V₀ : IsOpen V₀ := isOpen_biInter_finset $ by rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₁
   have h2V₀ : (1 : G) ∈ V₀ := by simp only [mem_iInter]; rintro ⟨⟨V, hV₁⟩, hV₂⟩ _; exact hV₂
   refine' ⟨prehaar K₀ V₀, _⟩
   constructor
chore: tidy various files (#6393)
Diff
@@ -296,14 +296,14 @@ theorem is_left_invariant_index {K : Set G} (hK : IsCompact K) (g : G) {V : Set
 -/
 
 
-@[to_additive add_prehaar_le_add_index]
+@[to_additive add_prehaar_le_addIndex]
 theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G)
     (hU : (interior U).Nonempty) : prehaar (K₀ : Set G) U K ≤ index (K : Set G) K₀ := by
   unfold prehaar; rw [div_le_iff] <;> norm_cast
   · apply le_index_mul K₀ K hU
   · exact index_pos K₀ hU
 #align measure_theory.measure.haar.prehaar_le_index MeasureTheory.Measure.haar.prehaar_le_index
-#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_add_index
+#align measure_theory.measure.haar.add_prehaar_le_add_index MeasureTheory.Measure.haar.add_prehaar_le_addIndex
 
 @[to_additive]
 theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) {K : Set G}
@@ -401,7 +401,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) :
   This is roughly equal to the Haar measure on compact sets,
   but it can differ slightly. We do know that
   `haarMeasure K₀ (interior K) ≤ chaar K₀ K ≤ haarMeasure K₀ K`. -/
-@[to_additive addCHaar "additive version of `measure_theory.measure.haar.chaar`"]
+@[to_additive addCHaar "additive version of `MeasureTheory.Measure.haar.chaar`"]
 noncomputable def chaar (K₀ : PositiveCompacts G) (K : Compacts G) : ℝ :=
   Classical.choose (nonempty_iInter_clPrehaar K₀) K
 #align measure_theory.measure.haar.chaar MeasureTheory.Measure.haar.chaar
@@ -537,7 +537,7 @@ variable [T2Space G]
 --               Please refer to leanprover/lean4#2077.
 
 /-- The function `chaar` interpreted in `ℝ≥0`, as a content -/
-@[to_additive "additive version of `measure_theory.measure.haar.haar_content`"]
+@[to_additive "additive version of `MeasureTheory.Measure.haar.haarContent`"]
 noncomputable def haarContent (K₀ : PositiveCompacts G) : Content G where
   toFun K := ⟨chaar K₀ K, chaar_nonneg _ _⟩
   mono' K₁ K₂ h := by simp only [← NNReal.coe_le_coe, NNReal.toReal, chaar_mono, h]
@@ -761,17 +761,17 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
        disjoint because they are both of measure `μ K` (since `μ` is left regular) and also
        contained in `U`, yet we have that `μ U < 2 * μ K`. This show that `K / K` contains the
        neighborhood `V` of `1`, and therefore that it is itself such a neighborhood. -/
-  obtain ⟨L, hL, hLE, hLpos, hLtop⟩ : ∃ L : Set G, MeasurableSet L ∧ L ⊆ E ∧ 0 < μ L ∧ μ L < ∞
-  exact exists_subset_measure_lt_top hE hEpos
-  obtain ⟨K, hKL, hK, hKpos⟩ : ∃ (K : Set G), K ⊆ L ∧ IsCompact K ∧ 0 < μ K
-  exact MeasurableSet.exists_lt_isCompact_of_ne_top hL (ne_of_lt hLtop) hLpos
+  obtain ⟨L, hL, hLE, hLpos, hLtop⟩ : ∃ L : Set G, MeasurableSet L ∧ L ⊆ E ∧ 0 < μ L ∧ μ L < ∞ :=
+    exists_subset_measure_lt_top hE hEpos
+  obtain ⟨K, hKL, hK, hKpos⟩ : ∃ (K : Set G), K ⊆ L ∧ IsCompact K ∧ 0 < μ K :=
+    MeasurableSet.exists_lt_isCompact_of_ne_top hL (ne_of_lt hLtop) hLpos
   have hKtop : μ K ≠ ∞ := by
     apply ne_top_of_le_ne_top (ne_of_lt hLtop)
     apply measure_mono hKL
-  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G), U ⊇ K ∧ IsOpen U ∧ μ U < μ K + μ K
-  exact Set.exists_isOpen_lt_add K hKtop hKpos.ne'
-  obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U
-  exact compact_open_separated_mul_left hK hU hUK
+  obtain ⟨U, hUK, hU, hμUK⟩ : ∃ (U : Set G), U ⊇ K ∧ IsOpen U ∧ μ U < μ K + μ K :=
+    Set.exists_isOpen_lt_add K hKtop hKpos.ne'
+  obtain ⟨V, hV1, hVKU⟩ : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U :=
+    compact_open_separated_mul_left hK hU hUK
   have hv : ∀ v : G, v ∈ V → ¬Disjoint ({v} * K) K := by
     intro v hv hKv
     have hKvsub : {v} * K ∪ K ⊆ U := by
@@ -786,9 +786,9 @@ theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [Locall
       simp only [singleton_mul, image_mul_left, measure_preimage_mul]
     rw [hKtranslate, lt_self_iff_false] at hcontr
     assumption
-  suffices : V ⊆ E / E; exact Filter.mem_of_superset hV1 this
+  suffices V ⊆ E / E from Filter.mem_of_superset hV1 this
   intro v hvV
-  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K; exact Set.not_disjoint_iff.1 (hv v hvV)
+  obtain ⟨x, hxK, hxvK⟩ : ∃ x : G, x ∈ {v} * K ∧ x ∈ K := Set.not_disjoint_iff.1 (hv v hvV)
   refine' ⟨x, v⁻¹ * x, hLE (hKL hxvK), _, _⟩
   · apply hKL.trans hLE
     simpa only [singleton_mul, image_mul_left, mem_preimage] using hxK
@@ -821,7 +821,7 @@ instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G]
     simp only [hc, smul_smul, pow_two, Measure.map_smul]
   have μeq : μ = c ^ 2 • μ := by
     rw [map_map continuous_inv.measurable continuous_inv.measurable] at this
-    · simpa only [inv_involutive, Involutive.comp_self, map_id]
+    simpa only [inv_involutive, Involutive.comp_self, map_id]
   have K : PositiveCompacts G := Classical.arbitrary _
   have : c ^ 2 * μ K = 1 ^ 2 * μ K := by
     conv_rhs => rw [μeq]
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
@@ -75,7 +75,7 @@ namespace Measure
 
 section Group
 
-variable {G : Type _} [Group G]
+variable {G : Type*} [Group G]
 
 /-! We put the internal functions in the construction of the Haar measure in a namespace,
   so that the chosen names don't clash with other declarations.
@@ -802,7 +802,7 @@ end Group
 
 section CommGroup
 
-variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
+variable {G : Type*} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
   [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
 
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
@@ -856,7 +856,7 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
 #align measure_theory.measure.measure_preserving_zsmul MeasureTheory.Measure.measurePreserving_zsmul
 
 @[to_additive]
-theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) {X : Type _}
+theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) {X : Type*}
     [MeasurableSpace X] {μ' : Measure X} {f : X → G} (hf : MeasurePreserving f μ' μ) :
     MeasurePreserving (fun x => f x ^ n) μ' μ :=
   (measurePreserving_zpow μ hn).comp hf
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,17 +2,14 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.basic
-! 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.Content
 import Mathlib.MeasureTheory.Group.Prod
 import Mathlib.GroupTheory.Divisible
 import Mathlib.Topology.Algebra.Group.Compact
 
+#align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Haar measure
 
style: recover Is of Foo which is ported from is_foo (#4639)

I have misported is_foo to Foo because I misunderstood the rule for IsLawfulFoo. This PR recover Is of Foo which is ported from is_foo. This PR also renames some misported theorems.

Diff
@@ -47,9 +47,9 @@ where `ᵒ` denotes the interior.
   regular measure. It takes as argument a compact set of the group (with non-empty interior),
   and is normalized so that the measure of the given set is 1.
 * `haarMeasure_self`: the Haar measure is normalized.
-* `mulLeftInvariant_haarMeasure`: the Haar measure is left invariant.
+* `isMulLeftInvariant_haarMeasure`: the Haar measure is left invariant.
 * `regular_haarMeasure`: the Haar measure is a regular measure.
-* `haarMeasure_haarMeasure`: the Haar measure satisfies the `HaarMeasure` typeclass, i.e.,
+* `isHaarMeasure_haarMeasure`: the Haar measure satisfies the `IsHaarMeasure` typeclass, i.e.,
   it is invariant and gives finite mass to compact sets and positive mass to nonempty open sets.
 * `haar` : some choice of a Haar measure, on a locally compact Hausdorff group, constructed as
   `haarMeasure K` where `K` is some arbitrary choice of a compact set with nonempty interior.
@@ -620,8 +620,8 @@ theorem haarMeasure_apply {K₀ : PositiveCompacts G} {s : Set G} (hs : Measurab
 #align measure_theory.measure.add_haar_measure_apply MeasureTheory.Measure.addHaarMeasure_apply
 
 @[to_additive]
-instance mulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
-    MulLeftInvariant (haarMeasure K₀) := by
+instance isMulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
+    IsMulLeftInvariant (haarMeasure K₀) := by
   rw [← forall_measure_preimage_mul_iff]
   intro g A hA
   rw [haarMeasure_apply hA, haarMeasure_apply (measurable_const_mul g hA)]
@@ -629,8 +629,8 @@ instance mulLeftInvariant_haarMeasure (K₀ : PositiveCompacts G) :
   refine congr_arg (fun x : ℝ≥0∞ => x / (haarContent K₀).outerMeasure K₀) ?_
   apply Content.is_mul_left_invariant_outerMeasure
   apply is_left_invariant_haarContent
-#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.mulLeftInvariant_haarMeasure
-#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.addLeftInvariant_addHaarMeasure
+#align measure_theory.measure.is_mul_left_invariant_haar_measure MeasureTheory.Measure.isMulLeftInvariant_haarMeasure
+#align measure_theory.measure.is_add_left_invariant_add_haar_measure MeasureTheory.Measure.isAddLeftInvariant_addHaarMeasure
 
 @[to_additive]
 theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1 := by
@@ -664,14 +664,14 @@ sets and positive mass to nonempty open sets. -/
 @[to_additive
 "The additive Haar measure is an additive Haar measure, i.e., it is invariant and gives finite mass
 to compact sets and positive mass to nonempty open sets."]
-instance haarMeasure_haarMeasure (K₀ : PositiveCompacts G) : HaarMeasure (haarMeasure K₀) := by
+instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure (haarMeasure K₀) := by
   apply
-    haarMeasure_of_isCompact_nonempty_interior (haarMeasure K₀) K₀ K₀.isCompact
+    isHaarMeasure_of_isCompact_nonempty_interior (haarMeasure K₀) K₀ K₀.isCompact
       K₀.interior_nonempty
   · simp only [haarMeasure_self]; exact one_ne_zero
   · simp only [haarMeasure_self]
-#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.haarMeasure_haarMeasure
-#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.addHaarMeasure_addHaarMeasure
+#align measure_theory.measure.is_haar_measure_haar_measure MeasureTheory.Measure.isHaarMeasure_haarMeasure
+#align measure_theory.measure.is_add_haar_measure_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_addHaarMeasure
 
 /-- `haar` is some choice of a Haar measure, on a locally compact group. -/
 @[to_additive (attr := reducible)
@@ -693,7 +693,7 @@ variable [SecondCountableTopology G]
 "The additive Haar measure is unique up to scaling. More precisely: every σ-finite left invariant
 measure is a scalar multiple of the additive Haar measure. This is slightly weaker than assuming
 that `μ` is an additive Haar measure (in particular we don't require `μ ≠ 0`)."]
-theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [MulLeftInvariant μ]
+theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
     (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀ :=
   (measure_eq_div_smul μ (haarMeasure K₀) K₀.isCompact.measurableSet
         (measure_pos_of_nonempty_interior _ K₀.interior_nonempty).ne'
@@ -702,7 +702,7 @@ theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [MulLeftInvariant 
 #align measure_theory.measure.haar_measure_unique MeasureTheory.Measure.haarMeasure_unique
 #align measure_theory.measure.add_haar_measure_unique MeasureTheory.Measure.addHaarMeasure_unique
 
-example [LocallyCompactSpace G] (μ : Measure G) [HaarMeasure μ] (K₀ : PositiveCompacts G) :
+example [LocallyCompactSpace G] (μ : Measure G) [IsHaarMeasure μ] (K₀ : PositiveCompacts G) :
     μ = μ K₀.1 • haarMeasure K₀ :=
   haarMeasure_unique μ K₀
 
@@ -711,15 +711,15 @@ example [LocallyCompactSpace G] (μ : Measure G) [HaarMeasure μ] (K₀ : Positi
 @[to_additive
 "To show that an invariant σ-finite measure is regular it is sufficient to show that it is finite on
 some compact set with non-empty interior."]
-theorem regular_of_mulLeftInvariant {μ : Measure G} [SigmaFinite μ] [MulLeftInvariant μ]
+theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLeftInvariant μ]
     {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
   rw [haarMeasure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact Regular.smul hμK
-#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_mulLeftInvariant
-#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_addLeftInvariant
+#align measure_theory.measure.regular_of_is_mul_left_invariant MeasureTheory.Measure.regular_of_isMulLeftInvariant
+#align measure_theory.measure.regular_of_is_add_left_invariant MeasureTheory.Measure.regular_of_isAddLeftInvariant
 
-@[to_additive addHaarMeasure_eq_smul_addHaarMeasure]
-theorem haarMeasure_eq_smul_haarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
-    [HaarMeasure μ] [HaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν := by
+@[to_additive isAddHaarMeasure_eq_smul_isAddHaarMeasure]
+theorem isHaarMeasure_eq_smul_isHaarMeasure [LocallyCompactSpace G] (μ ν : Measure G)
+    [IsHaarMeasure μ] [IsHaarMeasure ν] : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • ν := by
   have K : PositiveCompacts G := Classical.arbitrary _
   have νpos : 0 < ν K := measure_pos_of_nonempty_interior _ K.interior_nonempty
   have νne : ν K ≠ ∞ := K.isCompact.measure_lt_top.ne
@@ -734,27 +734,27 @@ theorem haarMeasure_eq_smul_haarMeasure [LocallyCompactSpace G] (μ ν : Measure
       _ = (μ K / ν K) • ν K • haarMeasure K := by
         rw [smul_smul, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel νpos.ne' νne, mul_one]
       _ = (μ K / ν K) • ν := by rw [← haarMeasure_unique ν K]
-#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.haarMeasure_eq_smul_haarMeasure
-#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.addHaarMeasure_eq_smul_addHaarMeasure
+#align measure_theory.measure.is_haar_measure_eq_smul_is_haar_measure MeasureTheory.Measure.isHaarMeasure_eq_smul_isHaarMeasure
+#align measure_theory.measure.is_add_haar_measure_eq_smul_is_add_haar_measure MeasureTheory.Measure.isAddHaarMeasure_eq_smul_isAddHaarMeasure
 
 -- see Note [lower instance priority]
 @[to_additive]
-instance (priority := 90) regular_of_haarMeasure [LocallyCompactSpace G] (μ : Measure G)
-    [HaarMeasure μ] : Regular μ := by
+instance (priority := 90) regular_of_isHaarMeasure [LocallyCompactSpace G] (μ : Measure G)
+    [IsHaarMeasure μ] : Regular μ := by
   have K : PositiveCompacts G := Classical.arbitrary _
   obtain ⟨c, _, ctop, hμ⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ μ = c • haarMeasure K :=
-    haarMeasure_eq_smul_haarMeasure μ _
+    isHaarMeasure_eq_smul_isHaarMeasure μ _
   rw [hμ]
   exact Regular.smul ctop
-#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_haarMeasure
-#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_addHaarMeasure
+#align measure_theory.measure.regular_of_is_haar_measure MeasureTheory.Measure.regular_of_isHaarMeasure
+#align measure_theory.measure.regular_of_is_add_haar_measure MeasureTheory.Measure.regular_of_isAddHaarMeasure
 
 /-- **Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any
   measurable set `E` of positive measure, the set `E / E` is a neighbourhood of `1`. -/
 @[to_additive
 "**Steinhaus Theorem** In any locally compact group `G` with a haar measure `μ`, for any measurable
 set `E` of positive measure, the set `E - E` is a neighbourhood of `0`."]
-theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [HaarMeasure μ] [LocallyCompactSpace G]
+theorem div_mem_nhds_one_of_haar_pos (μ : Measure G) [IsHaarMeasure μ] [LocallyCompactSpace G]
     (E : Set G) (hE : MeasurableSet E) (hEpos : 0 < μ E) : E / E ∈ 𝓝 (1 : G) := by
   /- For any regular measure `μ` and set `E` of positive measure, we can find a compact set `K` of
        positive measure inside `E`. Further, for any outer regular measure `μ` there exists an open
@@ -806,20 +806,20 @@ end Group
 section CommGroup
 
 variable {G : Type _} [CommGroup G] [TopologicalSpace G] [TopologicalGroup G] [T2Space G]
-  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [HaarMeasure μ]
+  [MeasurableSpace G] [BorelSpace G] [SecondCountableTopology G] (μ : Measure G) [IsHaarMeasure μ]
 
 /-- Any Haar measure is invariant under inversion in an abelian group. -/
 @[to_additive "Any additive Haar measure is invariant under negation in an abelian group."]
-instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] :
-    InvInvariant μ := by
+instance (priority := 100) IsHaarMeasure.isInvInvariant [LocallyCompactSpace G] :
+    IsInvInvariant μ := by
   -- the image measure is a Haar measure. By uniqueness up to multiplication, it is of the form
   -- `c μ`. Applying again inversion, one gets the measure `c^2 μ`. But since inversion is an
   -- involution, this is also `μ`. Hence, `c^2 = 1`, which implies `c = 1`.
   constructor
-  haveI : HaarMeasure (Measure.map Inv.inv μ) :=
-    (MulEquiv.inv G).haarMeasure_map μ continuous_inv continuous_inv
+  haveI : IsHaarMeasure (Measure.map Inv.inv μ) :=
+    (MulEquiv.inv G).isHaarMeasure_map μ continuous_inv continuous_inv
   obtain ⟨c, _, _, hc⟩ : ∃ c : ℝ≥0∞, c ≠ 0 ∧ c ≠ ∞ ∧ Measure.map Inv.inv μ = c • μ :=
-    haarMeasure_eq_smul_haarMeasure _ _
+    isHaarMeasure_eq_smul_isHaarMeasure _ _
   have : map Inv.inv (map Inv.inv μ) = c ^ 2 • μ := by
     simp only [hc, smul_smul, pow_two, Measure.map_smul]
   have μeq : μ = c ^ 2 • μ := by
@@ -834,8 +834,8 @@ instance (priority := 100) HaarMeasure.invInvariant [LocallyCompactSpace G] :
           K.isCompact.measure_lt_top.ne).1 this
   have : c = 1 := (ENNReal.pow_strictMono two_ne_zero).injective this
   rw [Measure.inv, hc, this, one_smul]
-#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.HaarMeasure.invInvariant
-#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.AddHaarMeasure.negInvariant
+#align measure_theory.measure.is_haar_measure.is_inv_invariant MeasureTheory.Measure.IsHaarMeasure.isInvInvariant
+#align measure_theory.measure.is_add_haar_measure.is_neg_invariant MeasureTheory.Measure.IsAddHaarMeasure.isNegInvariant
 
 @[to_additive]
 theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn : n ≠ 0) :
@@ -844,15 +844,15 @@ theorem measurePreserving_zpow [CompactSpace G] [RootableBy G ℤ] {n : ℤ} (hn
     map_eq := by
       let f := @zpowGroupHom G _ n
       have hf : Continuous f := continuous_zpow n
-      haveI : (μ.map f).HaarMeasure :=
-        haarMeasure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
-      obtain ⟨C, -, -, hC⟩ := haarMeasure_eq_smul_haarMeasure (μ.map f) μ
+      haveI : (μ.map f).IsHaarMeasure :=
+        isHaarMeasure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
+      obtain ⟨C, -, -, hC⟩ := isHaarMeasure_eq_smul_isHaarMeasure (μ.map f) μ
       suffices C = 1 by rwa [this, one_smul] at hC
       have h_univ : (μ.map f) univ = μ univ := by
         rw [map_apply_of_aemeasurable hf.measurable.aemeasurable MeasurableSet.univ,
           preimage_univ]
-      have hμ₀ : μ univ ≠ 0 := OpenPosMeasure.open_pos univ isOpen_univ univ_nonempty
-      have hμ₁ : μ univ ≠ ∞ := CompactSpace.finiteMeasure.measure_univ_lt_top.ne
+      have hμ₀ : μ univ ≠ 0 := IsOpenPosMeasure.open_pos univ isOpen_univ univ_nonempty
+      have hμ₁ : μ univ ≠ ∞ := CompactSpace.isFiniteMeasure.measure_univ_lt_top.ne
       rwa [hC, smul_apply, Algebra.id.smul_eq_mul, mul_comm, ← ENNReal.eq_div_iff hμ₀ hμ₁,
         ENNReal.div_self hμ₀ hμ₁] at h_univ }
 #align measure_theory.measure.measure_preserving_zpow MeasureTheory.Measure.measurePreserving_zpow
feat: port MeasureTheory.Measure.Haar.Basic (#4517)

This PR also rename locallyCompactSpace_of_Group to locallyCompactSpace_of_group, and add a reference to the issue in MeasureTheory.Group.Measure.

Dependencies 10 + 655

656 files ported (98.5%)
294633 lines ported (98.2%)
Show graph

The unported dependencies are

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