l3lab/ntp-mathlib huggingface dataset:
instance isLocallyFiniteMeasureSMulNNReal [TopologicalSpace α] (μ : Measure α)
    [IsLocallyFiniteMeasure μ] (c : ℝ≥0) : IsLocallyFiniteMeasure (c • μ) := by
  refine' ⟨fun x => _⟩
  rcases μ.exists_isOpen_measure_lt_top x with ⟨o, xo, o_open, μo⟩
  refine' ⟨o, o_open.mem_nhds xo, _⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
c : ℝ≥0
x : α
o : Set α
xo : x ∈ o
o_open : IsOpen o
μo : ↑↑μ o < ⊤
⊢ ↑↑(c • μ) o < ⊤

Next tactic:
apply ENNReal.mul_lt_top _ μo.ne
instance isLocallyFiniteMeasureSMulNNReal [TopologicalSpace α] (μ : Measure α)
    [IsLocallyFiniteMeasure μ] (c : ℝ≥0) : IsLocallyFiniteMeasure (c • μ) := by
  refine' ⟨fun x => _⟩
  rcases μ.exists_isOpen_measure_lt_top x with ⟨o, xo, o_open, μo⟩
  refine' ⟨o, o_open.mem_nhds xo, _⟩
  apply ENNReal.mul_lt_top _ μo.ne
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
c : ℝ≥0
x : α
o : Set α
xo : x ∈ o
o_open : IsOpen o
μo : ↑↑μ o < ⊤
⊢ (RingHom.id ℝ≥0∞) (↑(RingHom.toMonoidWithZeroHom ofNNRealHom) c) ≠ ⊤

Next tactic:
simp
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ } := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
⊢ TopologicalSpace.IsTopologicalBasis {s | IsOpen s ∧ ↑↑μ s < ⊤}

Next tactic:
refine' TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds (fun s hs => hs.1) _
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ } := by
  refine' TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds (fun s hs => hs.1) _
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
⊢ ∀ (a : α) (u : Set α), a ∈ u → IsOpen u → ∃ v ∈ {s | IsOpen s ∧ ↑↑μ s < ⊤}, a ∈ v ∧ v ⊆ u

Next tactic:
intro x s xs hs
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ } := by
  refine' TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds (fun s hs => hs.1) _
  intro x s xs hs
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
x : α
s : Set α
xs : x ∈ s
hs : IsOpen s
⊢ ∃ v ∈ {s | IsOpen s ∧ ↑↑μ s < ⊤}, x ∈ v ∧ v ⊆ s

Next tactic:
rcases μ.exists_isOpen_measure_lt_top x with ⟨v, xv, hv, μv⟩
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ } := by
  refine' TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds (fun s hs => hs.1) _
  intro x s xs hs
  rcases μ.exists_isOpen_measure_lt_top x with ⟨v, xv, hv, μv⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
x : α
s : Set α
xs : x ∈ s
hs : IsOpen s
v : Set α
xv : x ∈ v
hv : IsOpen v
μv : ↑↑μ v < ⊤
⊢ ∃ v ∈ {s | IsOpen s ∧ ↑↑μ s < ⊤}, x ∈ v ∧ v ⊆ s

Next tactic:
refine' ⟨v ∩ s, ⟨hv.inter hs, lt_of_le_of_lt _ μv⟩, ⟨xv, xs⟩, inter_subset_right _ _⟩
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ } := by
  refine' TopologicalSpace.isTopologicalBasis_of_isOpen_of_nhds (fun s hs => hs.1) _
  intro x s xs hs
  rcases μ.exists_isOpen_measure_lt_top x with ⟨v, xv, hv, μv⟩
  refine' ⟨v ∩ s, ⟨hv.inter hs, lt_of_le_of_lt _ μv⟩, ⟨xv, xs⟩, inter_subset_right _ _⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : IsLocallyFiniteMeasure μ
x : α
s : Set α
xs : x ∈ s
hs : IsOpen s
v : Set α
xv : x ∈ v
hv : IsOpen v
μv : ↑↑μ v < ⊤
⊢ ↑↑μ (v ∩ s) ≤ ↑↑μ v

