-- Mathlib/MeasureTheory/Measure/Regular.lean
theorem weaklyRegular_of_finite [BorelSpace α] (μ : Measure α) [IsFiniteMeasure μ]
    (H : InnerRegularWRT μ IsClosed IsOpen) : WeaklyRegular μ

Proof state:
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Function.onFun Disjoint s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H : ∀ (i : ℕ) (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s i, ∃ 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 ∈ t, μ (s k) + ε / 2) atTop (𝓝 (μ (⋃ n, s n) + ε / 2))

Tactic:
rw [measure_iUnion hsd hsm]

Result:
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Function.onFun Disjoint s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H : ∀ (i : ℕ) (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s i, ∃ 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 ∈ t, μ (s k) + ε / 2) atTop (𝓝 (∑' (i : ℕ), μ (s i) + ε / 2))

Proof state:
case iUnion.intro.intro.intro.refine_1
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Function.onFun Disjoint s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H : ∀ (i : ℕ) (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s i, ∃ 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 ∈ t, μ (s k) + ε / 2) atTop (𝓝 (μ (⋃ n, s n) + ε / 2))
t : Finset ℕ
ht : μ (⋃ n, s n) < ∑ k ∈ t, μ (s k) + ε / 2
⊢ ∑ k ∈ t, μ (s k) + ε / 2 ≤ μ (⋃ k ∈ t, F k) + ε

Tactic:
calc
  (∑ k ∈ t, μ (s k)) + ε / 2 ≤ ((∑ k ∈ t, μ (F k)) + ∑ k ∈ t, δ k) + ε / 2 := by
    rw [← sum_add_distrib]
    gcongr
    apply hF
  _ ≤ (∑ k ∈ t, μ (F k)) + ε / 2 + ε / 2 := by
    gcongr
    exact (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]

Result:
no goals

Proof state:
case compl.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s, ∃ 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 ⊆ sᶜ, ∃ 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, ?_⟩

Result:
case compl.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s, ∃ 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ᶜ + ε

Proof state:
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s → ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s, ∃ U ⊇ s, IsClosed F ∧ IsOpen U ∧ μ s ≤ μ F + ε ∧ μ U ≤ μ s + ε
⊢ μ.WeaklyRegular

Tactic:
refine
  { outerRegular := fun s hs r hr => ?_
    innerRegular := H }

Result:
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
this :
  ∀ (s : Set α),
    MeasurableSet s → ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s, ∃ U ⊇ s, IsClosed F ∧ IsOpen U ∧ μ s ≤ μ F + ε ∧ μ U ≤ μ s + ε
s : Set α
hs : MeasurableSet s
r : ℝ≥0∞
hr : r > μ s
⊢ ∃ U ⊇ s, IsOpen U ∧ μ U < r

Proof state:
case compl.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : Set α
hs : MeasurableSet s
H : ∀ (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s, ∃ 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:
simp only [measure_compl_le_add_iff, *, hUo.measurableSet, hFc.measurableSet, true_and]

Result:
no goals

Proof state:
case bc.bc
α : Type u_1
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H✝ : μ.InnerRegularWRT IsClosed IsOpen
hfin : ∀ {s : Set α}, μ s ≠ ⊤
s : ℕ → Set α
hsd : Pairwise (Function.onFun Disjoint s)
hsm : ∀ (i : ℕ), MeasurableSet (s i)
H : ∀ (i : ℕ) (ε : ℝ≥0∞), ε ≠ 0 → ∃ F ⊆ s i, ∃ 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 ∈ t, μ (s k) + ε / 2) atTop (𝓝 (μ (⋃ n, s n) + ε / 2))
t : Finset ℕ
ht : μ (⋃ n, s n) < ∑ k ∈ t, μ (s k) + ε / 2
⊢ ∑ k ∈ t, δ k ≤ ε / 2

Tactic:
exact (ENNReal.sum_le_tsum _).trans hδε.le

Result:
no goals