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

tactic: by_cases hG : LocallyCompactSpace G
state_before: G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
⊢ μ.haarScalarFactor μ = 1
state_after: case pos
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1

case neg
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : ¬LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1

tactic: swap
state_before: case pos
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1

case neg
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : ¬LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1
state_after: case neg
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : ¬LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1

case pos
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1

tactic: obtain ⟨⟨g, g_cont⟩, g_comp, g_nonneg, g_one⟩ :
  ∃ g : C(G, ℝ), HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := exists_continuous_nonneg_pos 1
state_before: case pos
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1
state_after: case pos.intro.mk.intro.intro
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
⊢ μ.haarScalarFactor μ = 1

tactic: have int_g_ne_zero : ∫ x, g x ∂μ ≠ 0 :=
  ne_of_gt (g_cont.integral_pos_of_hasCompactSupport_nonneg_nonzero g_comp g_nonneg g_one)
state_before: case pos.intro.mk.intro.intro
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
⊢ μ.haarScalarFactor μ = 1
state_after: case pos.intro.mk.intro.intro
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
int_g_ne_zero : ∫ (x : G), g x ∂μ ≠ 0
⊢ μ.haarScalarFactor μ = 1

tactic: apply NNReal.coe_injective
state_before: case pos.intro.mk.intro.intro
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
int_g_ne_zero : ∫ (x : G), g x ∂μ ≠ 0
⊢ μ.haarScalarFactor μ = 1
state_after: case pos.intro.mk.intro.intro.a
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
int_g_ne_zero : ∫ (x : G), g x ∂μ ≠ 0
⊢ ↑(μ.haarScalarFactor μ) = ↑1

tactic: calc
  haarScalarFactor μ μ = (∫ x, g x ∂μ) / ∫ x, g x ∂μ :=
    haarScalarFactor_eq_integral_div _ _ g_cont g_comp int_g_ne_zero
  _ = 1 := div_self int_g_ne_zero
state_before: case pos.intro.mk.intro.intro.a
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport ⇑{ toFun := g, continuous_toFun := g_cont }
g_nonneg : 0 ≤ { toFun := g, continuous_toFun := g_cont }
g_one : { toFun := g, continuous_toFun := g_cont } 1 ≠ 0
int_g_ne_zero : ∫ (x : G), g x ∂μ ≠ 0
⊢ ↑(μ.haarScalarFactor μ) = ↑1
state_after: no goals

tactic: simp [haarScalarFactor, hG]
state_before: case neg
G : Type u_1
inst✝⁵ : TopologicalSpace G
inst✝⁴ : Group G
inst✝³ : TopologicalGroup G
inst✝² : MeasurableSpace G
inst✝¹ : BorelSpace G
μ : Measure G
inst✝ : μ.IsHaarMeasure
hG : ¬LocallyCompactSpace G
⊢ μ.haarScalarFactor μ = 1
state_after: no goals