Next tactic:
exact measure_mono (inter_subset_left _ _)
instance (priority := 100) sigmaFinite_of_locallyFinite [TopologicalSpace α]
    [SecondCountableTopology α] [IsLocallyFiniteMeasure μ] : SigmaFinite μ := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝² : TopologicalSpace α
inst✝¹ : SecondCountableTopology α
inst✝ : IsLocallyFiniteMeasure μ
⊢ SigmaFinite μ

Next tactic:
choose s hsx hsμ using μ.finiteAt_nhds
instance (priority := 100) sigmaFinite_of_locallyFinite [TopologicalSpace α]
    [SecondCountableTopology α] [IsLocallyFiniteMeasure μ] : SigmaFinite μ := by
  choose s hsx hsμ using μ.finiteAt_nhds
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝² : TopologicalSpace α
inst✝¹ : SecondCountableTopology α
inst✝ : IsLocallyFiniteMeasure μ
s : α → Set α
hsx : ∀ (x : α), s x ∈ 𝓝 x
hsμ : ∀ (x : α), ↑↑μ (s x) < ⊤
⊢ SigmaFinite μ

Next tactic:
rcases TopologicalSpace.countable_cover_nhds hsx with ⟨t, htc, htU⟩
instance (priority := 100) sigmaFinite_of_locallyFinite [TopologicalSpace α]
    [SecondCountableTopology α] [IsLocallyFiniteMeasure μ] : SigmaFinite μ := by
  choose s hsx hsμ using μ.finiteAt_nhds
  rcases TopologicalSpace.countable_cover_nhds hsx with ⟨t, htc, htU⟩
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s✝ t✝ : Set α
inst✝² : TopologicalSpace α
inst✝¹ : SecondCountableTopology α
inst✝ : IsLocallyFiniteMeasure μ
s : α → Set α
hsx : ∀ (x : α), s x ∈ 𝓝 x
hsμ : ∀ (x : α), ↑↑μ (s x) < ⊤
t : Set α
htc : Set.Countable t
htU : ⋃ x ∈ t, s x = univ
⊢ SigmaFinite μ

Next tactic:
refine' Measure.sigmaFinite_of_countable (htc.image s) (ball_image_iff.2 fun x _ => hsμ x) _
instance (priority := 100) sigmaFinite_of_locallyFinite [TopologicalSpace α]
    [SecondCountableTopology α] [IsLocallyFiniteMeasure μ] : SigmaFinite μ := by
  choose s hsx hsμ using μ.finiteAt_nhds
  rcases TopologicalSpace.countable_cover_nhds hsx with ⟨t, htc, htU⟩
  refine' Measure.sigmaFinite_of_countable (htc.image s) (ball_image_iff.2 fun x _ => hsμ x) _
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝³ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s✝ t✝ : Set α
inst✝² : TopologicalSpace α
inst✝¹ : SecondCountableTopology α
inst✝ : IsLocallyFiniteMeasure μ
s : α → Set α
hsx : ∀ (x : α), s x ∈ 𝓝 x
hsμ : ∀ (x : α), ↑↑μ (s x) < ⊤
t : Set α
htc : Set.Countable t
htU : ⋃ x ∈ t, s x = univ
⊢ ⋃₀ (s '' t) = univ

Next tactic:
rwa [sUnion_image]
theorem exists_pos_measure_of_cover [Countable ι] {U : ι → Set α} (hU : ⋃ i, U i = univ)
    (hμ : μ ≠ 0) : ∃ i, 0 < μ (U i) := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : Countable ι
U : ι → Set α
hU : ⋃ i, U i = univ
hμ : μ ≠ 0
⊢ ∃ i, 0 < ↑↑μ (U i)

Next tactic:
contrapose! hμ with H
theorem exists_pos_measure_of_cover [Countable ι] {U : ι → Set α} (hU : ⋃ i, U i = univ)
    (hμ : μ ≠ 0) : ∃ i, 0 < μ (U i) := by
  contrapose! hμ with H
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : Countable ι
U : ι → Set α
hU : ⋃ i, U i = univ
H : ∀ (i : ι), ↑↑μ (U i) ≤ 0
⊢ μ = 0

