l3lab/ntp-mathlib huggingface dataset:
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  

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
this : IsFiniteMeasure ν
⊢ ↑↑μ s = ↑↑ν s

Next tactic:
refine' induction_on_inter hA hC (by simp) hμν _ _ hs
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (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
this : IsFiniteMeasure ν
⊢ ↑↑μ ∅ = ↑↑ν ∅

Next tactic:
simp
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · 

Proof state:
case refine'_1
α✝ : 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
this : IsFiniteMeasure ν
⊢ ∀ (t : Set α), MeasurableSet t → ↑↑μ t = ↑↑ν t → ↑↑μ tᶜ = ↑↑ν tᶜ

Next tactic:
intro t h1t h2t
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · intro t h1t h2t
    

Proof state:
case refine'_1
α✝ : 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
this : IsFiniteMeasure ν
t : Set α
h1t : MeasurableSet t
h2t : ↑↑μ t = ↑↑ν t
⊢ ↑↑μ tᶜ = ↑↑ν tᶜ

Next tactic:
have h1t_ : @MeasurableSet α m₀ t := h _ h1t
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · intro t h1t h2t
    have h1t_ : @MeasurableSet α m₀ t := h _ h1t
    

Proof state:
case refine'_1
α✝ : 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
this : IsFiniteMeasure ν
t : Set α
h1t : MeasurableSet t
h2t : ↑↑μ t = ↑↑ν t
h1t_ : MeasurableSet t
⊢ ↑↑μ tᶜ = ↑↑ν tᶜ

Next tactic:
rw [@measure_compl α m₀ μ t h1t_ (@measure_ne_top α m₀ μ _ t),
      @measure_compl α m₀ ν t h1t_ (@measure_ne_top α m₀ ν _ t), h_univ, h2t]
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · intro t h1t h2t
    have h1t_ : @MeasurableSet α m₀ t := h _ h1t
    rw [@measure_compl α m₀ μ t h1t_ (@measure_ne_top α m₀ μ _ t),
      @measure_compl α m₀ ν t h1t_ (@measure_ne_top α m₀ ν _ t), h_univ, h2t]
  · 

Proof state:
case refine'_2
α✝ : 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
this : IsFiniteMeasure ν
⊢ ∀ (f : ℕ → Set α),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) → (∀ (i : ℕ), ↑↑μ (f i) = ↑↑ν (f i)) → ↑↑μ (⋃ i, f i) = ↑↑ν (⋃ i, f i)

Next tactic:
intro f h1f h2f h3f
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · intro t h1t h2t
    have h1t_ : @MeasurableSet α m₀ t := h _ h1t
    rw [@measure_compl α m₀ μ t h1t_ (@measure_ne_top α m₀ μ _ t),
      @measure_compl α m₀ ν t h1t_ (@measure_ne_top α m₀ ν _ t), h_univ, h2t]
  · intro f h1f h2f h3f
    

Proof state:
case refine'_2
α✝ : 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
this : IsFiniteMeasure ν
f : ℕ → Set α
h1f : Pairwise (Disjoint on f)
h2f : ∀ (i : ℕ), MeasurableSet (f i)
h3f : ∀ (i : ℕ), ↑↑μ (f i) = ↑↑ν (f i)
⊢ ↑↑μ (⋃ i, f i) = ↑↑ν (⋃ i, f i)

Next tactic:
have h2f_ : ∀ i : ℕ, @MeasurableSet α m₀ (f i) := fun i => h _ (h2f i)
/-- 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]
    apply IsFiniteMeasure.measure_univ_lt_top
  refine' induction_on_inter hA hC (by simp) hμν _ _ hs
  · intro t h1t h2t
    have h1t_ : @MeasurableSet α m₀ t := h _ h1t
    rw [@measure_compl α m₀ μ t h1t_ (@measure_ne_top α m₀ μ _ t),
      @measure_compl α m₀ ν t h1t_ (@measure_ne_top α m₀ ν _ t), h_univ, h2t]
  · intro f h1f h2f h3f
    have h2f_ : ∀ i : ℕ, @MeasurableSet α m₀ (f i) := fun i => h _ (h2f i)
    

Proof state:
case refine'_2
α✝ : 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
this : IsFiniteMeasure ν
f : ℕ → Set α
h1f : Pairwise (Disjoint on f)
h2f : ∀ (i : ℕ), MeasurableSet (f i)
h3f : ∀ (i : ℕ), ↑↑μ (f i) = ↑↑ν (f i)
h2f_ : ∀ (i : ℕ), MeasurableSet (f i)
⊢ ↑↑μ (⋃ i, f i) = ↑↑ν (⋃ i, f i)

Next tactic:
simp [measure_iUnion, h1f, h3f, h2f_]
@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ μ.ae) ↔ μ.FiniteAtFilter f := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
f g : Filter α
⊢ FiniteAtFilter μ (f ⊓ ae μ) ↔ FiniteAtFilter μ f

