Theorem: MeasureTheory.Measure.InnerRegular.weaklyRegular_of_finite
File: Mathlib/MeasureTheory/Measure/Regular.lean

tactic: have hfin : ∀ {s}, μ s ≠ ⊤ := @(measure_ne_top μ)
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
⊢ WeaklyRegular μ

tactic: suffices ∀ s, MeasurableSet s → ∀ ε, ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧
    IsClosed F ∧ IsOpen U ∧ μ s ≤ μ F + ε ∧ μ U ≤ μ s + ε by
  refine'
    { outerRegular := fun s hs r hr => _
      innerRegular := H }
  rcases exists_between hr with ⟨r', hsr', hr'r⟩
  rcases this s hs _ (tsub_pos_iff_lt.2 hsr').ne' with ⟨-, -, U, hsU, -, hUo, -, H⟩
  refine' ⟨U, hsU, hUo, _⟩
  rw [add_tsub_cancel_of_le hsr'.le] at H
  exact H.trans_lt hr'r
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
⊢ WeaklyRegular μ

tactic: refine' MeasurableSet.induction_on_open _ _ _
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
⊢ ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε

tactic: refine'
  { outerRegular := fun s hs r hr => _
    innerRegular := H }
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
⊢ WeaklyRegular μ

tactic: rcases exists_between hr with ⟨r', hsr', hr'r⟩
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > ↑↑μ s
⊢ ∃ U, U ⊇ s ∧ IsOpen U ∧ ↑↑μ U < r

tactic: rcases this s hs _ (tsub_pos_iff_lt.2 hsr').ne' with ⟨-, -, U, hsU, -, hUo, -, H⟩
state_before: case intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > ↑↑μ s
r' : ℝ≥0∞
hsr' : ↑↑μ s < r'
hr'r : r' < r
⊢ ∃ U, U ⊇ s ∧ IsOpen U ∧ ↑↑μ U < r

tactic: refine' ⟨U, hsU, hUo, _⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > ↑↑μ s
r' : ℝ≥0∞
hsr' : ↑↑μ s < r'
hr'r : r' < r
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
H : ↑↑μ U ≤ ↑↑μ s + (r' - ↑↑μ s)
⊢ ∃ U, U ⊇ s ∧ IsOpen U ∧ ↑↑μ U < r

tactic: rw [add_tsub_cancel_of_le hsr'.le] at H
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > ↑↑μ s
r' : ℝ≥0∞
hsr' : ↑↑μ s < r'
hr'r : r' < r
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
H : ↑↑μ U ≤ ↑↑μ s + (r' - ↑↑μ s)
⊢ ↑↑μ U < r

tactic: exact H.trans_lt hr'r
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s →
      ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > ↑↑μ s
r' : ℝ≥0∞
hsr' : ↑↑μ s < r'
hr'r : r' < r
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
H : ↑↑μ U ≤ r'
⊢ ↑↑μ U < r

tactic: intro U hU ε hε
state_before: case refine'_1
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
⊢ ∀ (U : Set α),
    IsOpen U →
      ∀ (ε : ℝ≥0∞),
        ε ≠ 0 → ∃ F, F ⊆ U ∧ ∃ U_1, U_1 ⊇ U ∧ IsClosed F ∧ IsOpen U_1 ∧ ↑↑μ U ≤ ↑↑μ F + ε ∧ ↑↑μ U_1 ≤ ↑↑μ U + ε

tactic: rcases H.exists_subset_lt_add isClosed_empty hU hfin hε with ⟨F, hsF, hFc, hF⟩
state_before: case refine'_1
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
U : Set α
hU : IsOpen U
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ F, F ⊆ U ∧ ∃ U_1, U_1 ⊇ U ∧ IsClosed F ∧ IsOpen U_1 ∧ ↑↑μ U ≤ ↑↑μ F + ε ∧ ↑↑μ U_1 ≤ ↑↑μ U + ε

tactic: exact ⟨F, hsF, U, Subset.rfl, hFc, hU, hF.le, le_self_add⟩
state_before: case refine'_1.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
U : Set α
hU : IsOpen U
ε : ℝ≥0∞
hε : ε ≠ 0
F : Set α
hsF : F ⊆ U
hFc : IsClosed F
hF : ↑↑μ U < ↑↑μ F + ε
⊢ ∃ F, F ⊆ U ∧ ∃ U_1, U_1 ⊇ U ∧ IsClosed F ∧ IsOpen U_1 ∧ ↑↑μ U ≤ ↑↑μ F + ε ∧ ↑↑μ U_1 ≤ ↑↑μ U + ε

tactic: rintro s hs H ε hε
state_before: case refine'_2
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
⊢ ∀ (t : Set α),
    MeasurableSet t →
      (∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ t ∧ ∃ U, U ⊇ t ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ t ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ t + ε) →
        ∀ (ε : ℝ≥0∞),
          ε ≠ 0 → ∃ F, F ⊆ tᶜ ∧ ∃ U, U ⊇ tᶜ ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (tᶜ) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (tᶜ) + ε

tactic: rcases H ε hε with ⟨F, hFs, U, hsU, hFc, hUo, hF, hU⟩
state_before: case refine'_2
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ F, F ⊆ sᶜ ∧ ∃ U, U ⊇ sᶜ ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (sᶜ) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (sᶜ) + ε

tactic: refine'
  ⟨Uᶜ, compl_subset_compl.2 hsU, Fᶜ, compl_subset_compl.2 hFs, hUo.isClosed_compl,
    hFc.isOpen_compl, _⟩
state_before: case refine'_2.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
ε : ℝ≥0∞
hε : ε ≠ 0
F : Set α
hFs : F ⊆ s
U : Set α
hsU : U ⊇ s
hFc : IsClosed F
hUo : IsOpen U
hF : ↑↑μ s ≤ ↑↑μ F + ε
hU : ↑↑μ U ≤ ↑↑μ s + ε
⊢ ∃ F, F ⊆ sᶜ ∧ ∃ U, U ⊇ sᶜ ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (sᶜ) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (sᶜ) + ε

tactic: simp only [measure_compl_le_add_iff, *, hUo.measurableSet, hFc.measurableSet, true_and_iff]
state_before: case refine'_2.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F, F ⊆ s ∧ ∃ U, U ⊇ s ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ s ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ s + ε
ε : ℝ≥0∞
hε : ε ≠ 0
F : Set α
hFs : F ⊆ s
U : Set α
hsU : U ⊇ s
hFc : IsClosed F
hUo : IsOpen U
hF : ↑↑μ s ≤ ↑↑μ F + ε
hU : ↑↑μ U ≤ ↑↑μ s + ε
⊢ ↑↑μ (sᶜ) ≤ ↑↑μ (Uᶜ) + ε ∧ ↑↑μ (Fᶜ) ≤ ↑↑μ (sᶜ) + ε

tactic: intro s hsd hsm H ε ε0
state_before: case refine'_3
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
⊢ ∀ (f : ℕ → Set α),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) →
        (∀ (i : ℕ) (ε : ℝ≥0∞),
            ε ≠ 0 →
              ∃ F, F ⊆ f i ∧ ∃ U, U ⊇ f i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (f i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (f i) + ε) →
          ∀ (ε : ℝ≥0∞),
            ε ≠ 0 →
              ∃ F,
                (F ⊆ ⋃ (i : ℕ), f i) ∧
                  ∃ U,
                    (U ⊇ ⋃ (i : ℕ), f i) ∧
                      IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), f i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), f i) + ε

tactic: have ε0' : ε / 2 ≠ 0 := (ENNReal.half_pos ε0).ne'
state_before: case refine'_3
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: rcases ENNReal.exists_pos_sum_of_countable' ε0' ℕ with ⟨δ, δ0, hδε⟩
state_before: case refine'_3
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: choose F hFs U hsU hFc hUo hF hU using fun n => H n (δ n) (δ0 n).ne'
state_before: case refine'_3.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: have : Tendsto (fun t => (∑ k in t, μ (s k)) + ε / 2) atTop (𝓝 <| μ (⋃ n, s n) + ε / 2) := by
  rw [measure_iUnion hsd hsm]
  exact Tendsto.add ENNReal.summable.hasSum tendsto_const_nhds
state_before: case refine'_3.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: rcases(this.eventually <| lt_mem_nhds <| ENNReal.lt_add_right hfin ε0').exists with ⟨t, ht⟩
state_before: case refine'_3.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: refine'
  ⟨⋃ k ∈ t, F k, iUnion_mono fun k => iUnion_subset fun _ => hFs _, ⋃ n, U n, iUnion_mono hsU,
    isClosed_biUnion t.finite_toSet fun k _ => hFc k, isOpen_iUnion hUo, ht.le.trans _, _⟩
state_before: case refine'_3.intro.intro.intro
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∃ F,
    (F ⊆ ⋃ (i : ℕ), s i) ∧
      ∃ U,
        (U ⊇ ⋃ (i : ℕ), s i) ∧
          IsClosed F ∧ IsOpen U ∧ ↑↑μ (⋃ (i : ℕ), s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: rw [measure_iUnion hsd hsm]
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
⊢ Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))

tactic: exact Tendsto.add ENNReal.summable.hasSum tendsto_const_nhds
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
⊢ Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 ((∑' (i : ℕ), ↑↑μ (s i)) + ε / 2))

tactic: calc
  (∑ k in t, μ (s k)) + ε / 2 ≤ ((∑ k in t, μ (F k)) + ∑ k in t, δ k) + ε / 2 := by
    rw [← sum_add_distrib]
    exact add_le_add_right (sum_le_sum fun k _ => hF k) _
  _ ≤ (∑ k in t, μ (F k)) + ε / 2 + ε / 2 :=
    (add_le_add_right (add_le_add_left ((ENNReal.sum_le_tsum _).trans hδε.le) _) _)
  _ = μ (⋃ k ∈ t, F k) + ε := by
    rw [measure_biUnion_finset, add_assoc, ENNReal.add_halves]
    exacts [fun k _ n _ hkn => (hsd hkn).mono (hFs k) (hFs n),
      fun k _ => (hFc k).measurableSet]
state_before: case refine'_3.intro.intro.intro.refine'_1
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∑ k in t, ↑↑μ (s k) + ε / 2 ≤ ↑↑μ (⋃ (k : ℕ) (_ : k ∈ t), F k) + ε

tactic: rw [← sum_add_distrib]
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∑ k in t, ↑↑μ (s k) + ε / 2 ≤ ∑ k in t, ↑↑μ (F k) + ∑ k in t, δ k + ε / 2

tactic: exact add_le_add_right (sum_le_sum fun k _ => hF k) _
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∑ k in t, ↑↑μ (s k) + ε / 2 ≤ ∑ x in t, (↑↑μ (F x) + δ x) + ε / 2

tactic: rw [measure_biUnion_finset, add_assoc, ENNReal.add_halves]
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∑ k in t, ↑↑μ (F k) + ε / 2 + ε / 2 = ↑↑μ (⋃ (k : ℕ) (_ : k ∈ t), F k) + ε

tactic: exacts [fun k _ n _ hkn => (hsd hkn).mono (hFs k) (hFs n),
  fun k _ => (hFc k).measurableSet]
state_before: case hd
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ PairwiseDisjoint ↑t fun k => F k

case hm
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ∀ (b : ℕ), b ∈ t → MeasurableSet (F b)

tactic: calc
  μ (⋃ n, U n) ≤ ∑' n, μ (U n) := measure_iUnion_le _
  _ ≤ ∑' n, μ (s n) + δ n := (ENNReal.tsum_le_tsum hU)
  _ = μ (⋃ n, s n) + ∑' n, δ n := by rw [measure_iUnion hsd hsm, ENNReal.tsum_add]
  _ ≤ μ (⋃ n, s n) + ε := add_le_add_left (hδε.le.trans ENNReal.half_le_self) _
state_before: case refine'_3.intro.intro.intro.refine'_2
α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ ↑↑μ (⋃ (n : ℕ), U n) ≤ ↑↑μ (⋃ (i : ℕ), s i) + ε

tactic: rw [measure_iUnion hsd hsm, ENNReal.tsum_add]
state_before: α : Type u_1
β : Type ?u.45887
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : InnerRegular μ IsClosed IsOpen
hfin : ∀ {s : Set α}, ↑↑μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Disjoint on s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H :
  ∀ (i : ℕ) (ε : ℝ≥0∞),
    ε ≠ 0 → ∃ F, F ⊆ s i ∧ ∃ U, U ⊇ s i ∧ IsClosed F ∧ IsOpen U ∧ ↑↑μ (s i) ≤ ↑↑μ F + ε ∧ ↑↑μ U ≤ ↑↑μ (s i) + ε
ε : ℝ≥0∞
ε0 : ε ≠ 0
ε0' : ε / 2 ≠ 0
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : (∑' (i : ℕ), δ i) < ε / 2
F : ℕ → Set α
hFs : ∀ (n : ℕ), F n ⊆ s n
U : ℕ → Set α
hsU : ∀ (n : ℕ), U n ⊇ s n
hFc : ∀ (n : ℕ), IsClosed (F n)
hUo : ∀ (n : ℕ), IsOpen (U n)
hF : ∀ (n : ℕ), ↑↑μ (s n) ≤ ↑↑μ (F n) + δ n
hU : ∀ (n : ℕ), ↑↑μ (U n) ≤ ↑↑μ (s n) + δ n
this : Tendsto (fun t => ∑ k in t, ↑↑μ (s k) + ε / 2) atTop (𝓝 (↑↑μ (⋃ (n : ℕ), s n) + ε / 2))
t : Finset ℕ
ht : ↑↑μ (⋃ (n : ℕ), s n) < ∑ k in t, ↑↑μ (s k) + ε / 2
⊢ (∑' (n : ℕ), ↑↑μ (s n) + δ n) = ↑↑μ (⋃ (n : ℕ), s n) + ∑' (n : ℕ), δ n