Next tactic:
rw [← measure_univ_eq_zero, ← hU]
theorem exists_pos_measure_of_cover [Countable ι] {U : ι → Set α} (hU : ⋃ i, U i = univ)
    (hμ : μ ≠ 0) : ∃ i, 0 < μ (U i) := by
  contrapose! hμ with H
  rw [← measure_univ_eq_zero, ← hU]
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : Countable ι
U : ι → Set α
hU : ⋃ i, U i = univ
H : ∀ (i : ι), ↑↑μ (U i) ≤ 0
⊢ ↑↑μ (⋃ i, U i) = 0

Next tactic:
exact measure_iUnion_null fun i => nonpos_iff_eq_zero.1 (H i)
theorem exists_pos_preimage_ball [PseudoMetricSpace δ] (f : α → δ) (x : δ) (hμ : μ ≠ 0) :
    ∃ n : ℕ, 0 < μ (f ⁻¹' Metric.ball x n) :=
  exists_pos_measure_of_cover (by 

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : PseudoMetricSpace δ
f : α → δ
x : δ
hμ : μ ≠ 0
⊢ ⋃ i, f ⁻¹' Metric.ball x ↑i = univ

Next tactic:
rw [← preimage_iUnion, Metric.iUnion_ball_nat, preimage_univ]
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  

Proof state:
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
h : ∀ (b : β), ∃ᵐ (x : α) ∂μ, f x ≠ b
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  

Proof state:
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
h : ∀ (b : β), ∃ᵐ (x : α) ∂μ, f x ≠ b
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  

Proof state:
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
inhabit β
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  

Proof state:
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
  

Proof state:
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
this : ↑m univ ≠ 0
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
rcases m.exists_mem_forall_mem_nhds_within_pos this with ⟨b, -, hb⟩
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
  rcases m.exists_mem_forall_mem_nhds_within_pos this with ⟨b, -, hb⟩
  

Proof state:
case intro.intro
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
this : ↑m univ ≠ 0
b : β
hb : ∀ t ∈ 𝓝[univ] b, 0 < ↑m t
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
simp only [nhdsWithin_univ] at hb
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
  rcases m.exists_mem_forall_mem_nhds_within_pos this with ⟨b, -, hb⟩
  simp only [nhdsWithin_univ] at hb
  

Proof state:
case intro.intro
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
this : ↑m univ ≠ 0
b : β
hb : ∀ t ∈ 𝓝 b, 0 < ↑((OuterMeasure.map f) ↑μ) t
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
rcases m.exists_mem_forall_mem_nhds_within_pos (h b) with ⟨a, hab : a ≠ b, ha⟩
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
  rcases m.exists_mem_forall_mem_nhds_within_pos this with ⟨b, -, hb⟩
  simp only [nhdsWithin_univ] at hb
  rcases m.exists_mem_forall_mem_nhds_within_pos (h b) with ⟨a, hab : a ≠ b, ha⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
this : ↑m univ ≠ 0
b : β
hb : ∀ t ∈ 𝓝 b, 0 < ↑((OuterMeasure.map f) ↑μ) t
a : β
hab : a ≠ b
ha : ∀ t ∈ 𝓝[{b}ᶜ] a, 0 < ↑m t
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
simp only [isOpen_compl_singleton.nhdsWithin_eq hab] at ha
theorem exists_ne_forall_mem_nhds_pos_measure_preimage {β} [TopologicalSpace β] [T1Space β]
    [SecondCountableTopology β] [Nonempty β] {f : α → β} (h : ∀ b, ∃ᵐ x ∂μ, f x ≠ b) :
    ∃ a b : β, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < μ (f ⁻¹' t) := by
  -- We use an `OuterMeasure` so that the proof works without `Measurable f`
  set m : OuterMeasure β := OuterMeasure.map f μ.toOuterMeasure
  replace h : ∀ b : β, m {b}ᶜ ≠ 0 := fun b => not_eventually.mpr (h b)
  inhabit β
  have : m univ ≠ 0 := ne_bot_of_le_ne_bot (h default) (m.mono' <| subset_univ _)
  rcases m.exists_mem_forall_mem_nhds_within_pos this with ⟨b, -, hb⟩
  simp only [nhdsWithin_univ] at hb
  rcases m.exists_mem_forall_mem_nhds_within_pos (h b) with ⟨a, hab : a ≠ b, ha⟩
  simp only [isOpen_compl_singleton.nhdsWithin_eq hab] at ha
  

Proof state:
case intro.intro.intro.intro
α : Type u_1
β✝ : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β✝
μ ν ν₁ ν₂ : Measure α
s t : Set α
β : Type u_5
inst✝³ : TopologicalSpace β
inst✝² : T1Space β
inst✝¹ : SecondCountableTopology β
inst✝ : Nonempty β
f : α → β
m : OuterMeasure β := (OuterMeasure.map f) ↑μ
h : ∀ (b : β), ↑m {b}ᶜ ≠ 0
inhabited_h : Inhabited β
this : ↑m univ ≠ 0
b : β
hb : ∀ t ∈ 𝓝 b, 0 < ↑((OuterMeasure.map f) ↑μ) t
a : β
hab : a ≠ b
ha : ∀ t ∈ 𝓝 a, 0 < ↑((OuterMeasure.map f) ↑μ) t
⊢ ∃ a b, a ≠ b ∧ (∀ s ∈ 𝓝 a, 0 < ↑↑μ (f ⁻¹' s)) ∧ ∀ t ∈ 𝓝 b, 0 < ↑↑μ (f ⁻¹' t)

Next tactic:
exact ⟨a, b, hab, ha, hb⟩
/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α✝
inst✝¹ : MeasurableSpace β
μ✝ ν✝ ν₁ ν₂ : Measure α✝
s✝ t : Set α✝
α : Type u_5
m₀ : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
C : Set (Set α)
hμν : ∀ s ∈ C, ↑↑μ s = ↑↑ν s
m : MeasurableSpace α
h : m ≤ m₀
hA : m = generateFrom C
hC : IsPiSystem C
h_univ : ↑↑μ univ = ↑↑ν univ
s : Set α
hs : MeasurableSet s
⊢ ↑↑μ s = ↑↑ν s

Next tactic:
haveI : IsFiniteMeasure ν := by
    constructor
    rw [← h_univ]
    apply IsFiniteMeasure.measure_univ_lt_top
/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s := by
  haveI : IsFiniteMeasure ν := by
    

Proof state:
α✝ : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α✝
inst✝¹ : MeasurableSpace β
μ✝ ν✝ ν₁ ν₂ : Measure α✝
s✝ t : Set α✝
α : Type u_5
m₀ : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
C : Set (Set α)
hμν : ∀ s ∈ C, ↑↑μ s = ↑↑ν s
m : MeasurableSpace α
h : m ≤ m₀
hA : m = generateFrom C
hC : IsPiSystem C
h_univ : ↑↑μ univ = ↑↑ν univ
s : Set α
hs : MeasurableSet s
⊢ IsFiniteMeasure ν

Next tactic:
constructor
/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s := by
  haveI : IsFiniteMeasure ν := by
    constructor
    

Proof state:
case measure_univ_lt_top
α✝ : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α✝
inst✝¹ : MeasurableSpace β
μ✝ ν✝ ν₁ ν₂ : Measure α✝
s✝ t : Set α✝
α : Type u_5
m₀ : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
C : Set (Set α)
hμν : ∀ s ∈ C, ↑↑μ s = ↑↑ν s
m : MeasurableSpace α
h : m ≤ m₀
hA : m = generateFrom C
hC : IsPiSystem C
h_univ : ↑↑μ univ = ↑↑ν univ
s : Set α
hs : MeasurableSet s
⊢ ↑↑ν univ < ⊤

Next tactic:
rw [← h_univ]
/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s := by
  haveI : IsFiniteMeasure ν := by
    constructor
    rw [← h_univ]
    

Proof state:
case measure_univ_lt_top
α✝ : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α✝
inst✝¹ : MeasurableSpace β
μ✝ ν✝ ν₁ ν₂ : Measure α✝
s✝ t : Set α✝
α : Type u_5
m₀ : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
C : Set (Set α)
hμν : ∀ s ∈ C, ↑↑μ s = ↑↑ν s
m : MeasurableSpace α
h : m ≤ m₀
hA : m = generateFrom C
hC : IsPiSystem C
h_univ : ↑↑μ univ = ↑↑ν univ
s : Set α
hs : MeasurableSet s
⊢ ↑↑μ univ < ⊤

Next tactic:
apply IsFiniteMeasure.measure_univ_lt_top