l3lab/ntp-mathlib huggingface dataset:
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ) := by
  -- The group has to be locally compact, otherwise all integrals vanish and the result is trivial.
  by_cases H : LocallyCompactSpace G; swap
  · refine ⟨0, fun f f_cont f_comp ↦ ?_⟩
    rcases f_comp.eq_zero_or_locallyCompactSpace_of_group f_cont with hf|hf
    · simp [hf]
    · exact (H hf).elim
  -- Fix some nonzero continuous function with compact support `g`.
  obtain ⟨g, g_cont, g_comp, g_nonneg, g_one⟩ :
      ∃ (g : G → ℝ), Continuous g ∧ HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := by
    rcases exists_compact_mem_nhds (1 : G) with ⟨k, hk, k_mem⟩
    rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
      with ⟨⟨g, g_cont⟩, gk, -, g_comp, hg⟩
    refine ⟨g, g_cont, g_comp, fun x ↦ (hg x).1, ?_⟩
    have := gk (mem_of_mem_nhds k_mem)
    simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
    simp [this]
  have int_g_pos : 0 < ∫ x, g x ∂μ := by
    apply (integral_pos_iff_support_of_nonneg g_nonneg _).2
    · exact IsOpen.measure_pos μ g_cont.isOpen_support ⟨1, g_one⟩
    · 

Proof state:
G : Type u_1
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : LocallyCompactSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : MeasurableSpace G
inst✝⁵ : BorelSpace G
μ' μ : Measure G
inst✝⁴ : IsFiniteMeasureOnCompacts μ
inst✝³ : IsFiniteMeasureOnCompacts μ'
inst✝² : IsMulLeftInvariant μ
inst✝¹ : IsMulLeftInvariant μ'
inst✝ : IsOpenPosMeasure μ
H : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport g
g_nonneg : 0 ≤ g
g_one : g 1 ≠ 0
⊢ Integrable g

Next tactic:
exact g_cont.integrable_of_hasCompactSupport g_comp
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ) := by
  -- The group has to be locally compact, otherwise all integrals vanish and the result is trivial.
  by_cases H : LocallyCompactSpace G; swap
  · refine ⟨0, fun f f_cont f_comp ↦ ?_⟩
    rcases f_comp.eq_zero_or_locallyCompactSpace_of_group f_cont with hf|hf
    · simp [hf]
    · exact (H hf).elim
  -- Fix some nonzero continuous function with compact support `g`.
  obtain ⟨g, g_cont, g_comp, g_nonneg, g_one⟩ :
      ∃ (g : G → ℝ), Continuous g ∧ HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := by
    rcases exists_compact_mem_nhds (1 : G) with ⟨k, hk, k_mem⟩
    rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
      with ⟨⟨g, g_cont⟩, gk, -, g_comp, hg⟩
    refine ⟨g, g_cont, g_comp, fun x ↦ (hg x).1, ?_⟩
    have := gk (mem_of_mem_nhds k_mem)
    simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
    simp [this]
  have int_g_pos : 0 < ∫ x, g x ∂μ := by
    apply (integral_pos_iff_support_of_nonneg g_nonneg _).2
    · exact IsOpen.measure_pos μ g_cont.isOpen_support ⟨1, g_one⟩
    · exact g_cont.integrable_of_hasCompactSupport g_comp
  -- The proportionality constant we are looking for will be the ratio of the integrals of `g`
  -- with respect to `μ'` and `μ`.
  

Proof state:
case pos.intro.intro.intro.intro
G : Type u_1
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : LocallyCompactSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : MeasurableSpace G
inst✝⁵ : BorelSpace G
μ' μ : Measure G
inst✝⁴ : IsFiniteMeasureOnCompacts μ
inst✝³ : IsFiniteMeasureOnCompacts μ'
inst✝² : IsMulLeftInvariant μ
inst✝¹ : IsMulLeftInvariant μ'
inst✝ : IsOpenPosMeasure μ
H : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport g
g_nonneg : 0 ≤ g
g_one : g 1 ≠ 0
int_g_pos : 0 < ∫ (x : G), g x ∂μ
⊢ ∃ c, ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ

