[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
hU : q U
⊢ ↑↑μ U = ⨆ (K : Set α) (_ : K ⊆ U) (_ : p K), ↑↑μ K
[PROOFSTEP]
refine' le_antisymm (le_of_forall_lt fun r hr => _) (iSup₂_le fun K hK => iSup_le fun _ => μ.mono hK)
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
hU : q U
r : ℝ≥0∞
hr : r < ↑↑μ U
⊢ r < ⨆ (K : Set α) (_ : K ⊆ U) (_ : p K), ↑↑μ K
[PROOFSTEP]
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε
[PROOFSTEP]
cases' eq_or_ne (μ U) 0 with h₀ h₀
[GOAL]
case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε
[PROOFSTEP]
refine' ⟨∅, empty_subset _, h0, _⟩
[GOAL]
case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ↑↑μ U < ↑↑μ ∅ + ε
[PROOFSTEP]
rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero]
[GOAL]
case inr
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε
[PROOFSTEP]
rcases H hU _ (ENNReal.sub_lt_self hμU h₀ hε) with ⟨K, hKU, hKc, hrK⟩
[GOAL]
case inr.intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
K : Set α
hKU : K ⊆ U
hKc : p K
hrK : ↑↑μ U - ε < ↑↑μ K
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε
[PROOFSTEP]
exact ⟨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hμU) hrK⟩
[GOAL]
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegular μ pa qa
f : α ≃ β
hf : AEMeasurable ↑f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (↑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (↑f '' K)
hB₁ : ∀ (K : Set β), pb K → MeasurableSet K
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
⊢ InnerRegular (Measure.map (↑f) μ) pb qb
[PROOFSTEP]
intro U hU r hr
[GOAL]
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegular μ pa qa
f : α ≃ β
hf : AEMeasurable ↑f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (↑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (↑f '' K)
hB₁ : ∀ (K : Set β), pb K → MeasurableSet K
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑(Measure.map (↑f) μ) U
⊢ ∃ K, K ⊆ U ∧ pb K ∧ r < ↑↑(Measure.map (↑f) μ) K
[PROOFSTEP]
rw [map_apply_of_aemeasurable hf (hB₂ _ hU)] at hr 
[GOAL]
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegular μ pa qa
f : α ≃ β
hf : AEMeasurable ↑f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (↑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (↑f '' K)
hB₁ : ∀ (K : Set β), pb K → MeasurableSet K
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (↑f ⁻¹' U)
⊢ ∃ K, K ⊆ U ∧ pb K ∧ r < ↑↑(Measure.map (↑f) μ) K
[PROOFSTEP]
rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
[GOAL]
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegular μ pa qa
f : α ≃ β
hf : AEMeasurable ↑f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (↑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (↑f '' K)
hB₁ : ∀ (K : Set β), pb K → MeasurableSet K
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (↑f ⁻¹' U)
K : Set α
hKU : K ⊆ ↑f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ ∃ K, K ⊆ U ∧ pb K ∧ r < ↑↑(Measure.map (↑f) μ) K
[PROOFSTEP]
refine' ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, _⟩
[GOAL]
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegular μ pa qa
f : α ≃ β
hf : AEMeasurable ↑f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (↑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (↑f '' K)
hB₁ : ∀ (K : Set β), pb K → MeasurableSet K
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (↑f ⁻¹' U)
K : Set α
hKU : K ⊆ ↑f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ r < ↑↑(Measure.map (↑f) μ) (↑f '' K)
[PROOFSTEP]
rwa [map_apply_of_aemeasurable hf (hB₁ _ <| hAB' _ hKc), f.preimage_image]
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
c : ℝ≥0∞
⊢ InnerRegular (c • μ) p q
[PROOFSTEP]
intro U hU r hr
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
c : ℝ≥0∞
U : Set α
hU : q U
r : ℝ≥0∞
hr : r < ↑↑(c • μ) U
⊢ ∃ K, K ⊆ U ∧ p K ∧ r < ↑↑(c • μ) K
[PROOFSTEP]
rw [smul_apply, H.measure_eq_iSup hU, smul_eq_mul] at hr 
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
c : ℝ≥0∞
U : Set α
hU : q U
r : ℝ≥0∞
hr : r < c * ⨆ (K : Set α) (_ : K ⊆ U) (_ : p K), ↑↑μ K
⊢ ∃ K, K ⊆ U ∧ p K ∧ r < ↑↑(c • μ) K
[PROOFSTEP]
simpa only [ENNReal.mul_iSup, lt_iSup_iff, exists_prop] using hr
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegular μ p q
H' : InnerRegular μ q q'
⊢ InnerRegular μ p q'
[PROOFSTEP]
intro U hU r hr
[GOAL]
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegular μ p q
H' : InnerRegular μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
⊢ ∃ K, K ⊆ U ∧ p K ∧ r < ↑↑μ K
[PROOFSTEP]
rcases H' hU r hr with ⟨F, hFU, hqF, hF⟩
[GOAL]
case intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegular μ p q
H' : InnerRegular μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
F : Set α
hFU : F ⊆ U
hqF : q F
hF : r < ↑↑μ F
⊢ ∃ K, K ⊆ U ∧ p K ∧ r < ↑↑μ K
[PROOFSTEP]
rcases H hqF _ hF with ⟨K, hKF, hpK, hrK⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegular μ p q
H' : InnerRegular μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
F : Set α
hFU : F ⊆ U
hqF : q F
hF : r < ↑↑μ F
K : Set α
hKF : K ⊆ F
hpK : p K
hrK : r < ↑↑μ K
⊢ ∃ K, K ⊆ U ∧ p K ∧ r < ↑↑μ K
[PROOFSTEP]
exact ⟨K, hKF.trans hFU, hpK, hrK⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
rcases OuterRegular.outerRegular (measurableSet_toMeasurable μ A) r (by rwa [measure_toMeasurable]) with
  ⟨U, hAU, hUo, hU⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ r > ↑↑?m.8589 (toMeasurable μ A)
[PROOFSTEP]
rwa [measure_toMeasurable]
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
U : Set α
hAU : U ⊇ toMeasurable μ A
hUo : IsOpen U
hU : ↑↑μ U < r
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
exact ⟨U, (subset_toMeasurable _ _).trans hAU, hUo, hU⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
⊢ ↑↑μ A = ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), ↑↑μ U
[PROOFSTEP]
refine' le_antisymm (le_iInf₂ fun s hs => le_iInf fun _ => μ.mono hs) _
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
⊢ ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), ↑↑μ U ≤ ↑↑μ A
[PROOFSTEP]
refine' le_of_forall_lt' fun r hr => _
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), ↑↑μ U < r
[PROOFSTEP]
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε
[PROOFSTEP]
rcases eq_or_ne (μ A) ∞ with (H | H)
[GOAL]
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A = ⊤
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε
[PROOFSTEP]
exact ⟨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A = ⊤
⊢ ↑↑μ univ ≤ ↑↑μ A + ε
[PROOFSTEP]
simp only [H, _root_.top_add, le_top]
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A ≠ ⊤
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε
[PROOFSTEP]
rcases A.exists_isOpen_lt_add H hε with ⟨U, AU, U_open, hU⟩
[GOAL]
case inr.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A ≠ ⊤
U : Set α
AU : U ⊇ A
U_open : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε
[PROOFSTEP]
exact ⟨U, AU, U_open, hU.le⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < ⊤ ∧ ↑↑μ (U \ A) < ε
[PROOFSTEP]
rcases A.exists_isOpen_lt_add hA' hε with ⟨U, hAU, hUo, hU⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
U : Set α
hAU : U ⊇ A
hUo : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < ⊤ ∧ ↑↑μ (U \ A) < ε
[PROOFSTEP]
use U, hAU, hUo, hU.trans_le le_top
[GOAL]
case right
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
U : Set α
hAU : U ⊇ A
hUo : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ↑↑μ (U \ A) < ε
[PROOFSTEP]
exact measure_diff_lt_of_lt_add hA hAU hA' hU
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
⊢ OuterRegular (map (↑f) μ)
[PROOFSTEP]
refine' ⟨fun A hA r hr => _⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑(map (↑f) μ) A
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(map (↑f) μ) U < r
[PROOFSTEP]
rw [map_apply f.measurable hA, ← f.image_symm] at hr 
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (↑(Homeomorph.symm f) '' A)
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(map (↑f) μ) U < r
[PROOFSTEP]
rcases Set.exists_isOpen_lt_of_lt _ r hr with ⟨U, hAU, hUo, hU⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (↑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ↑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(map (↑f) μ) U < r
[PROOFSTEP]
have : IsOpen (f.symm ⁻¹' U) := hUo.preimage f.symm.continuous
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (↑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ↑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
this : IsOpen (↑(Homeomorph.symm f) ⁻¹' U)
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(map (↑f) μ) U < r
[PROOFSTEP]
refine' ⟨f.symm ⁻¹' U, image_subset_iff.1 hAU, this, _⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (↑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ↑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
this : IsOpen (↑(Homeomorph.symm f) ⁻¹' U)
⊢ ↑↑(map (↑f) μ) (↑(Homeomorph.symm f) ⁻¹' U) < r
[PROOFSTEP]
rwa [map_apply f.measurable this.measurableSet, f.preimage_symm, f.preimage_image]
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
⊢ OuterRegular (x • μ)
[PROOFSTEP]
rcases eq_or_ne x 0 with (rfl | h0)
[GOAL]
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
hx : 0 ≠ ⊤
⊢ OuterRegular (0 • μ)
[PROOFSTEP]
rw [zero_smul]
[GOAL]
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
hx : 0 ≠ ⊤
⊢ OuterRegular 0
[PROOFSTEP]
exact OuterRegular.zero
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
⊢ OuterRegular (x • μ)
[PROOFSTEP]
refine' ⟨fun A _ r hr => _⟩
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
A : Set α
x✝ : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑(x • μ) A
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(x • μ) U < r
[PROOFSTEP]
rw [smul_apply, A.measure_eq_iInf_isOpen, smul_eq_mul] at hr 
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
A : Set α
x✝ : MeasurableSet A
r : ℝ≥0∞
hr : r > x * ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), ↑↑μ U
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(x • μ) U < r
[PROOFSTEP]
simpa only [ENNReal.mul_iInf_of_ne h0 hx, gt_iff_lt, iInf_lt_iff, exists_prop] using hr
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
⊢ OuterRegular μ
[PROOFSTEP]
refine' ⟨fun A hA r hr => _⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
have hm : ∀ n, MeasurableSet (s.set n) := fun n => (s.set_mem n).1.measurableSet
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
haveI : ∀ n, OuterRegular (μ.restrict (s.set n)) := fun n =>
  (s.set_mem n).2
    -- Note that `A = ⋃ n, A ∩ disjointed s n`. We replace `A` with this sequence.
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
obtain ⟨A, hAm, hAs, hAd, rfl⟩ :
  ∃ A' : ℕ → Set α, (∀ n, MeasurableSet (A' n)) ∧ (∀ n, A' n ⊆ s.set n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ n, A' n :=
  by
  refine'
    ⟨fun n => A ∩ disjointed s.set n, fun n => hA.inter (MeasurableSet.disjointed hm _), fun n =>
      (inter_subset_right _ _).trans (disjointed_subset _ _),
      (disjoint_disjointed s.set).mono fun k l hkl => hkl.mono inf_le_right inf_le_right, _⟩
  rw [← inter_iUnion, iUnion_disjointed, s.spanning, inter_univ]
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
⊢ ∃ A',
    (∀ (n : ℕ), MeasurableSet (A' n)) ∧
      (∀ (n : ℕ), A' n ⊆ FiniteSpanningSetsIn.set s n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ (n : ℕ), A' n
[PROOFSTEP]
refine'
  ⟨fun n => A ∩ disjointed s.set n, fun n => hA.inter (MeasurableSet.disjointed hm _), fun n =>
    (inter_subset_right _ _).trans (disjointed_subset _ _),
    (disjoint_disjointed s.set).mono fun k l hkl => hkl.mono inf_le_right inf_le_right, _⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
⊢ A = ⋃ (n : ℕ), (fun n => A ∩ disjointed s.set n) n
[PROOFSTEP]
rw [← inter_iUnion, iUnion_disjointed, s.spanning, inter_univ]
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
⊢ ∃ U, U ⊇ ⋃ (n : ℕ), A n ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
rcases ENNReal.exists_pos_sum_of_countable' (tsub_pos_iff_lt.2 hr).ne' ℕ with ⟨δ, δ0, hδε⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
⊢ ∃ U, U ⊇ ⋃ (n : ℕ), A n ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
rw [lt_tsub_iff_right, add_comm] at hδε 
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
⊢ ∃ U, U ⊇ ⋃ (n : ℕ), A n ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
have : ∀ n, ∃ (U : _) (_ : U ⊇ A n), IsOpen U ∧ μ U < μ (A n) + δ n :=
  by
  intro n
  have H₁ : ∀ t, μ.restrict (s.set n) t = μ (t ∩ s.set n) := fun t => restrict_apply' (hm n)
  have Ht : μ.restrict (s.set n) (A n) ≠ ⊤ := by
    rw [H₁]
    exact ((measure_mono <| inter_subset_right _ _).trans_lt (s.finite n)).ne
  rcases(A n).exists_isOpen_lt_add Ht (δ0 n).ne' with ⟨U, hAU, hUo, hU⟩
  rw [H₁, H₁, inter_eq_self_of_subset_left (hAs _)] at hU 
  exact ⟨U ∩ s.set n, subset_inter hAU (hAs _), hUo.inter (s.set_mem n).1, hU⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
⊢ ∀ (n : ℕ), ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
intro n
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
⊢ ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
have H₁ : ∀ t, μ.restrict (s.set n) t = μ (t ∩ s.set n) := fun t => restrict_apply' (hm n)
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
⊢ ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
have Ht : μ.restrict (s.set n) (A n) ≠ ⊤ := by
  rw [H₁]
  exact ((measure_mono <| inter_subset_right _ _).trans_lt (s.finite n)).ne
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
⊢ ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) (A n) ≠ ⊤
[PROOFSTEP]
rw [H₁]
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
⊢ ↑↑μ (A n ∩ FiniteSpanningSetsIn.set s n) ≠ ⊤
[PROOFSTEP]
exact ((measure_mono <| inter_subset_right _ _).trans_lt (s.finite n)).ne
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
Ht : ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) (A n) ≠ ⊤
⊢ ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
rcases(A n).exists_isOpen_lt_add Ht (δ0 n).ne' with ⟨U, hAU, hUo, hU⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
Ht : ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) (A n) ≠ ⊤
U : Set α
hAU : U ⊇ A n
hUo : IsOpen U
hU : ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) U < ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) (A n) + δ n
⊢ ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
rw [H₁, H₁, inter_eq_self_of_subset_left (hAs _)] at hU 
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
n : ℕ
H₁ : ∀ (t : Set α), ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) t = ↑↑μ (t ∩ FiniteSpanningSetsIn.set s n)
Ht : ↑↑(restrict μ (FiniteSpanningSetsIn.set s n)) (A n) ≠ ⊤
U : Set α
hAU : U ⊇ A n
hUo : IsOpen U
hU : ↑↑μ (U ∩ FiniteSpanningSetsIn.set s n) < ↑↑μ (A n) + δ n
⊢ ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
[PROOFSTEP]
exact ⟨U ∩ s.set n, subset_inter hAU (hAs _), hUo.inter (s.set_mem n).1, hU⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this✝ : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
this : ∀ (n : ℕ), ∃ U x, IsOpen U ∧ ↑↑μ U < ↑↑μ (A n) + δ n
⊢ ∃ U, U ⊇ ⋃ (n : ℕ), A n ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
choose U hAU hUo hU using this
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
U : ℕ → Set α
hAU : ∀ (n : ℕ), U n ⊇ A n
hUo : ∀ (n : ℕ), IsOpen (U n)
hU : ∀ (n : ℕ), ↑↑μ (U n) < ↑↑μ (A n) + δ n
⊢ ∃ U, U ⊇ ⋃ (n : ℕ), A n ∧ IsOpen U ∧ ↑↑μ U < r
[PROOFSTEP]
refine' ⟨⋃ n, U n, iUnion_mono hAU, isOpen_iUnion hUo, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : FiniteSpanningSetsIn μ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
r : ℝ≥0∞
hm : ∀ (n : ℕ), MeasurableSet (FiniteSpanningSetsIn.set s n)
this : ∀ (n : ℕ), OuterRegular (restrict μ (FiniteSpanningSetsIn.set s n))
A : ℕ → Set α
hAm : ∀ (n : ℕ), MeasurableSet (A n)
hAs : ∀ (n : ℕ), A n ⊆ FiniteSpanningSetsIn.set s n
hAd : Pairwise (Disjoint on A)
hA : MeasurableSet (⋃ (n : ℕ), A n)
hr : r > ↑↑μ (⋃ (n : ℕ), A n)
δ : ℕ → ℝ≥0∞
δ0 : ∀ (i : ℕ), 0 < δ i
hδε✝ : ∑' (i : ℕ), δ i < r - ↑↑μ (⋃ (n : ℕ), A n)
hδε : ↑↑μ (⋃ (n : ℕ), A n) + ∑' (i : ℕ), δ i < r
U : ℕ → Set α
hAU : ∀ (n : ℕ), U n ⊇ A n
hUo : ∀ (n : ℕ), IsOpen (U n)
hU : ∀ (n : ℕ), ↑↑μ (U n) < ↑↑μ (A n) + δ n
⊢ ↑↑μ (⋃ (n : ℕ), U n) < r
[PROOFSTEP]
calc
  μ (⋃ n, U n) ≤ ∑' n, μ (U n) := measure_iUnion_le _
  _ ≤ ∑' n, (μ (A n) + δ n) := (ENNReal.tsum_le_tsum fun n => (hU n).le)
  _ = ∑' n, μ (A n) + ∑' n, δ n := ENNReal.tsum_add
  _ = μ (⋃ n, A n) + ∑' n, δ n := (congr_arg₂ (· + ·) (measure_iUnion hAd hAm).symm rfl)
  _ < r := hδε
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
⊢ InnerRegular μ p fun s => MeasurableSet s ∧ ↑↑μ s ≠ ⊤
[PROOFSTEP]
rintro s ⟨hs, hμs⟩ r hr
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
r : ℝ≥0∞
hr : r < ↑↑μ s
⊢ ∃ K, K ⊆ s ∧ p K ∧ r < ↑↑μ K
[PROOFSTEP]
obtain ⟨ε, hε, hεs, rfl⟩ : ∃ (ε : _) (_ : ε ≠ 0), ε + ε ≤ μ s ∧ r = μ s - (ε + ε) :=
  by
  use(μ s - r) / 2
  simp [*, hr.le, ENNReal.add_halves, ENNReal.sub_sub_cancel, le_add_right]
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
r : ℝ≥0∞
hr : r < ↑↑μ s
⊢ ∃ ε x, ε + ε ≤ ↑↑μ s ∧ r = ↑↑μ s - (ε + ε)
[PROOFSTEP]
use(μ s - r) / 2
[GOAL]
case h
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
r : ℝ≥0∞
hr : r < ↑↑μ s
⊢ ∃ x, (↑↑μ s - r) / 2 + (↑↑μ s - r) / 2 ≤ ↑↑μ s ∧ r = ↑↑μ s - ((↑↑μ s - r) / 2 + (↑↑μ s - r) / 2)
[PROOFSTEP]
simp [*, hr.le, ENNReal.add_halves, ENNReal.sub_sub_cancel, le_add_right]
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
⊢ ∃ K, K ⊆ s ∧ p K ∧ ↑↑μ s - (ε + ε) < ↑↑μ K
[PROOFSTEP]
rcases hs.exists_isOpen_diff_lt hμs hε with ⟨U, hsU, hUo, hUt, hμU⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
⊢ ∃ K, K ⊆ s ∧ p K ∧ ↑↑μ s - (ε + ε) < ↑↑μ K
[PROOFSTEP]
rcases(U \ s).exists_isOpen_lt_of_lt _ hμU with ⟨U', hsU', hU'o, hμU'⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hsU' : U' ⊇ U \ s
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
⊢ ∃ K, K ⊆ s ∧ p K ∧ ↑↑μ s - (ε + ε) < ↑↑μ K
[PROOFSTEP]
replace hsU' := diff_subset_comm.1 hsU'
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
⊢ ∃ K, K ⊆ s ∧ p K ∧ ↑↑μ s - (ε + ε) < ↑↑μ K
[PROOFSTEP]
rcases H.exists_subset_lt_add h0 hUo hUt.ne hε with ⟨K, hKU, hKc, hKr⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
K : Set α
hKU : K ⊆ U
hKc : p K
hKr : ↑↑μ U < ↑↑μ K + ε
⊢ ∃ K, K ⊆ s ∧ p K ∧ ↑↑μ s - (ε + ε) < ↑↑μ K
[PROOFSTEP]
refine' ⟨K \ U', fun x hx => hsU' ⟨hKU hx.1, hx.2⟩, hd hKc hU'o, ENNReal.sub_lt_of_lt_add hεs _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
K : Set α
hKU : K ⊆ U
hKc : p K
hKr : ↑↑μ U < ↑↑μ K + ε
⊢ ↑↑μ s < ↑↑μ (K \ U') + (ε + ε)
[PROOFSTEP]
calc
  μ s ≤ μ U := μ.mono hsU
  _ < μ K + ε := hKr
  _ ≤ μ (K \ U') + μ U' + ε := (add_le_add_right (tsub_le_iff_right.1 le_measure_diff) _)
  _ ≤ μ (K \ U') + ε + ε := by
    apply add_le_add_right; apply add_le_add_left
    exact hμU'.le
  _ = μ (K \ U') + (ε + ε) := add_assoc _ _ _
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
K : Set α
hKU : K ⊆ U
hKc : p K
hKr : ↑↑μ U < ↑↑μ K + ε
⊢ ↑↑μ (K \ U') + ↑↑μ U' + ε ≤ ↑↑μ (K \ U') + ε + ε
[PROOFSTEP]
apply add_le_add_right
[GOAL]
case bc
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
K : Set α
hKU : K ⊆ U
hKc : p K
hKr : ↑↑μ U < ↑↑μ K + ε
⊢ ↑↑μ (K \ U') + ↑↑μ U' ≤ ↑↑μ (K \ U') + ε
[PROOFSTEP]
apply add_le_add_left
[GOAL]
case bc.bc
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U✝ s✝ : Set α
ε✝ r : ℝ≥0∞
inst✝ : OuterRegular μ
H : InnerRegular μ p IsOpen
h0 : p ∅
hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U)
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
hεs : ε + ε ≤ ↑↑μ s
hr : ↑↑μ s - (ε + ε) < ↑↑μ s
U : Set α
hsU : U ⊇ s
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ s) < ε
U' : Set α
hU'o : IsOpen U'
hμU' : ↑↑μ U' < ε
hsU' : U \ U' ⊆ s
K : Set α
hKU : K ⊆ U
hKc : p K
hKr : ↑↑μ U < ↑↑μ K + ε
⊢ ↑↑μ U' ≤ ε
[PROOFSTEP]
exact hμU'.le
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
H : InnerRegular μ IsClosed IsOpen
⊢ WeaklyRegular μ
[PROOFSTEP]
have hfin : ∀ {s}, μ s ≠ ⊤ := @(measure_ne_top μ)
[GOAL]
α : Type u_1
β : Type u_2
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 μ
[PROOFSTEP]
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
[GOAL]
α : Type u_1
β : Type u_2
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 μ
[PROOFSTEP]
refine'
  { outerRegular := fun s hs r hr => _
    innerRegular := H }
[GOAL]
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
rcases exists_between hr with ⟨r', hsr', hr'r⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
rcases this s hs _ (tsub_pos_iff_lt.2 hsr').ne' with ⟨-, -, U, hsU, -, hUo, -, H⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
refine' ⟨U, hsU, hUo, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
rw [add_tsub_cancel_of_le hsr'.le] at H 
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
exact H.trans_lt hr'r
[GOAL]
α : Type u_1
β : Type u_2
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 + ε
[PROOFSTEP]
refine'
  MeasurableSet.induction_on_open _ _
    _
      /- The proof is by measurable induction: we should check that the property is true for the empty
          set, for open sets, and is stable by taking the complement and by taking countable disjoint
          unions. The point of the property we are proving is that it is stable by taking complements
          (exchanging the roles of closed and open sets and thanks to the finiteness of the measure). -/
        -- check for open set
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
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 + ε
[PROOFSTEP]
intro U hU ε hε
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
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 + ε
[PROOFSTEP]
rcases H.exists_subset_lt_add isClosed_empty hU hfin hε with ⟨F, hsF, hFc, hF⟩
[GOAL]
case refine'_1.intro.intro.intro
α : Type u_1
β : Type u_2
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 + ε
[PROOFSTEP]
exact
  ⟨F, hsF, U, Subset.rfl, hFc, hU, hF.le, le_self_add⟩
    -- check for complements
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
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ᶜ + ε
[PROOFSTEP]
rintro s hs H ε hε
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
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ᶜ + ε
[PROOFSTEP]
rcases H ε hε with ⟨F, hFs, U, hsU, hFc, hUo, hF, hU⟩
[GOAL]
case refine'_2.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
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ᶜ + ε
[PROOFSTEP]
refine' ⟨Uᶜ, compl_subset_compl.2 hsU, Fᶜ, compl_subset_compl.2 hFs, hUo.isClosed_compl, hFc.isOpen_compl, _⟩
[GOAL]
case refine'_2.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
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ᶜ + ε
[PROOFSTEP]
simp only [measure_compl_le_add_iff, *, hUo.measurableSet, hFc.measurableSet, true_and_iff]
  -- check for disjoint unions
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
intro s hsd hsm H ε ε0
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
have ε0' : ε / 2 ≠ 0 := (ENNReal.half_pos ε0).ne'
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
rcases ENNReal.exists_pos_sum_of_countable' ε0' ℕ with ⟨δ, δ0, hδε⟩
[GOAL]
case refine'_3.intro.intro
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
choose F hFs U hsU hFc hUo hF hU using fun n => H n (δ n) (δ0 n).ne'
[GOAL]
case refine'_3.intro.intro
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
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
[GOAL]
α : Type u_1
β : Type u_2
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))
[PROOFSTEP]
rw [measure_iUnion hsd hsm]
[GOAL]
α : Type u_1
β : Type u_2
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))
[PROOFSTEP]
exact Tendsto.add ENNReal.summable.hasSum tendsto_const_nhds
[GOAL]
case refine'_3.intro.intro
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
rcases(this.eventually <| lt_mem_nhds <| ENNReal.lt_add_right hfin ε0').exists with
  ⟨t, ht⟩
    -- the approximating open set is constructed by taking for each `s n` an approximating open set
        -- `U n` with measure at most `μ (s n) + δ n` for a summable `δ`, and taking the union of these.
[GOAL]
case refine'_3.intro.intro.intro
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
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 _, _⟩
[GOAL]
case refine'_3.intro.intro.intro.refine'_1
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
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]
[GOAL]
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
rw [← sum_add_distrib]
[GOAL]
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
exact add_le_add_right (sum_le_sum fun k _ => hF k) _
[GOAL]
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
rw [measure_biUnion_finset, add_assoc, ENNReal.add_halves]
[GOAL]
case hd
α : Type u_1
β : Type u_2
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_2
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)
[PROOFSTEP]
exacts [fun k _ n _ hkn => (hsd hkn).mono (hFs k) (hFs n), fun k _ => (hFc k).measurableSet]
[GOAL]
case refine'_3.intro.intro.intro.refine'_2
α : Type u_1
β : Type u_2
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) + ε
[PROOFSTEP]
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) _
[GOAL]
α : Type u_1
β : Type u_2
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
[PROOFSTEP]
rw [measure_iUnion hsd hsm, ENNReal.tsum_add]
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
X : Type u_3
inst✝¹ : PseudoEMetricSpace X
inst✝ : MeasurableSpace X
μ : Measure X
⊢ InnerRegular μ IsClosed IsOpen
[PROOFSTEP]
intro U hU r hr
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U✝ s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝¹ : PseudoEMetricSpace X
inst✝ : MeasurableSpace X
μ : Measure X
U : Set X
hU : IsOpen U
r : ℝ≥0∞
hr : r < ↑↑μ U
⊢ ∃ K, K ⊆ U ∧ IsClosed K ∧ r < ↑↑μ K
[PROOFSTEP]
rcases hU.exists_iUnion_isClosed with ⟨F, F_closed, -, rfl, F_mono⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝¹ : PseudoEMetricSpace X
inst✝ : MeasurableSpace X
μ : Measure X
r : ℝ≥0∞
F : ℕ → Set X
F_closed : ∀ (n : ℕ), IsClosed (F n)
F_mono : Monotone F
hU : IsOpen (⋃ (n : ℕ), F n)
hr : r < ↑↑μ (⋃ (n : ℕ), F n)
⊢ ∃ K, K ⊆ ⋃ (n : ℕ), F n ∧ IsClosed K ∧ r < ↑↑μ K
[PROOFSTEP]
rw [measure_iUnion_eq_iSup F_mono.directed_le] at hr 
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝¹ : PseudoEMetricSpace X
inst✝ : MeasurableSpace X
μ : Measure X
r : ℝ≥0∞
F : ℕ → Set X
F_closed : ∀ (n : ℕ), IsClosed (F n)
F_mono : Monotone F
hU : IsOpen (⋃ (n : ℕ), F n)
hr : r < ⨆ (i : ℕ), ↑↑μ (F i)
⊢ ∃ K, K ⊆ ⋃ (n : ℕ), F n ∧ IsClosed K ∧ r < ↑↑μ K
[PROOFSTEP]
rcases lt_iSup_iff.1 hr with ⟨n, hn⟩
[GOAL]
case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝¹ : PseudoEMetricSpace X
inst✝ : MeasurableSpace X
μ : Measure X
r : ℝ≥0∞
F : ℕ → Set X
F_closed : ∀ (n : ℕ), IsClosed (F n)
F_mono : Monotone F
hU : IsOpen (⋃ (n : ℕ), F n)
hr : r < ⨆ (i : ℕ), ↑↑μ (F i)
n : ℕ
hn : r < ↑↑μ (F n)
⊢ ∃ K, K ⊆ ⋃ (n : ℕ), F n ∧ IsClosed K ∧ r < ↑↑μ K
[PROOFSTEP]
exact ⟨F n, subset_iUnion _ _, F_closed n, hn⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
⊢ InnerRegular μ IsCompact IsClosed
[PROOFSTEP]
intro F hF r hr
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
set B : ℕ → Set X := compactCovering X
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
have hBc : ∀ n, IsCompact (F ∩ B n) := fun n => (isCompact_compactCovering X n).inter_left hF
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
have hBU : ⋃ n, F ∩ B n = F := by rw [← inter_iUnion, iUnion_compactCovering, Set.inter_univ]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
⊢ ⋃ (n : ℕ), F ∩ B n = F
[PROOFSTEP]
rw [← inter_iUnion, iUnion_compactCovering, Set.inter_univ]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
have : μ F = ⨆ n, μ (F ∩ B n) := by
  rw [← measure_iUnion_eq_iSup, hBU]
  exact Monotone.directed_le fun m n h => inter_subset_inter_right _ (compactCovering_subset _ h)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
⊢ ↑↑μ F = ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
[PROOFSTEP]
rw [← measure_iUnion_eq_iSup, hBU]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
⊢ Directed (fun x x_1 => x ⊆ x_1) fun n => F ∩ B n
[PROOFSTEP]
exact Monotone.directed_le fun m n h => inter_subset_inter_right _ (compactCovering_subset _ h)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
hr : r < ↑↑μ F
B : ℕ → Set X := compactCovering X
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
this : ↑↑μ F = ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
rw [this] at hr 
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
B : ℕ → Set X := compactCovering X
hr : r < ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
this : ↑↑μ F = ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
rcases lt_iSup_iff.1 hr with ⟨n, hn⟩
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ✝ : Measure α
p q : Set α → Prop
U s : Set α
ε r✝ : ℝ≥0∞
X : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : SigmaCompactSpace X
inst✝ : MeasurableSpace X
μ : Measure X
F : Set X
hF : IsClosed F
r : ℝ≥0∞
B : ℕ → Set X := compactCovering X
hr : r < ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
hBc : ∀ (n : ℕ), IsCompact (F ∩ B n)
hBU : ⋃ (n : ℕ), F ∩ B n = F
this : ↑↑μ F = ⨆ (n : ℕ), ↑↑μ (F ∩ B n)
n : ℕ
hn : r < ↑↑μ (F ∩ B n)
⊢ ∃ K, K ⊆ F ∧ IsCompact K ∧ r < ↑↑μ K
[PROOFSTEP]
exact ⟨_, inter_subset_left _ _, hBc n, hn⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : Regular μ
⊢ (∃ K, IsCompact K ∧ ↑↑μ K ≠ 0) ↔ μ ≠ 0
[PROOFSTEP]
simp_rw [Ne.def, ← measure_univ_eq_zero, isOpen_univ.measure_eq_iSup_isCompact, ENNReal.iSup_eq_zero, not_forall,
  exists_prop, subset_univ, true_and_iff]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : Regular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ K, K ⊆ A ∧ IsCompact K ∧ ↑↑μ (A \ K) < ε
[PROOFSTEP]
rcases hA.exists_isCompact_lt_add h'A hε with ⟨K, hKA, hKc, hK⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : Regular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
K : Set α
hKA : K ⊆ A
hKc : IsCompact K
hK : ↑↑μ A < ↑↑μ K + ε
⊢ ∃ K, K ⊆ A ∧ IsCompact K ∧ ↑↑μ (A \ K) < ε
[PROOFSTEP]
exact ⟨K, hKA, hKc, measure_diff_lt_of_lt_add hKc.measurableSet hKA (ne_top_of_le_ne_top h'A <| measure_mono hKA) hK⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace α
μ : Measure α
inst✝⁵ : OpensMeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : T2Space β
inst✝¹ : BorelSpace β
inst✝ : Regular μ
f : α ≃ₜ β
⊢ Regular (map (↑f) μ)
[PROOFSTEP]
haveI := OuterRegular.map f μ
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace α
μ : Measure α
inst✝⁵ : OpensMeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : T2Space β
inst✝¹ : BorelSpace β
inst✝ : Regular μ
f : α ≃ₜ β
this : OuterRegular (map (↑f) μ)
⊢ Regular (map (↑f) μ)
[PROOFSTEP]
haveI := IsFiniteMeasureOnCompacts.map μ f
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace α
μ : Measure α
inst✝⁵ : OpensMeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : T2Space β
inst✝¹ : BorelSpace β
inst✝ : Regular μ
f : α ≃ₜ β
this✝ : OuterRegular (map (↑f) μ)
this : IsFiniteMeasureOnCompacts (map (↑f) μ)
⊢ Regular (map (↑f) μ)
[PROOFSTEP]
exact
  ⟨Regular.innerRegular.map f.toEquiv f.measurable.aemeasurable (fun U hU => hU.preimage f.continuous)
      (fun K hK => hK.image f.continuous) (fun K hK => hK.measurableSet) fun U hU => hU.measurableSet⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : Regular μ
x : ℝ≥0∞
hx : x ≠ ⊤
⊢ Regular (x • μ)
[PROOFSTEP]
haveI := OuterRegular.smul μ hx
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : Regular μ
x : ℝ≥0∞
hx : x ≠ ⊤
this : OuterRegular (x • μ)
⊢ Regular (x • μ)
[PROOFSTEP]
haveI := IsFiniteMeasureOnCompacts.smul μ hx
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : Regular μ
x : ℝ≥0∞
hx : x ≠ ⊤
this✝ : OuterRegular (x • μ)
this : IsFiniteMeasureOnCompacts (x • μ)
⊢ Regular (x • μ)
[PROOFSTEP]
exact ⟨Regular.innerRegular.smul x⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : OpensMeasurableSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ F, F ⊆ A ∧ IsClosed F ∧ ↑↑μ (A \ F) < ε
[PROOFSTEP]
rcases hA.exists_isClosed_lt_add h'A hε with ⟨F, hFA, hFc, hF⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : OpensMeasurableSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
F : Set α
hFA : F ⊆ A
hFc : IsClosed F
hF : ↑↑μ A < ↑↑μ F + ε
⊢ ∃ F, F ⊆ A ∧ IsClosed F ∧ ↑↑μ (A \ F) < ε
[PROOFSTEP]
exact ⟨F, hFA, hFc, measure_diff_lt_of_lt_add hFc.measurableSet hFA (ne_top_of_le_ne_top h'A <| measure_mono hFA) hF⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
⊢ WeaklyRegular (restrict μ A)
[PROOFSTEP]
haveI : Fact (μ A < ∞) := ⟨h'A.lt_top⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this : Fact (↑↑μ A < ⊤)
⊢ WeaklyRegular (restrict μ A)
[PROOFSTEP]
refine' InnerRegular.weaklyRegular_of_finite (μ.restrict A) fun V V_open => _
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
⊢ ∀ (r : ℝ≥0∞), r < ↑↑(restrict μ A) V → ∃ K, K ⊆ V ∧ IsClosed K ∧ r < ↑↑(restrict μ A) K
[PROOFSTEP]
simp only [restrict_apply' hA]
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
⊢ ∀ (r : ℝ≥0∞), r < ↑↑μ (V ∩ A) → ∃ K, K ⊆ V ∧ IsClosed K ∧ r < ↑↑μ (K ∩ A)
[PROOFSTEP]
intro r hr
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
r : ℝ≥0∞
hr : r < ↑↑μ (V ∩ A)
⊢ ∃ K, K ⊆ V ∧ IsClosed K ∧ r < ↑↑μ (K ∩ A)
[PROOFSTEP]
have : μ (V ∩ A) ≠ ∞ := ne_top_of_le_ne_top h'A (measure_mono <| inter_subset_right _ _)
[GOAL]
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this✝ : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
r : ℝ≥0∞
hr : r < ↑↑μ (V ∩ A)
this : ↑↑μ (V ∩ A) ≠ ⊤
⊢ ∃ K, K ⊆ V ∧ IsClosed K ∧ r < ↑↑μ (K ∩ A)
[PROOFSTEP]
rcases(V_open.measurableSet.inter hA).exists_lt_isClosed_of_ne_top this hr with ⟨F, hFVA, hFc, hF⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this✝ : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
r : ℝ≥0∞
hr : r < ↑↑μ (V ∩ A)
this : ↑↑μ (V ∩ A) ≠ ⊤
F : Set α
hFVA : F ⊆ V ∩ A
hFc : IsClosed F
hF : r < ↑↑μ F
⊢ ∃ K, K ⊆ V ∧ IsClosed K ∧ r < ↑↑μ (K ∩ A)
[PROOFSTEP]
refine' ⟨F, hFVA.trans (inter_subset_left _ _), hFc, _⟩
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : BorelSpace α
inst✝ : WeaklyRegular μ
A : Set α
hA : MeasurableSet A
h'A : ↑↑μ A ≠ ⊤
this✝ : Fact (↑↑μ A < ⊤)
V : Set α
V_open : IsOpen V
r : ℝ≥0∞
hr : r < ↑↑μ (V ∩ A)
this : ↑↑μ (V ∩ A) ≠ ⊤
F : Set α
hFVA : F ⊆ V ∩ A
hFc : IsClosed F
hF : r < ↑↑μ F
⊢ r < ↑↑μ (F ∩ A)
[PROOFSTEP]
rwa [inter_eq_self_of_subset_left (hFVA.trans <| inter_subset_right _ _)]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
X : Type u_3
inst✝⁴ : PseudoEMetricSpace X
inst✝³ : TopologicalSpace.SecondCountableTopology X
inst✝² : MeasurableSpace X
inst✝¹ : BorelSpace X
μ : Measure X
inst✝ : IsLocallyFiniteMeasure μ
⊢ OuterRegular μ
[PROOFSTEP]
refine' (μ.finiteSpanningSetsInOpen'.mono' fun U hU => _).outerRegular
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
X : Type u_3
inst✝⁴ : PseudoEMetricSpace X
inst✝³ : TopologicalSpace.SecondCountableTopology X
inst✝² : MeasurableSpace X
inst✝¹ : BorelSpace X
μ : Measure X
inst✝ : IsLocallyFiniteMeasure μ
U : Set X
hU : U ∈ {K | IsOpen K} ∩ {s | ↑↑μ s < ⊤}
⊢ U ∈ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
[PROOFSTEP]
have : Fact (μ U < ∞) := ⟨hU.2⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
X : Type u_3
inst✝⁴ : PseudoEMetricSpace X
inst✝³ : TopologicalSpace.SecondCountableTopology X
inst✝² : MeasurableSpace X
inst✝¹ : BorelSpace X
μ : Measure X
inst✝ : IsLocallyFiniteMeasure μ
U : Set X
hU : U ∈ {K | IsOpen K} ∩ {s | ↑↑μ s < ⊤}
this : Fact (↑↑μ U < ⊤)
⊢ U ∈ {U | IsOpen U ∧ OuterRegular (restrict μ U)}
[PROOFSTEP]
exact ⟨hU.1, inferInstance⟩
