Theorem: MeasureTheory.Measure.measurePreserving_zpow
File: Mathlib/MeasureTheory/Measure/Haar/Basic.lean

tactic: let f := @zpowGroupHom G _ n
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
⊢ map (fun g => g ^ n) μ = μ

tactic: have hf : Continuous f := continuous_zpow n
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
⊢ map (fun g => g ^ n) μ = μ

tactic: haveI : (μ.map f).IsHaarMeasure :=
  isHaarMeasure_map μ f hf (RootableBy.surjective_pow G ℤ hn) (by simp)
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
⊢ map (fun g => g ^ n) μ = μ

tactic: obtain ⟨C, -, -, hC⟩ := isHaarMeasure_eq_smul_isHaarMeasure (μ.map f) μ
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
⊢ map (fun g => g ^ n) μ = μ

tactic: suffices C = 1 by rwa [this, one_smul] at hC
state_before: case intro.intro.intro
G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
⊢ map (fun g => g ^ n) μ = μ

tactic: have h_univ : (μ.map f) univ = μ univ := by
  rw [map_apply_of_aemeasurable hf.measurable.aemeasurable MeasurableSet.univ,
    preimage_univ]
state_before: case intro.intro.intro
G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
⊢ C = 1

tactic: have hμ₀ : μ univ ≠ 0 := IsOpenPosMeasure.open_pos univ isOpen_univ univ_nonempty
state_before: case intro.intro.intro
G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
h_univ : ↑↑(map (↑f) μ) univ = ↑↑μ univ
⊢ C = 1

tactic: have hμ₁ : μ univ ≠ ∞ := CompactSpace.isFiniteMeasure.measure_univ_lt_top.ne
state_before: case intro.intro.intro
G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
h_univ : ↑↑(map (↑f) μ) univ = ↑↑μ univ
hμ₀ : ↑↑μ univ ≠ 0
⊢ C = 1

tactic: 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
state_before: case intro.intro.intro
G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
h_univ : ↑↑(map (↑f) μ) univ = ↑↑μ univ
hμ₀ : ↑↑μ univ ≠ 0
hμ₁ : ↑↑μ univ ≠ ⊤
⊢ C = 1

tactic: simp
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
⊢ Filter.Tendsto (↑f) (Filter.cocompact G) (Filter.cocompact G)

tactic: rwa [this, one_smul] at hC
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this✝ : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
this : C = 1
⊢ map (fun g => g ^ n) μ = μ

tactic: rw [map_apply_of_aemeasurable hf.measurable.aemeasurable MeasurableSet.univ,
  preimage_univ]
state_before: G : Type u_1
inst✝⁹ : CommGroup G
inst✝⁸ : TopologicalSpace G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : T2Space G
inst✝⁵ : MeasurableSpace G
inst✝⁴ : BorelSpace G
inst✝³ : SecondCountableTopology G
μ : Measure G
inst✝² : IsHaarMeasure μ
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ↑f
this : IsHaarMeasure (map (↑f) μ)
C : ℝ≥0∞
hC : map (↑f) μ = C • μ
⊢ ↑↑(map (↑f) μ) univ = ↑↑μ univ