Next tactic:
let c : ℝ := (∫ x, g x ∂μ) ⁻¹ * (∫ x, g x ∂μ')
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ) := by
  -- The group has to be locally compact, otherwise all integrals vanish and the result is trivial.
  by_cases H : LocallyCompactSpace G; swap
  · refine ⟨0, fun f f_cont f_comp ↦ ?_⟩
    rcases f_comp.eq_zero_or_locallyCompactSpace_of_group f_cont with hf|hf
    · simp [hf]
    · exact (H hf).elim
  -- Fix some nonzero continuous function with compact support `g`.
  obtain ⟨g, g_cont, g_comp, g_nonneg, g_one⟩ :
      ∃ (g : G → ℝ), Continuous g ∧ HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := by
    rcases exists_compact_mem_nhds (1 : G) with ⟨k, hk, k_mem⟩
    rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
      with ⟨⟨g, g_cont⟩, gk, -, g_comp, hg⟩
    refine ⟨g, g_cont, g_comp, fun x ↦ (hg x).1, ?_⟩
    have := gk (mem_of_mem_nhds k_mem)
    simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
    simp [this]
  have int_g_pos : 0 < ∫ x, g x ∂μ := by
    apply (integral_pos_iff_support_of_nonneg g_nonneg _).2
    · exact IsOpen.measure_pos μ g_cont.isOpen_support ⟨1, g_one⟩
    · exact g_cont.integrable_of_hasCompactSupport g_comp
  -- The proportionality constant we are looking for will be the ratio of the integrals of `g`
  -- with respect to `μ'` and `μ`.
  let c : ℝ := (∫ x, g x ∂μ) ⁻¹ * (∫ x, g x ∂μ')
  

Proof state:
case pos.intro.intro.intro.intro
G : Type u_1
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : LocallyCompactSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : MeasurableSpace G
inst✝⁵ : BorelSpace G
μ' μ : Measure G
inst✝⁴ : IsFiniteMeasureOnCompacts μ
inst✝³ : IsFiniteMeasureOnCompacts μ'
inst✝² : IsMulLeftInvariant μ
inst✝¹ : IsMulLeftInvariant μ'
inst✝ : IsOpenPosMeasure μ
H : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport g
g_nonneg : 0 ≤ g
g_one : g 1 ≠ 0
int_g_pos : 0 < ∫ (x : G), g x ∂μ
c : ℝ := (∫ (x : G), g x ∂μ)⁻¹ * ∫ (x : G), g x ∂μ'
⊢ ∃ c, ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ

Next tactic:
have c_nonneg : 0 ≤ c :=
    mul_nonneg (inv_nonneg.2 (integral_nonneg g_nonneg)) (integral_nonneg g_nonneg)
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ) := by
  -- The group has to be locally compact, otherwise all integrals vanish and the result is trivial.
  by_cases H : LocallyCompactSpace G; swap
  · refine ⟨0, fun f f_cont f_comp ↦ ?_⟩
    rcases f_comp.eq_zero_or_locallyCompactSpace_of_group f_cont with hf|hf
    · simp [hf]
    · exact (H hf).elim
  -- Fix some nonzero continuous function with compact support `g`.
  obtain ⟨g, g_cont, g_comp, g_nonneg, g_one⟩ :
      ∃ (g : G → ℝ), Continuous g ∧ HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := by
    rcases exists_compact_mem_nhds (1 : G) with ⟨k, hk, k_mem⟩
    rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
      with ⟨⟨g, g_cont⟩, gk, -, g_comp, hg⟩
    refine ⟨g, g_cont, g_comp, fun x ↦ (hg x).1, ?_⟩
    have := gk (mem_of_mem_nhds k_mem)
    simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
    simp [this]
  have int_g_pos : 0 < ∫ x, g x ∂μ := by
    apply (integral_pos_iff_support_of_nonneg g_nonneg _).2
    · exact IsOpen.measure_pos μ g_cont.isOpen_support ⟨1, g_one⟩
    · exact g_cont.integrable_of_hasCompactSupport g_comp
  -- The proportionality constant we are looking for will be the ratio of the integrals of `g`
  -- with respect to `μ'` and `μ`.
  let c : ℝ := (∫ x, g x ∂μ) ⁻¹ * (∫ x, g x ∂μ')
  have c_nonneg : 0 ≤ c :=
    mul_nonneg (inv_nonneg.2 (integral_nonneg g_nonneg)) (integral_nonneg g_nonneg)
  

Proof state:
case pos.intro.intro.intro.intro
G : Type u_1
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : LocallyCompactSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : MeasurableSpace G
inst✝⁵ : BorelSpace G
μ' μ : Measure G
inst✝⁴ : IsFiniteMeasureOnCompacts μ
inst✝³ : IsFiniteMeasureOnCompacts μ'
inst✝² : IsMulLeftInvariant μ
inst✝¹ : IsMulLeftInvariant μ'
inst✝ : IsOpenPosMeasure μ
H : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport g
g_nonneg : 0 ≤ g
g_one : g 1 ≠ 0
int_g_pos : 0 < ∫ (x : G), g x ∂μ
c : ℝ := (∫ (x : G), g x ∂μ)⁻¹ * ∫ (x : G), g x ∂μ'
c_nonneg : 0 ≤ c
⊢ ∃ c, ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ

Next tactic:
refine ⟨⟨c, c_nonneg⟩, fun f f_cont f_comp ↦ ?_⟩
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ) := by
  -- The group has to be locally compact, otherwise all integrals vanish and the result is trivial.
  by_cases H : LocallyCompactSpace G; swap
  · refine ⟨0, fun f f_cont f_comp ↦ ?_⟩
    rcases f_comp.eq_zero_or_locallyCompactSpace_of_group f_cont with hf|hf
    · simp [hf]
    · exact (H hf).elim
  -- Fix some nonzero continuous function with compact support `g`.
  obtain ⟨g, g_cont, g_comp, g_nonneg, g_one⟩ :
      ∃ (g : G → ℝ), Continuous g ∧ HasCompactSupport g ∧ 0 ≤ g ∧ g 1 ≠ 0 := by
    rcases exists_compact_mem_nhds (1 : G) with ⟨k, hk, k_mem⟩
    rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
      with ⟨⟨g, g_cont⟩, gk, -, g_comp, hg⟩
    refine ⟨g, g_cont, g_comp, fun x ↦ (hg x).1, ?_⟩
    have := gk (mem_of_mem_nhds k_mem)
    simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
    simp [this]
  have int_g_pos : 0 < ∫ x, g x ∂μ := by
    apply (integral_pos_iff_support_of_nonneg g_nonneg _).2
    · exact IsOpen.measure_pos μ g_cont.isOpen_support ⟨1, g_one⟩
    · exact g_cont.integrable_of_hasCompactSupport g_comp
  -- The proportionality constant we are looking for will be the ratio of the integrals of `g`
  -- with respect to `μ'` and `μ`.
  let c : ℝ := (∫ x, g x ∂μ) ⁻¹ * (∫ x, g x ∂μ')
  have c_nonneg : 0 ≤ c :=
    mul_nonneg (inv_nonneg.2 (integral_nonneg g_nonneg)) (integral_nonneg g_nonneg)
  refine ⟨⟨c, c_nonneg⟩, fun f f_cont f_comp ↦ ?_⟩
  /- use the lemma `integral_mulLeftInvariant_mulRightInvariant_combo` for `μ` and then `μ'`
  to reexpress the integral of `f` as the integral of `g` times a factor which only depends
  on a right-invariant measure `ν`. We use `ν = μ.inv` for convenience. -/
  

Proof state:
case pos.intro.intro.intro.intro
G : Type u_1
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : LocallyCompactSpace G
inst✝⁸ : Group G
inst✝⁷ : TopologicalGroup G
inst✝⁶ : MeasurableSpace G
inst✝⁵ : BorelSpace G
μ' μ : Measure G
inst✝⁴ : IsFiniteMeasureOnCompacts μ
inst✝³ : IsFiniteMeasureOnCompacts μ'
inst✝² : IsMulLeftInvariant μ
inst✝¹ : IsMulLeftInvariant μ'
inst✝ : IsOpenPosMeasure μ
H : LocallyCompactSpace G
g : G → ℝ
g_cont : Continuous g
g_comp : HasCompactSupport g
g_nonneg : 0 ≤ g
g_one : g 1 ≠ 0
int_g_pos : 0 < ∫ (x : G), g x ∂μ
c : ℝ := (∫ (x : G), g x ∂μ)⁻¹ * ∫ (x : G), g x ∂μ'
c_nonneg : 0 ≤ c
f : G → ℝ
f_cont : Continuous f
f_comp : HasCompactSupport f
⊢ ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂{ val := c, property := c_nonneg } • μ

Next tactic:
let ν := μ.inv
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts and inner regular for finite measure sets with respect to compact sets,
they coincide in the following sense: they give the same value to finite measure sets,
up to a multiplicative constant. -/
@[to_additive]
lemma measure_isMulLeftInvariant_eq_smul_of_ne_top
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ]
    [InnerRegularCompactLTTop μ] [InnerRegularCompactLTTop μ'] :
    ∃ (c : ℝ≥0), ∀ (s : Set G), μ s < ∞ → μ' s < ∞ → μ' s = (c • μ) s := by
  /- We know that the measures integrate in the same way continuous compactly supported functions,
  up to a constant `c`. We will use this constant `c`. -/
  

Proof state:
G : Type u_1
inst✝¹² : TopologicalSpace G
inst✝¹¹ : LocallyCompactSpace G
inst✝¹⁰ : Group G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : MeasurableSpace G
inst✝⁷ : BorelSpace G
μ' μ : Measure G
inst✝⁶ : IsFiniteMeasureOnCompacts μ
inst✝⁵ : IsFiniteMeasureOnCompacts μ'
inst✝⁴ : IsMulLeftInvariant μ
inst✝³ : IsMulLeftInvariant μ'
inst✝² : IsOpenPosMeasure μ
inst✝¹ : InnerRegularCompactLTTop μ
inst✝ : InnerRegularCompactLTTop μ'
⊢ ∃ c, ∀ (s : Set G), ↑↑μ s < ⊤ → ↑↑μ' s < ⊤ → ↑↑μ' s = ↑↑(c • μ) s

Next tactic:
rcases integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport μ' μ with ⟨c, hc⟩
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts and inner regular for finite measure sets with respect to compact sets,
they coincide in the following sense: they give the same value to finite measure sets,
up to a multiplicative constant. -/
@[to_additive]
lemma measure_isMulLeftInvariant_eq_smul_of_ne_top
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ]
    [InnerRegularCompactLTTop μ] [InnerRegularCompactLTTop μ'] :
    ∃ (c : ℝ≥0), ∀ (s : Set G), μ s < ∞ → μ' s < ∞ → μ' s = (c • μ) s := by
  /- We know that the measures integrate in the same way continuous compactly supported functions,
  up to a constant `c`. We will use this constant `c`. -/
  rcases integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport μ' μ with ⟨c, hc⟩
  

Proof state:
case intro
G : Type u_1
inst✝¹² : TopologicalSpace G
inst✝¹¹ : LocallyCompactSpace G
inst✝¹⁰ : Group G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : MeasurableSpace G
inst✝⁷ : BorelSpace G
μ' μ : Measure G
inst✝⁶ : IsFiniteMeasureOnCompacts μ
inst✝⁵ : IsFiniteMeasureOnCompacts μ'
inst✝⁴ : IsMulLeftInvariant μ
inst✝³ : IsMulLeftInvariant μ'
inst✝² : IsOpenPosMeasure μ
inst✝¹ : InnerRegularCompactLTTop μ
inst✝ : InnerRegularCompactLTTop μ'
c : ℝ≥0
hc : ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ
⊢ ∃ c, ∀ (s : Set G), ↑↑μ s < ⊤ → ↑↑μ' s < ⊤ → ↑↑μ' s = ↑↑(c • μ) s

Next tactic:
refine ⟨c, fun s hs h's ↦ ?_⟩
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts and inner regular for finite measure sets with respect to compact sets,
they coincide in the following sense: they give the same value to finite measure sets,
up to a multiplicative constant. -/
@[to_additive]
lemma measure_isMulLeftInvariant_eq_smul_of_ne_top
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ]
    [InnerRegularCompactLTTop μ] [InnerRegularCompactLTTop μ'] :
    ∃ (c : ℝ≥0), ∀ (s : Set G), μ s < ∞ → μ' s < ∞ → μ' s = (c • μ) s := by
  /- We know that the measures integrate in the same way continuous compactly supported functions,
  up to a constant `c`. We will use this constant `c`. -/
  rcases integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport μ' μ with ⟨c, hc⟩
  refine ⟨c, fun s hs h's ↦ ?_⟩
  /- By regularity, every compact set may be approximated by a continuous compactly supported
  function. Therefore, the measures coincide on compact sets. -/
  

Proof state:
case intro
G : Type u_1
inst✝¹² : TopologicalSpace G
inst✝¹¹ : LocallyCompactSpace G
inst✝¹⁰ : Group G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : MeasurableSpace G
inst✝⁷ : BorelSpace G
μ' μ : Measure G
inst✝⁶ : IsFiniteMeasureOnCompacts μ
inst✝⁵ : IsFiniteMeasureOnCompacts μ'
inst✝⁴ : IsMulLeftInvariant μ
inst✝³ : IsMulLeftInvariant μ'
inst✝² : IsOpenPosMeasure μ
inst✝¹ : InnerRegularCompactLTTop μ
inst✝ : InnerRegularCompactLTTop μ'
c : ℝ≥0
hc : ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ
s : Set G
hs : ↑↑μ s < ⊤
h's : ↑↑μ' s < ⊤
⊢ ↑↑μ' s = ↑↑(c • μ) s

Next tactic:
have A : ∀ k, IsCompact k → μ' k = (c • μ) k := by
    intro k hk
    rw [hk.measure_eq_biInf_integral_hasCompactSupport μ',
        hk.measure_eq_biInf_integral_hasCompactSupport (c • μ)]
    congr! 7 with f f_cont f_comp _fk _f_nonneg
    exact hc f f_cont f_comp
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts and inner regular for finite measure sets with respect to compact sets,
they coincide in the following sense: they give the same value to finite measure sets,
up to a multiplicative constant. -/
@[to_additive]
lemma measure_isMulLeftInvariant_eq_smul_of_ne_top
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ]
    [InnerRegularCompactLTTop μ] [InnerRegularCompactLTTop μ'] :
    ∃ (c : ℝ≥0), ∀ (s : Set G), μ s < ∞ → μ' s < ∞ → μ' s = (c • μ) s := by
  /- We know that the measures integrate in the same way continuous compactly supported functions,
  up to a constant `c`. We will use this constant `c`. -/
  rcases integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport μ' μ with ⟨c, hc⟩
  refine ⟨c, fun s hs h's ↦ ?_⟩
  /- By regularity, every compact set may be approximated by a continuous compactly supported
  function. Therefore, the measures coincide on compact sets. -/
  have A : ∀ k, IsCompact k → μ' k = (c • μ) k := by
    

Proof state:
G : Type u_1
inst✝¹² : TopologicalSpace G
inst✝¹¹ : LocallyCompactSpace G
inst✝¹⁰ : Group G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : MeasurableSpace G
inst✝⁷ : BorelSpace G
μ' μ : Measure G
inst✝⁶ : IsFiniteMeasureOnCompacts μ
inst✝⁵ : IsFiniteMeasureOnCompacts μ'
inst✝⁴ : IsMulLeftInvariant μ
inst✝³ : IsMulLeftInvariant μ'
inst✝² : IsOpenPosMeasure μ
inst✝¹ : InnerRegularCompactLTTop μ
inst✝ : InnerRegularCompactLTTop μ'
c : ℝ≥0
hc : ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ
s : Set G
hs : ↑↑μ s < ⊤
h's : ↑↑μ' s < ⊤
⊢ ∀ (k : Set G), IsCompact k → ↑↑μ' k = ↑↑(c • μ) k

Next tactic:
intro k hk
/-- **Uniqueness of left-invariant measures**: Given two left-invariant measures which are finite on
compacts and inner regular for finite measure sets with respect to compact sets,
they coincide in the following sense: they give the same value to finite measure sets,
up to a multiplicative constant. -/
@[to_additive]
lemma measure_isMulLeftInvariant_eq_smul_of_ne_top
    (μ' μ : Measure G) [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts μ']
    [IsMulLeftInvariant μ] [IsMulLeftInvariant μ'] [IsOpenPosMeasure μ]
    [InnerRegularCompactLTTop μ] [InnerRegularCompactLTTop μ'] :
    ∃ (c : ℝ≥0), ∀ (s : Set G), μ s < ∞ → μ' s < ∞ → μ' s = (c • μ) s := by
  /- We know that the measures integrate in the same way continuous compactly supported functions,
  up to a constant `c`. We will use this constant `c`. -/
  rcases integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport μ' μ with ⟨c, hc⟩
  refine ⟨c, fun s hs h's ↦ ?_⟩
  /- By regularity, every compact set may be approximated by a continuous compactly supported
  function. Therefore, the measures coincide on compact sets. -/
  have A : ∀ k, IsCompact k → μ' k = (c • μ) k := by
    intro k hk
    

Proof state:
G : Type u_1
inst✝¹² : TopologicalSpace G
inst✝¹¹ : LocallyCompactSpace G
inst✝¹⁰ : Group G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : MeasurableSpace G
inst✝⁷ : BorelSpace G
μ' μ : Measure G
inst✝⁶ : IsFiniteMeasureOnCompacts μ
inst✝⁵ : IsFiniteMeasureOnCompacts μ'
inst✝⁴ : IsMulLeftInvariant μ
inst✝³ : IsMulLeftInvariant μ'
inst✝² : IsOpenPosMeasure μ
inst✝¹ : InnerRegularCompactLTTop μ
inst✝ : InnerRegularCompactLTTop μ'
c : ℝ≥0
hc : ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ
s : Set G
hs : ↑↑μ s < ⊤
h's : ↑↑μ' s < ⊤
k : Set G
hk : IsCompact k
⊢ ↑↑μ' k = ↑↑(c • μ) k

Next tactic:
rw [hk.measure_eq_biInf_integral_hasCompactSupport μ',
        hk.measure_eq_biInf_integral_hasCompactSupport (c • μ)]