Theorem: MeasureTheory.exists_null_frontier_thickening
File: Mathlib/MeasureTheory/Measure/Portmanteau.lean

tactic: have mbles : ∀ r : ℝ, MeasurableSet (frontier (Metric.thickening r s)) :=
  fun r => isClosed_frontier.measurableSet
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: have disjs := Metric.frontier_thickening_disjoint s
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: have key := @Measure.countable_meas_pos_of_disjoint_iUnion Ω _ _ μ _ _ mbles disjs
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: have aux := @measure_diff_null ℝ _ volume (Ioo a b) _ (Set.Countable.measure_zero key volume)
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: have len_pos : 0 < ENNReal.ofReal (b - a) := by simp only [hab, ENNReal.ofReal_pos, sub_pos]
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: rw [← Real.volume_Ioo, ← aux] at len_pos
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
len_pos : 0 < ENNReal.ofReal (b - a)
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: rcases nonempty_of_measure_ne_zero len_pos.ne.symm with ⟨r, ⟨r_in_Ioo, hr⟩⟩
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
len_pos : 0 < ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: refine' ⟨r, r_in_Ioo, _⟩
state_before: case intro.intro
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
len_pos : 0 < ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})
r : ℝ
r_in_Ioo : r ∈ Ioo a b
hr : ¬r ∈ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: simpa only [mem_setOf_eq, not_lt, le_zero_iff] using hr
state_before: case intro.intro
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
len_pos : 0 < ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})
r : ℝ
r_in_Ioo : r ∈ Ioo a b
hr : ¬r ∈ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
⊢ ↑↑μ (frontier (Metric.thickening r s)) = 0

tactic: simp only [hab, ENNReal.ofReal_pos, sub_pos]
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
a b : ℝ
hab : a < b
mbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))
disjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))
key : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}
aux : ↑↑volume (Ioo a b \ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)
⊢ 0 < ENNReal.ofReal (b - a)