Next tactic:
refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ μ.ae) ↔ μ.FiniteAtFilter f := by
  refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
f g : Filter α
⊢ FiniteAtFilter μ (f ⊓ ae μ) → FiniteAtFilter μ f

Next tactic:
rintro ⟨s, ⟨t, ht, u, hu, rfl⟩, hμ⟩
@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ μ.ae) ↔ μ.FiniteAtFilter f := by
  refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
  rintro ⟨s, ⟨t, ht, u, hu, rfl⟩, hμ⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t✝ : Set α
f g : Filter α
t : Set α
ht : t ∈ f
u : Set α
hu : u ∈ ae μ
hμ : ↑↑μ (t ∩ u) < ⊤
⊢ FiniteAtFilter μ f

Next tactic:
suffices : μ t ≤ μ (t ∩ u)
@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ μ.ae) ↔ μ.FiniteAtFilter f := by
  refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
  rintro ⟨s, ⟨t, ht, u, hu, rfl⟩, hμ⟩
  suffices : μ t ≤ μ (t ∩ u); 

Proof state:
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t✝ : Set α
f g : Filter α
t : Set α
ht : t ∈ f
u : Set α
hu : u ∈ ae μ
hμ : ↑↑μ (t ∩ u) < ⊤
this : ↑↑μ t ≤ ↑↑μ (t ∩ u)
⊢ FiniteAtFilter μ f
case this
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t✝ : Set α
f g : Filter α
t : Set α
ht : t ∈ f
u : Set α
hu : u ∈ ae μ
hμ : ↑↑μ (t ∩ u) < ⊤
⊢ ↑↑μ t ≤ ↑↑μ (t ∩ u)

Next tactic:
exact ⟨t, ht, this.trans_lt hμ⟩
@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ μ.ae) ↔ μ.FiniteAtFilter f := by
  refine' ⟨_, fun h => h.filter_mono inf_le_left⟩
  rintro ⟨s, ⟨t, ht, u, hu, rfl⟩, hμ⟩
  suffices : μ t ≤ μ (t ∩ u); exact ⟨t, ht, this.trans_lt hμ⟩
  

Proof state:
case this
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t✝ : Set α
f g : Filter α
t : Set α
ht : t ∈ f
u : Set α
hu : u ∈ ae μ
hμ : ↑↑μ (t ∩ u) < ⊤
⊢ ↑↑μ t ≤ ↑↑μ (t ∩ u)

Next tactic:
exact measure_mono_ae (mem_of_superset hu fun x hu ht => ⟨ht, hu⟩)
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∃ U, ∃ (_ : U ⊇ s), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
refine' IsCompact.induction_on h _ _ _ _
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∃ U, ∃ (_ : U ⊇ ∅), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
use ∅
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    

Proof state:
case h
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∃ (_ : ∅ ⊇ ∅), IsOpen ∅ ∧ ↑↑μ ∅ < ⊤

Next tactic:
simp [Superset]
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∀ ⦃s t : Set α⦄, s ⊆ t → (∃ U, ∃ (_ : U ⊇ t), IsOpen U ∧ ↑↑μ U < ⊤) → ∃ U, ∃ (_ : U ⊇ s), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
rintro s t hst ⟨U, htU, hUo, hU⟩
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    

Proof state:
case refine'_2.intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s✝ : Set α
h : IsCompact s✝
hμ : ∀ x ∈ s✝, FiniteAtFilter μ (𝓝 x)
s t : Set α
hst : s ⊆ t
U : Set α
htU : U ⊇ t
hUo : IsOpen U
hU : ↑↑μ U < ⊤
⊢ ∃ U, ∃ (_ : U ⊇ s), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
exact ⟨U, hst.trans htU, hUo, hU⟩
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    exact ⟨U, hst.trans htU, hUo, hU⟩
  · 

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∀ ⦃s t : Set α⦄,
    (∃ U, ∃ (_ : U ⊇ s), IsOpen U ∧ ↑↑μ U < ⊤) →
      (∃ U, ∃ (_ : U ⊇ t), IsOpen U ∧ ↑↑μ U < ⊤) → ∃ U, ∃ (_ : U ⊇ s ∪ t), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
rintro s t ⟨U, hsU, hUo, hU⟩ ⟨V, htV, hVo, hV⟩
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    exact ⟨U, hst.trans htU, hUo, hU⟩
  · rintro s t ⟨U, hsU, hUo, hU⟩ ⟨V, htV, hVo, hV⟩
    

