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

tactic: let f := @zpowGroupHom G _ n
state_before: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
⊢ map (fun g => g ^ n) μ = μ
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace 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: have hf : Continuous f := continuous_zpow n
state_before: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace 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) μ = μ
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace 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: have : (μ.map f).IsHaarMeasure :=
  isHaarMeasure_map_of_isFiniteMeasure μ f hf (RootableBy.surjective_pow G ℤ hn)
state_before: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace 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) μ = μ
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
⊢ map (fun g => g ^ n) μ = μ

tactic: let C : ℝ≥0∞ := haarScalarFactor (μ.map f) μ
state_before: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
⊢ map (fun g => g ^ n) μ = μ
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
⊢ map (fun g => g ^ n) μ = μ

tactic: have hC : μ.map f = C • μ := isMulLeftInvariant_eq_smul_of_innerRegular _ _
state_before: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
⊢ map (fun g => g ^ n) μ = μ
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
hC : map (⇑f) μ = C • μ
⊢ map (fun g => g ^ n) μ = μ

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

tactic: have h_univ : (μ.map f) univ = μ univ := by
  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✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
hC : map (⇑f) μ = C • μ
⊢ C = 1
state_after: G : Type u_1
inst✝⁷ : CommGroup G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalGroup G
inst✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
hC : map (⇑f) μ = C • μ
h_univ : (map (⇑f) μ) univ = μ univ
⊢ C = 1

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

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

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

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✝⁴ : MeasurableSpace G
inst✝³ : BorelSpace G
μ : Measure G
inst✝² : μ.IsHaarMeasure
inst✝¹ : CompactSpace G
inst✝ : RootableBy G ℤ
n : ℤ
hn : n ≠ 0
f : G →* G := zpowGroupHom n
hf : Continuous ⇑f
this : (map (⇑f) μ).IsHaarMeasure
C : ℝ≥0∞ := ↑((map (⇑f) μ).haarScalarFactor μ)
hC : map (⇑f) μ = C • μ
⊢ (map (⇑f) μ) univ = μ univ
state_after: no goals