Theorem: MeasureTheory.SeparableSpace.exists_measurable_partition_diam_le
File: Mathlib/MeasureTheory/Measure/LevyProkhorovMetric.lean

Proof steps:
state_before: ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case pos
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)

case neg
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : ¬IsEmpty Ω
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: by_cases X_emp : IsEmpty Ω
state_before: case neg
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : ¬IsEmpty Ω
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: rw [not_isEmpty_iff] at X_emp
state_before: case neg
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: obtain ⟨xs, xs_dense⟩ := exists_dense_seq Ω
state_before: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: have half_ε_pos : 0 < ε / 2 := half_pos ε_pos
state_before: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: set Bs := fun n ↦ Metric.ball (xs n) (ε/2)
state_before: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
tactic: set As := disjointed Bs
state_before: case neg.intro
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ∃ As,
    (∀ (n : ℕ), MeasurableSet (As n)) ∧
      (∀ (n : ℕ), Bornology.IsBounded (As n)) ∧
        (∀ (n : ℕ), diam (As n) ≤ ε) ∧ ⋃ n, As n = univ ∧ Pairwise fun n m => Disjoint (As n) (As m)
state_after: case neg.intro.refine_1
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ∀ (n : ℕ), MeasurableSet (As n)

case neg.intro.refine_2
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ∀ (n : ℕ), Bornology.IsBounded (As n)

case neg.intro.refine_3
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ∀ (n : ℕ), diam (As n) ≤ ε

case neg.intro.refine_4
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ ⋃ n, As n = univ

case neg.intro.refine_5
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : Nonempty Ω
xs : ℕ → Ω
xs_dense : DenseRange xs
half_ε_pos : 0 < ε / 2
Bs : ℕ → Set Ω := fun n => ball (xs n) (ε / 2)
As : ℕ → Set Ω := disjointed Bs
⊢ Pairwise fun n m => Disjoint (As n) (As m)
tactic: refine ⟨As, ?_, ?_, ?_, ?_, ?_⟩