Proof state:
case refine'_3.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s✝ : Set α
h : IsCompact s✝
hμ : ∀ x ∈ s✝, FiniteAtFilter μ (𝓝 x)
s t U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hU : ↑↑μ U < ⊤
V : Set α
htV : V ⊇ t
hVo : IsOpen V
hV : ↑↑μ V < ⊤
⊢ ∃ U, ∃ (_ : U ⊇ s ∪ t), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
refine'
      ⟨U ∪ V, union_subset_union hsU htV, hUo.union hVo,
        (measure_union_le _ _).trans_lt <| ENNReal.add_lt_top.2 ⟨hU, hV⟩⟩
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    exact ⟨U, hst.trans htU, hUo, hU⟩
  · rintro s t ⟨U, hsU, hUo, hU⟩ ⟨V, htV, hVo, hV⟩
    refine'
      ⟨U ∪ V, union_subset_union hsU htV, hUo.union hVo,
        (measure_union_le _ _).trans_lt <| ENNReal.add_lt_top.2 ⟨hU, hV⟩⟩
  · 

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
⊢ ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∃ U, ∃ (_ : U ⊇ t), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
intro x hx
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    exact ⟨U, hst.trans htU, hUo, hU⟩
  · rintro s t ⟨U, hsU, hUo, hU⟩ ⟨V, htV, hVo, hV⟩
    refine'
      ⟨U ∪ V, union_subset_union hsU htV, hUo.union hVo,
        (measure_union_le _ _).trans_lt <| ENNReal.add_lt_top.2 ⟨hU, hV⟩⟩
  · intro x hx
    

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
x : α
hx : x ∈ s
⊢ ∃ t ∈ 𝓝[s] x, ∃ U, ∃ (_ : U ⊇ t), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
rcases (hμ x hx).exists_mem_basis (nhds_basis_opens _) with ⟨U, ⟨hx, hUo⟩, hU⟩
/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ (U : _) (_ : U ⊇ s), IsOpen U ∧ μ U < ∞ := by
  refine' IsCompact.induction_on h _ _ _ _
  · use ∅
    simp [Superset]
  · rintro s t hst ⟨U, htU, hUo, hU⟩
    exact ⟨U, hst.trans htU, hUo, hU⟩
  · rintro s t ⟨U, hsU, hUo, hU⟩ ⟨V, htV, hVo, hV⟩
    refine'
      ⟨U ∪ V, union_subset_union hsU htV, hUo.union hVo,
        (measure_union_le _ _).trans_lt <| ENNReal.add_lt_top.2 ⟨hU, hV⟩⟩
  · intro x hx
    rcases (hμ x hx).exists_mem_basis (nhds_basis_opens _) with ⟨U, ⟨hx, hUo⟩, hU⟩
    

Proof state:
case refine'_4.intro.intro.intro
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝 x)
x : α
hx✝ : x ∈ s
U : Set α
hU : ↑↑μ U < ⊤
hx : x ∈ U
hUo : IsOpen U
⊢ ∃ t ∈ 𝓝[s] x, ∃ U, ∃ (_ : U ⊇ t), IsOpen U ∧ ↑↑μ U < ⊤

Next tactic:
exact ⟨U, nhdsWithin_le_nhds (hUo.mem_nhds hx), U, Subset.rfl, hUo, hU⟩
theorem measure_lt_top_of_nhdsWithin (h : IsCompact s) (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝[s] x)) :
    μ s < ∞ :=
  IsCompact.induction_on h (by 

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h : IsCompact s
hμ : ∀ x ∈ s, FiniteAtFilter μ (𝓝[s] x)
⊢ ↑↑μ ∅ < ⊤

Next tactic:
simp
theorem measure_zero_of_nhdsWithin (hs : IsCompact s) :
    (∀ a ∈ s, ∃ t ∈ 𝓝[s] a, μ t = 0) → μ s = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
hs : IsCompact s
⊢ (∀ a ∈ s, ∃ t ∈ 𝓝[s] a, ↑↑μ t = 0) → ↑↑μ s = 0

Next tactic:
simpa only [← compl_mem_ae_iff] using hs.compl_mem_sets_of_nhdsWithin
theorem isFiniteMeasure_iff_isFiniteMeasureOnCompacts_of_compactSpace [TopologicalSpace α]
    [MeasurableSpace α] {μ : Measure α} [CompactSpace α] :
    IsFiniteMeasure μ ↔ IsFiniteMeasureOnCompacts μ := by
  

Proof state:
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : CompactSpace α
⊢ IsFiniteMeasure μ ↔ IsFiniteMeasureOnCompacts μ

Next tactic:
constructor
theorem isFiniteMeasure_iff_isFiniteMeasureOnCompacts_of_compactSpace [TopologicalSpace α]
    [MeasurableSpace α] {μ : Measure α} [CompactSpace α] :
    IsFiniteMeasure μ ↔ IsFiniteMeasureOnCompacts μ := by
  constructor <;> 

Proof state:
case mp
α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
inst✝² : TopologicalSpace α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : CompactSpace α
⊢ IsFiniteMeasure μ → IsFiniteMeasureOnCompacts μ

Next tactic:
intros