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

tactic: by_cases X_emp : IsEmpty Ω
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: 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 : ¬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: obtain ⟨xs, xs_dense⟩ := exists_dense_seq Ω
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: 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
⊢ ∃ 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: 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
⊢ ∃ 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 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,
    (∀ (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: refine ⟨As, ?_, ?_, ?_, ?_, ?_⟩
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 ⟨fun _ ↦ ∅, fun _ ↦ MeasurableSet.empty, fun _ ↦ Bornology.isBounded_empty, ?_, ?_,
        fun _ _ _ ↦ disjoint_of_subsingleton⟩
state_before: 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)
state_after: case pos.refine_1
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ∀ (n : ℕ), diam ((fun x => ∅) n) ≤ ε

case pos.refine_2
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ⋃ n, (fun x => ∅) n = univ

tactic: intro n
state_before: case pos.refine_1
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ∀ (n : ℕ), diam ((fun x => ∅) n) ≤ ε
state_after: case pos.refine_1
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
n : ℕ
⊢ diam ((fun x => ∅) n) ≤ ε

tactic: simpa only [diam_empty] using LT.lt.le ε_pos
state_before: case pos.refine_1
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
n : ℕ
⊢ diam ((fun x => ∅) n) ≤ ε
state_after: no goals

tactic: simp only [iUnion_empty]
state_before: case pos.refine_2
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ⋃ n, (fun x => ∅) n = univ
state_after: case pos.refine_2
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ∅ = univ

tactic: apply Eq.symm
state_before: case pos.refine_2
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ ∅ = univ
state_after: case pos.refine_2.h
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ univ = ∅

tactic: simp only [univ_eq_empty_iff, X_emp]
state_before: case pos.refine_2.h
ι : Type u_1
Ω : Type u_2
inst✝³ : PseudoMetricSpace Ω
inst✝² : SeparableSpace Ω
inst✝¹ : MeasurableSpace Ω
inst✝ : OpensMeasurableSpace Ω
ε : ℝ
ε_pos : 0 < ε
X_emp : IsEmpty Ω
⊢ univ = ∅
state_after: no goals

tactic: exact MeasurableSet.disjointed (fun n ↦ measurableSet_ball)
state_before: 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)
state_after: no goals

tactic: exact fun n ↦ Bornology.IsBounded.subset isBounded_ball <| disjointed_subset Bs n
state_before: 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)
state_after: no goals

tactic: intro n
state_before: 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) ≤ ε
state_after: 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) ≤ ε

tactic: apply (diam_mono (disjointed_subset Bs n) isBounded_ball).trans
state_before: 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) ≤ ε
state_after: 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 (Bs n) ≤ ε

tactic: convert diam_ball half_ε_pos.le
state_before: 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 (Bs n) ≤ ε
state_after: case h.e'_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 : ℕ
⊢ ε = 2 * (ε / 2)

tactic: ring
state_before: case h.e'_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 : ℕ
⊢ ε = 2 * (ε / 2)
state_after: no goals

tactic: have aux : ⋃ n, Bs n = univ := by
  convert DenseRange.iUnion_uniformity_ball xs_dense <| Metric.dist_mem_uniformity half_ε_pos
  exact (ball_eq_ball' _ _).symm
state_before: 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
state_after: 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
aux : ⋃ n, Bs n = univ
⊢ ⋃ n, As n = univ

tactic: simpa only [← aux] using iUnion_disjointed
state_before: 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
aux : ⋃ n, Bs n = univ
⊢ ⋃ n, As n = univ
state_after: no goals

tactic: convert DenseRange.iUnion_uniformity_ball xs_dense <| Metric.dist_mem_uniformity half_ε_pos
state_before: ι : 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, Bs n = univ
state_after: case h.e'_2.h.e'_3.h
ι : 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
x✝ : ℕ
⊢ Bs x✝ = UniformSpace.ball (xs x✝) {p | dist p.1 p.2 < ε / 2}

tactic: exact (ball_eq_ball' _ _).symm
state_before: case h.e'_2.h.e'_3.h
ι : 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
x✝ : ℕ
⊢ Bs x✝ = UniformSpace.ball (xs x✝) {p | dist p.1 p.2 < ε / 2}
state_after: no goals

tactic: exact disjoint_disjointed Bs
state_before: 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)
state_after: no goals