[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
x : α
U : Set α
h_acc : AccPt x (𝓟 C)
hU : U ∈ 𝓝 x
⊢ AccPt x (𝓟 (U ∩ C))
[PROOFSTEP]
have : 𝓝[≠] x ≤ 𝓟 U := by
  rw [le_principal_iff]
  exact mem_nhdsWithin_of_mem_nhds hU
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
x : α
U : Set α
h_acc : AccPt x (𝓟 C)
hU : U ∈ 𝓝 x
⊢ 𝓝[{x}ᶜ] x ≤ 𝓟 U
[PROOFSTEP]
rw [le_principal_iff]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
x : α
U : Set α
h_acc : AccPt x (𝓟 C)
hU : U ∈ 𝓝 x
⊢ U ∈ 𝓝[{x}ᶜ] x
[PROOFSTEP]
exact mem_nhdsWithin_of_mem_nhds hU
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
x : α
U : Set α
h_acc : AccPt x (𝓟 C)
hU : U ∈ 𝓝 x
this : 𝓝[{x}ᶜ] x ≤ 𝓟 U
⊢ AccPt x (𝓟 (U ∩ C))
[PROOFSTEP]
rw [AccPt, ← inf_principal, ← inf_assoc, inf_of_le_left this]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
x : α
U : Set α
h_acc : AccPt x (𝓟 C)
hU : U ∈ 𝓝 x
this : 𝓝[{x}ᶜ] x ≤ 𝓟 U
⊢ NeBot (𝓝[{x}ᶜ] x ⊓ 𝓟 C)
[PROOFSTEP]
exact h_acc
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
⊢ Preperfect C ↔ ∀ (x : α), x ∈ C → ∀ (U : Set α), U ∈ 𝓝 x → ∃ y, y ∈ U ∩ C ∧ y ≠ x
[PROOFSTEP]
simp only [Preperfect, accPt_iff_nhds]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Preperfect C
hU : IsOpen U
⊢ Preperfect (U ∩ C)
[PROOFSTEP]
rintro x ⟨xU, xC⟩
[GOAL]
case intro
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Preperfect C
hU : IsOpen U
x : α
xU : x ∈ U
xC : x ∈ C
⊢ AccPt x (𝓟 (U ∩ C))
[PROOFSTEP]
apply (hC _ xC).nhds_inter
[GOAL]
case intro
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Preperfect C
hU : IsOpen U
x : α
xU : x ∈ U
xC : x ∈ C
⊢ U ∈ 𝓝 x
[PROOFSTEP]
exact hU.mem_nhds xU
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ Perfect (closure C)
[PROOFSTEP]
constructor
[GOAL]
case closed
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ IsClosed (closure C)
[PROOFSTEP]
exact isClosed_closure
[GOAL]
case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ Preperfect (closure C)
[PROOFSTEP]
intro x hx
[GOAL]
case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
⊢ AccPt x (𝓟 (closure C))
[PROOFSTEP]
by_cases h : x ∈ C
[GOAL]
case pos
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∈ C
⊢ AccPt x (𝓟 (closure C))
[PROOFSTEP]
apply AccPt.mono _ (principal_mono.mpr subset_closure)
[GOAL]
case neg
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : ¬x ∈ C
⊢ AccPt x (𝓟 (closure C))
[PROOFSTEP]
apply AccPt.mono _ (principal_mono.mpr subset_closure)
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∈ C
⊢ AccPt x (𝓟 C)
[PROOFSTEP]
exact hC _ h
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : ¬x ∈ C
⊢ AccPt x (𝓟 C)
[PROOFSTEP]
have : { x }ᶜ ∩ C = C := by simp [h]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : ¬x ∈ C
⊢ {x}ᶜ ∩ C = C
[PROOFSTEP]
simp [h]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : ¬x ∈ C
this : {x}ᶜ ∩ C = C
⊢ AccPt x (𝓟 C)
[PROOFSTEP]
rw [AccPt, nhdsWithin, inf_assoc, inf_principal, this]
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : ¬x ∈ C
this : {x}ᶜ ∩ C = C
⊢ NeBot (𝓝 x ⊓ 𝓟 C)
[PROOFSTEP]
rw [closure_eq_cluster_pts] at hx 
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ {a | ClusterPt a (𝓟 C)}
h : ¬x ∈ C
this : {x}ᶜ ∩ C = C
⊢ NeBot (𝓝 x ⊓ 𝓟 C)
[PROOFSTEP]
exact hx
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
⊢ Preperfect C ↔ Perfect (closure C)
[PROOFSTEP]
constructor
[GOAL]
case mp
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
⊢ Preperfect C → Perfect (closure C)
[PROOFSTEP]
intro h
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
⊢ Perfect (closure C) → Preperfect C
[PROOFSTEP]
intro h
[GOAL]
case mp
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Preperfect C
⊢ Perfect (closure C)
[PROOFSTEP]
exact h.perfect_closure
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
⊢ Preperfect C
[PROOFSTEP]
intro x xC
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
⊢ AccPt x (𝓟 C)
[PROOFSTEP]
have H : AccPt x (𝓟 (closure C)) := h.acc _ (subset_closure xC)
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : AccPt x (𝓟 (closure C))
⊢ AccPt x (𝓟 C)
[PROOFSTEP]
rw [accPt_iff_frequently] at *
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
⊢ ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ C
[PROOFSTEP]
have : ∀ y, y ≠ x ∧ y ∈ closure C → ∃ᶠ z in 𝓝 y, z ≠ x ∧ z ∈ C :=
  by
  rintro y ⟨hyx, yC⟩
  simp only [← mem_compl_singleton_iff, and_comm, ← frequently_nhdsWithin_iff, hyx.nhdsWithin_compl_singleton, ←
    mem_closure_iff_frequently]
  exact yC
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
⊢ ∀ (y : α), y ≠ x ∧ y ∈ closure C → ∃ᶠ (z : α) in 𝓝 y, z ≠ x ∧ z ∈ C
[PROOFSTEP]
rintro y ⟨hyx, yC⟩
[GOAL]
case intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
y : α
hyx : y ≠ x
yC : y ∈ closure C
⊢ ∃ᶠ (z : α) in 𝓝 y, z ≠ x ∧ z ∈ C
[PROOFSTEP]
simp only [← mem_compl_singleton_iff, and_comm, ← frequently_nhdsWithin_iff, hyx.nhdsWithin_compl_singleton, ←
  mem_closure_iff_frequently]
[GOAL]
case intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
y : α
hyx : y ≠ x
yC : y ∈ closure C
⊢ y ∈ closure C
[PROOFSTEP]
exact yC
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
this : ∀ (y : α), y ≠ x ∧ y ∈ closure C → ∃ᶠ (z : α) in 𝓝 y, z ≠ x ∧ z ∈ C
⊢ ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ C
[PROOFSTEP]
rw [← frequently_frequently_nhds]
[GOAL]
case mpr
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T1Space α
h : Perfect (closure C)
x : α
xC : x ∈ C
H : ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ closure C
this : ∀ (y : α), y ≠ x ∧ y ∈ closure C → ∃ᶠ (z : α) in 𝓝 y, z ≠ x ∧ z ∈ C
⊢ ∃ᶠ (y : α) in 𝓝 x, ∃ᶠ (x_1 : α) in 𝓝 y, x_1 ≠ x ∧ x_1 ∈ C
[PROOFSTEP]
exact H.mono this
[GOAL]
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Perfect C
x : α
xC : x ∈ C
xU : x ∈ U
Uop : IsOpen U
⊢ Perfect (closure (U ∩ C)) ∧ Set.Nonempty (closure (U ∩ C))
[PROOFSTEP]
constructor
[GOAL]
case left
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Perfect C
x : α
xC : x ∈ C
xU : x ∈ U
Uop : IsOpen U
⊢ Perfect (closure (U ∩ C))
[PROOFSTEP]
apply Preperfect.perfect_closure
[GOAL]
case left.hC
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Perfect C
x : α
xC : x ∈ C
xU : x ∈ U
Uop : IsOpen U
⊢ Preperfect (U ∩ C)
[PROOFSTEP]
exact hC.acc.open_inter Uop
[GOAL]
case right
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Perfect C
x : α
xC : x ∈ C
xU : x ∈ U
Uop : IsOpen U
⊢ Set.Nonempty (closure (U ∩ C))
[PROOFSTEP]
apply Nonempty.closure
[GOAL]
case right.a
α : Type u_1
inst✝ : TopologicalSpace α
C U : Set α
hC : Perfect C
x : α
xC : x ∈ C
xU : x ∈ U
Uop : IsOpen U
⊢ Set.Nonempty (U ∩ C)
[PROOFSTEP]
exact ⟨x, ⟨xU, xC⟩⟩
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
hnonempty : Set.Nonempty C
⊢ ∃ C₀ C₁, (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁
[PROOFSTEP]
cases' hnonempty with y yC
[GOAL]
case intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
⊢ ∃ C₀ C₁, (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁
[PROOFSTEP]
obtain ⟨x, xC, hxy⟩ : ∃ x ∈ C, x ≠ y := by
  have := hC.acc _ yC
  rw [accPt_iff_nhds] at this 
  rcases this univ univ_mem with ⟨x, xC, hxy⟩
  exact ⟨x, xC.2, hxy⟩
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
⊢ ∃ x, x ∈ C ∧ x ≠ y
[PROOFSTEP]
have := hC.acc _ yC
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
this : AccPt y (𝓟 C)
⊢ ∃ x, x ∈ C ∧ x ≠ y
[PROOFSTEP]
rw [accPt_iff_nhds] at this 
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
this : ∀ (U : Set α), U ∈ 𝓝 y → ∃ y_1, y_1 ∈ U ∩ C ∧ y_1 ≠ y
⊢ ∃ x, x ∈ C ∧ x ≠ y
[PROOFSTEP]
rcases this univ univ_mem with ⟨x, xC, hxy⟩
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
this : ∀ (U : Set α), U ∈ 𝓝 y → ∃ y_1, y_1 ∈ U ∩ C ∧ y_1 ≠ y
x : α
xC : x ∈ univ ∩ C
hxy : x ≠ y
⊢ ∃ x, x ∈ C ∧ x ≠ y
[PROOFSTEP]
exact ⟨x, xC.2, hxy⟩
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
⊢ ∃ C₀ C₁, (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁
[PROOFSTEP]
obtain ⟨U, xU, Uop, V, yV, Vop, hUV⟩ := exists_open_nhds_disjoint_closure hxy
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ ∃ C₀ C₁, (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁
[PROOFSTEP]
use closure (U ∩ C), closure (V ∩ C)
[GOAL]
case h
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ (Perfect (closure (U ∩ C)) ∧ Set.Nonempty (closure (U ∩ C)) ∧ closure (U ∩ C) ⊆ C) ∧
    (Perfect (closure (V ∩ C)) ∧ Set.Nonempty (closure (V ∩ C)) ∧ closure (V ∩ C) ⊆ C) ∧
      Disjoint (closure (U ∩ C)) (closure (V ∩ C))
[PROOFSTEP]
constructor
[GOAL]
case h.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ Perfect (closure (U ∩ C)) ∧ Set.Nonempty (closure (U ∩ C)) ∧ closure (U ∩ C) ⊆ C
[PROOFSTEP]
rw [← and_assoc]
[GOAL]
case h.right
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ (Perfect (closure (V ∩ C)) ∧ Set.Nonempty (closure (V ∩ C)) ∧ closure (V ∩ C) ⊆ C) ∧
    Disjoint (closure (U ∩ C)) (closure (V ∩ C))
[PROOFSTEP]
rw [← and_assoc]
[GOAL]
case h.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ (Perfect (closure (U ∩ C)) ∧ Set.Nonempty (closure (U ∩ C))) ∧ closure (U ∩ C) ⊆ C
[PROOFSTEP]
refine' ⟨hC.closure_nhds_inter x xC xU Uop, _⟩
[GOAL]
case h.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ closure (U ∩ C) ⊆ C
[PROOFSTEP]
rw [hC.closed.closure_subset_iff]
[GOAL]
case h.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ U ∩ C ⊆ C
[PROOFSTEP]
exact inter_subset_right _ _
[GOAL]
case h.right
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ ((Perfect (closure (V ∩ C)) ∧ Set.Nonempty (closure (V ∩ C))) ∧ closure (V ∩ C) ⊆ C) ∧
    Disjoint (closure (U ∩ C)) (closure (V ∩ C))
[PROOFSTEP]
constructor
[GOAL]
case h.right.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ (Perfect (closure (V ∩ C)) ∧ Set.Nonempty (closure (V ∩ C))) ∧ closure (V ∩ C) ⊆ C
[PROOFSTEP]
refine' ⟨hC.closure_nhds_inter y yC yV Vop, _⟩
[GOAL]
case h.right.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ closure (V ∩ C) ⊆ C
[PROOFSTEP]
rw [hC.closed.closure_subset_iff]
[GOAL]
case h.right.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ V ∩ C ⊆ C
[PROOFSTEP]
exact inter_subset_right _ _
[GOAL]
case h.right.right
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ Disjoint (closure (U ∩ C)) (closure (V ∩ C))
[PROOFSTEP]
apply Disjoint.mono _ _ hUV
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ closure (U ∩ C) ≤ closure U
[PROOFSTEP]
apply closure_mono
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ closure (V ∩ C) ≤ closure V
[PROOFSTEP]
apply closure_mono
[GOAL]
case h
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ U ∩ C ⊆ U
[PROOFSTEP]
exact inter_subset_left _ _
[GOAL]
case h
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : T25Space α
hC : Perfect C
y : α
yC : y ∈ C
x : α
xC : x ∈ C
hxy : x ≠ y
U : Set α
xU : x ∈ U
Uop : IsOpen U
V : Set α
yV : y ∈ V
Vop : IsOpen V
hUV : Disjoint (closure U) (closure V)
⊢ V ∩ C ⊆ V
[PROOFSTEP]
exact inter_subset_left _ _
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
obtain ⟨b, bct, _, bbasis⟩ := TopologicalSpace.exists_countable_basis α
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
let v := {U ∈ b | (U ∩ C).Countable}
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
let V := ⋃ U ∈ v, U
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
let D := C \ V
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
have Vct : (V ∩ C).Countable := by
  simp only [iUnion_inter, mem_sep_iff]
  apply Countable.biUnion
  · exact Countable.mono (inter_subset_left _ _) bct
  · exact inter_subset_right _ _
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
⊢ Set.Countable (V ∩ C)
[PROOFSTEP]
simp only [iUnion_inter, mem_sep_iff]
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
⊢ Set.Countable (⋃ (i : Set α) (_ : i ∈ b ∧ Set.Countable (i ∩ C)), i ∩ C)
[PROOFSTEP]
apply Countable.biUnion
[GOAL]
case hs
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
⊢ Set.Countable fun a => a ∈ b ∧ Set.Countable (a ∩ C)
[PROOFSTEP]
exact Countable.mono (inter_subset_left _ _) bct
[GOAL]
case a
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
⊢ ∀ (a : Set α), (a ∈ fun a => a ∈ b ∧ Set.Countable (a ∩ C)) → Set.Countable (a ∩ C)
[PROOFSTEP]
exact inter_subset_right _ _
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
⊢ ∃ V D, Set.Countable V ∧ Perfect D ∧ C = V ∪ D
[PROOFSTEP]
refine' ⟨V ∩ C, D, Vct, ⟨_, _⟩, _⟩
[GOAL]
case intro.intro.intro.refine'_1
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
⊢ IsClosed D
[PROOFSTEP]
refine' hclosed.sdiff (isOpen_biUnion fun _ ↦ _)
[GOAL]
case intro.intro.intro.refine'_1
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x✝ : Set α
⊢ x✝ ∈ v → IsOpen x✝
[PROOFSTEP]
exact fun ⟨Ub, _⟩ ↦ IsTopologicalBasis.isOpen bbasis Ub
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
⊢ Preperfect D
[PROOFSTEP]
rw [preperfect_iff_nhds]
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
⊢ ∀ (x : α), x ∈ D → ∀ (U : Set α), U ∈ 𝓝 x → ∃ y, y ∈ U ∩ D ∧ y ≠ x
[PROOFSTEP]
intro x xD E xE
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
⊢ ∃ y, y ∈ E ∩ D ∧ y ≠ x
[PROOFSTEP]
have : ¬(E ∩ D).Countable := by
  intro h
  obtain ⟨U, hUb, xU, hU⟩ : ∃ U ∈ b, x ∈ U ∧ U ⊆ E := (IsTopologicalBasis.mem_nhds_iff bbasis).mp xE
  have hU_cnt : (U ∩ C).Countable := by
    apply @Countable.mono _ _ (E ∩ D ∪ V ∩ C)
    · rintro y ⟨yU, yC⟩
      by_cases h : y ∈ V
      · exact mem_union_right _ (mem_inter h yC)
      · exact mem_union_left _ (mem_inter (hU yU) ⟨yC, h⟩)
    exact Countable.union h Vct
  have : U ∈ v := ⟨hUb, hU_cnt⟩
  apply xD.2
  exact mem_biUnion this xU
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
⊢ ¬Set.Countable (E ∩ D)
[PROOFSTEP]
intro h
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
⊢ False
[PROOFSTEP]
obtain ⟨U, hUb, xU, hU⟩ : ∃ U ∈ b, x ∈ U ∧ U ⊆ E := (IsTopologicalBasis.mem_nhds_iff bbasis).mp xE
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
⊢ False
[PROOFSTEP]
have hU_cnt : (U ∩ C).Countable := by
  apply @Countable.mono _ _ (E ∩ D ∪ V ∩ C)
  · rintro y ⟨yU, yC⟩
    by_cases h : y ∈ V
    · exact mem_union_right _ (mem_inter h yC)
    · exact mem_union_left _ (mem_inter (hU yU) ⟨yC, h⟩)
  exact Countable.union h Vct
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
⊢ Set.Countable (U ∩ C)
[PROOFSTEP]
apply @Countable.mono _ _ (E ∩ D ∪ V ∩ C)
[GOAL]
case h
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
⊢ U ∩ C ⊆ E ∩ D ∪ V ∩ C
[PROOFSTEP]
rintro y ⟨yU, yC⟩
[GOAL]
case h.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
y : α
yU : y ∈ U
yC : y ∈ C
⊢ y ∈ E ∩ D ∪ V ∩ C
[PROOFSTEP]
by_cases h : y ∈ V
[GOAL]
case pos
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h✝ : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
y : α
yU : y ∈ U
yC : y ∈ C
h : y ∈ V
⊢ y ∈ E ∩ D ∪ V ∩ C
[PROOFSTEP]
exact mem_union_right _ (mem_inter h yC)
[GOAL]
case neg
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h✝ : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
y : α
yU : y ∈ U
yC : y ∈ C
h : ¬y ∈ V
⊢ y ∈ E ∩ D ∪ V ∩ C
[PROOFSTEP]
exact mem_union_left _ (mem_inter (hU yU) ⟨yC, h⟩)
[GOAL]
case a
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
⊢ Set.Countable (E ∩ D ∪ V ∩ C)
[PROOFSTEP]
exact Countable.union h Vct
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
hU_cnt : Set.Countable (U ∩ C)
⊢ False
[PROOFSTEP]
have : U ∈ v := ⟨hUb, hU_cnt⟩
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
hU_cnt : Set.Countable (U ∩ C)
this : U ∈ v
⊢ False
[PROOFSTEP]
apply xD.2
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
h : Set.Countable (E ∩ D)
U : Set α
hUb : U ∈ b
xU : x ∈ U
hU : U ⊆ E
hU_cnt : Set.Countable (U ∩ C)
this : U ∈ v
⊢ x ∈ V
[PROOFSTEP]
exact mem_biUnion this xU
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
this : ¬Set.Countable (E ∩ D)
⊢ ∃ y, y ∈ E ∩ D ∧ y ≠ x
[PROOFSTEP]
by_contra' h
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
x : α
xD : x ∈ D
E : Set α
xE : E ∈ 𝓝 x
this : ¬Set.Countable (E ∩ D)
h : ∀ (y : α), y ∈ E ∩ (C \ V) → y = x
⊢ False
[PROOFSTEP]
exact absurd (Countable.mono h (Set.countable_singleton _)) this
[GOAL]
case intro.intro.intro.refine'_3
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
b : Set (Set α)
bct : Set.Countable b
left✝ : ¬∅ ∈ b
bbasis : IsTopologicalBasis b
v : Set (Set α) := {U | U ∈ b ∧ Set.Countable (U ∩ C)}
V : Set α := ⋃ (U : Set α) (_ : U ∈ v), U
D : Set α := C \ V
Vct : Set.Countable (V ∩ C)
⊢ C = V ∩ C ∪ D
[PROOFSTEP]
rw [inter_comm, inter_union_diff]
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
⊢ ∃ D, Perfect D ∧ Set.Nonempty D ∧ D ⊆ C
[PROOFSTEP]
rcases exists_countable_union_perfect_of_isClosed hclosed with ⟨V, D, Vct, Dperf, VD⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ ∃ D, Perfect D ∧ Set.Nonempty D ∧ D ⊆ C
[PROOFSTEP]
refine' ⟨D, ⟨Dperf, _⟩⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ Set.Nonempty D ∧ D ⊆ C
[PROOFSTEP]
constructor
[GOAL]
case intro.intro.intro.intro.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ Set.Nonempty D
[PROOFSTEP]
rw [nonempty_iff_ne_empty]
[GOAL]
case intro.intro.intro.intro.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ D ≠ ∅
[PROOFSTEP]
by_contra h
[GOAL]
case intro.intro.intro.intro.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
h : D = ∅
⊢ False
[PROOFSTEP]
rw [h, union_empty] at VD 
[GOAL]
case intro.intro.intro.intro.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V
h : D = ∅
⊢ False
[PROOFSTEP]
rw [VD] at hunc 
[GOAL]
case intro.intro.intro.intro.left
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
V : Set α
hunc : ¬Set.Countable V
D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V
h : D = ∅
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.intro.intro.right
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ D ⊆ C
[PROOFSTEP]
rw [VD]
[GOAL]
case intro.intro.intro.intro.right
α : Type u_1
inst✝¹ : TopologicalSpace α
C : Set α
inst✝ : SecondCountableTopology α
hclosed : IsClosed C
hunc : ¬Set.Countable C
V D : Set α
Vct : Set.Countable V
Dperf : Perfect D
VD : C = V ∪ D
⊢ D ⊆ V ∪ D
[PROOFSTEP]
exact subset_union_right _ _
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
[PROOFSTEP]
have : x ∈ EMetric.ball x (ε / 2) := by
  apply EMetric.mem_ball_self
  rw [ENNReal.div_pos_iff]
  exact ⟨ne_of_gt ε_pos, by norm_num⟩
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ x ∈ EMetric.ball x (ε / 2)
[PROOFSTEP]
apply EMetric.mem_ball_self
[GOAL]
case h
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ 0 < ε / 2
[PROOFSTEP]
rw [ENNReal.div_pos_iff]
[GOAL]
case h
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ ε ≠ 0 ∧ 2 ≠ ⊤
[PROOFSTEP]
exact ⟨ne_of_gt ε_pos, by norm_num⟩
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ 2 ≠ ⊤
[PROOFSTEP]
norm_num
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this : x ∈ EMetric.ball x (ε / 2)
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
[PROOFSTEP]
have := hC.closure_nhds_inter x xC this EMetric.isOpen_ball
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
[PROOFSTEP]
refine' ⟨this.1, this.2, _, _⟩
[GOAL]
case refine'_1
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ closure (EMetric.ball x (ε / 2) ∩ C) ⊆ C
[PROOFSTEP]
rw [IsClosed.closure_subset_iff hC.closed]
[GOAL]
case refine'_1
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.ball x (ε / 2) ∩ C ⊆ C
[PROOFSTEP]
apply inter_subset_right
[GOAL]
case refine'_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (closure (EMetric.ball x (ε / 2) ∩ C)) ≤ ε
[PROOFSTEP]
rw [EMetric.diam_closure]
[GOAL]
case refine'_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (EMetric.ball x (ε / 2) ∩ C) ≤ ε
[PROOFSTEP]
apply le_trans (EMetric.diam_mono (inter_subset_left _ _))
[GOAL]
case refine'_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (EMetric.ball x (ε / 2)) ≤ ε
[PROOFSTEP]
convert EMetric.diam_ball (x := x)
[GOAL]
case h.e'_4
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ ε = 2 * (ε / 2)
[PROOFSTEP]
rw [mul_comm, ENNReal.div_mul_cancel]
[GOAL]
case h.e'_4.h0
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ 2 ≠ 0
[PROOFSTEP]
norm_num
[GOAL]
case h.e'_4.hI
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ 2 ≠ ⊤
[PROOFSTEP]
norm_num
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
rcases hC.splitting hnonempty with ⟨D₀, D₁, ⟨perf0, non0, sub0⟩, ⟨perf1, non1, sub1⟩, hdisj⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
non0 : Set.Nonempty D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
non1 : Set.Nonempty D₁
sub1 : D₁ ⊆ C
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
cases' non0 with x₀ hx₀
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
non1 : Set.Nonempty D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
cases' non1 with x₁ hx₁
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
rcases perf0.small_diam_aux ε_pos hx₀ with ⟨perf0', non0', sub0', diam0⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
perf0' : Perfect (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
non0' : Set.Nonempty (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
sub0' : closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ⊆ D₀
diam0 : EMetric.diam (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) ≤ ε
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
rcases perf1.small_diam_aux ε_pos hx₁ with ⟨perf1', non1', sub1', diam1⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
perf0' : Perfect (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
non0' : Set.Nonempty (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
sub0' : closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ⊆ D₀
diam0 : EMetric.diam (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) ≤ ε
perf1' : Perfect (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
non1' : Set.Nonempty (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
sub1' : closure (EMetric.ball x₁ (ε / 2) ∩ D₁) ⊆ D₁
diam1 : EMetric.diam (closure (EMetric.ball x₁ (ε / 2) ∩ D₁)) ≤ ε
⊢ ∃ C₀ C₁,
    (Perfect C₀ ∧ Set.Nonempty C₀ ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
      (Perfect C₁ ∧ Set.Nonempty C₁ ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁
[PROOFSTEP]
refine'
  ⟨closure (EMetric.ball x₀ (ε / 2) ∩ D₀), closure (EMetric.ball x₁ (ε / 2) ∩ D₁),
    ⟨perf0', non0', sub0'.trans sub0, diam0⟩, ⟨perf1', non1', sub1'.trans sub1, diam1⟩, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
perf0' : Perfect (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
non0' : Set.Nonempty (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
sub0' : closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ⊆ D₀
diam0 : EMetric.diam (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) ≤ ε
perf1' : Perfect (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
non1' : Set.Nonempty (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
sub1' : closure (EMetric.ball x₁ (ε / 2) ∩ D₁) ⊆ D₁
diam1 : EMetric.diam (closure (EMetric.ball x₁ (ε / 2) ∩ D₁)) ≤ ε
⊢ Disjoint (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
[PROOFSTEP]
apply Disjoint.mono _ _ hdisj
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
perf0' : Perfect (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
non0' : Set.Nonempty (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
sub0' : closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ⊆ D₀
diam0 : EMetric.diam (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) ≤ ε
perf1' : Perfect (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
non1' : Set.Nonempty (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
sub1' : closure (EMetric.ball x₁ (ε / 2) ∩ D₁) ⊆ D₁
diam1 : EMetric.diam (closure (EMetric.ball x₁ (ε / 2) ∩ D₁)) ≤ ε
⊢ closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ≤ D₀
[PROOFSTEP]
assumption
[GOAL]
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
ε_pos : 0 < ε
D₀ D₁ : Set α
perf0 : Perfect D₀
sub0 : D₀ ⊆ C
hdisj : Disjoint D₀ D₁
perf1 : Perfect D₁
sub1 : D₁ ⊆ C
x₀ : α
hx₀ : x₀ ∈ D₀
x₁ : α
hx₁ : x₁ ∈ D₁
perf0' : Perfect (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
non0' : Set.Nonempty (closure (EMetric.ball x₀ (ε / 2) ∩ D₀))
sub0' : closure (EMetric.ball x₀ (ε / 2) ∩ D₀) ⊆ D₀
diam0 : EMetric.diam (closure (EMetric.ball x₀ (ε / 2) ∩ D₀)) ≤ ε
perf1' : Perfect (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
non1' : Set.Nonempty (closure (EMetric.ball x₁ (ε / 2) ∩ D₁))
sub1' : closure (EMetric.ball x₁ (ε / 2) ∩ D₁) ⊆ D₁
diam1 : EMetric.diam (closure (EMetric.ball x₁ (ε / 2) ∩ D₁)) ≤ ε
⊢ closure (EMetric.ball x₁ (ε / 2) ∩ D₁) ≤ D₁
[PROOFSTEP]
assumption
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
obtain ⟨u, -, upos', hu⟩ := exists_seq_strictAnti_tendsto' (zero_lt_one' ℝ≥0∞)
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
have upos := fun n => (upos' n).1
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
let P := Subtype fun E : Set α => Perfect E ∧ E.Nonempty
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
choose C0 C1 h0 h1 hdisj using fun {C : Set α} (hC : Perfect C) (hnonempty : C.Nonempty) {ε : ℝ≥0∞} (hε : 0 < ε) =>
  hC.small_diam_splitting hnonempty hε
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
let DP : List Bool → P := fun l => by
  induction' l with a l ih; · exact ⟨C, ⟨hC, hnonempty⟩⟩
  cases a
  · use C0 ih.property.1 ih.property.2 (upos l.length.succ)
    exact ⟨(h0 _ _ _).1, (h0 _ _ _).2.1⟩
  use C1 ih.property.1 ih.property.2 (upos l.length.succ)
  exact ⟨(h1 _ _ _).1, (h1 _ _ _).2.1⟩
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
l : List Bool
⊢ P
[PROOFSTEP]
induction' l with a l ih
[GOAL]
case nil
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
⊢ P
[PROOFSTEP]
exact ⟨C, ⟨hC, hnonempty⟩⟩
[GOAL]
case cons
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
a : Bool
l : List Bool
ih : P
⊢ P
[PROOFSTEP]
cases a
[GOAL]
case cons.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
l : List Bool
ih : P
⊢ P
[PROOFSTEP]
use C0 ih.property.1 ih.property.2 (upos l.length.succ)
[GOAL]
case property
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
l : List Bool
ih : P
⊢ Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
    Set.Nonempty (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))
[PROOFSTEP]
exact ⟨(h0 _ _ _).1, (h0 _ _ _).2.1⟩
[GOAL]
case cons.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
l : List Bool
ih : P
⊢ P
[PROOFSTEP]
use C1 ih.property.1 ih.property.2 (upos l.length.succ)
[GOAL]
case property
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
l : List Bool
ih : P
⊢ Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
    Set.Nonempty (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))
[PROOFSTEP]
exact ⟨(h1 _ _ _).1, (h1 _ _ _).2.1⟩
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
let D : List Bool → Set α := fun l => (DP l).val
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
have hanti : ClosureAntitone D :=
  by
  refine' Antitone.closureAntitone _ fun l => (DP l).property.1.closed
  intro l a
  cases a
  · exact (h0 _ _ _).2.2.1
  exact (h1 _ _ _).2.2.1
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
⊢ ClosureAntitone D
[PROOFSTEP]
refine' Antitone.closureAntitone _ fun l => (DP l).property.1.closed
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
⊢ CantorScheme.Antitone D
[PROOFSTEP]
intro l a
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
l : List Bool
a : Bool
⊢ D (a :: l) ⊆ D l
[PROOFSTEP]
cases a
[GOAL]
case false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
l : List Bool
⊢ D (false :: l) ⊆ D l
[PROOFSTEP]
exact (h0 _ _ _).2.2.1
[GOAL]
case true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
l : List Bool
⊢ D (true :: l) ⊆ D l
[PROOFSTEP]
exact (h1 _ _ _).2.2.1
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
have hdiam : VanishingDiam D := by
  intro x
  apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hu
  · simp
  rw [eventually_atTop]
  refine' ⟨1, fun m (hm : 1 ≤ m) => _⟩
  rw [Nat.one_le_iff_ne_zero] at hm 
  rcases Nat.exists_eq_succ_of_ne_zero hm with ⟨n, rfl⟩
  dsimp
  cases x n
  · convert (h0 _ _ _).2.2.2
    rw [PiNat.res_length]
  convert (h1 _ _ _).2.2.2
  rw [PiNat.res_length]
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
⊢ VanishingDiam D
[PROOFSTEP]
intro x
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
⊢ Tendsto (fun n => EMetric.diam (D (PiNat.res x n))) atTop (𝓝 0)
[PROOFSTEP]
apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hu
[GOAL]
case hgf
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
⊢ ∀ᶠ (b : ℕ) in atTop, 0 ≤ EMetric.diam (D (PiNat.res x b))
[PROOFSTEP]
simp
[GOAL]
case hfh
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
⊢ ∀ᶠ (b : ℕ) in atTop, EMetric.diam (D (PiNat.res x b)) ≤ u b
[PROOFSTEP]
rw [eventually_atTop]
[GOAL]
case hfh
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
⊢ ∃ a, ∀ (b : ℕ), b ≥ a → EMetric.diam (D (PiNat.res x b)) ≤ u b
[PROOFSTEP]
refine' ⟨1, fun m (hm : 1 ≤ m) => _⟩
[GOAL]
case hfh
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
m : ℕ
hm : 1 ≤ m
⊢ EMetric.diam (D (PiNat.res x m)) ≤ u m
[PROOFSTEP]
rw [Nat.one_le_iff_ne_zero] at hm 
[GOAL]
case hfh
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
m : ℕ
hm : m ≠ 0
⊢ EMetric.diam (D (PiNat.res x m)) ≤ u m
[PROOFSTEP]
rcases Nat.exists_eq_succ_of_ne_zero hm with ⟨n, rfl⟩
[GOAL]
case hfh.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ EMetric.diam (D (PiNat.res x (Nat.succ n))) ≤ u (Nat.succ n)
[PROOFSTEP]
dsimp
[GOAL]
case hfh.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ EMetric.diam
      ↑(Bool.rec (motive := fun t => x n = t → { E // Perfect E ∧ Set.Nonempty E })
          (fun h =>
            (_ : false = x n) ▸
              {
                val :=
                  C0
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          (fun h =>
            (_ : true = x n) ▸
              {
                val :=
                  C1
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          (x n) (_ : x n = x n)) ≤
    u (Nat.succ n)
[PROOFSTEP]
cases x n
[GOAL]
case hfh.intro.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ EMetric.diam
      ↑(Bool.rec (motive := fun t => false = t → { E // Perfect E ∧ Set.Nonempty E })
          (fun h =>
            (_ : false = false) ▸
              {
                val :=
                  C0
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          (fun h =>
            (_ : true = false) ▸
              {
                val :=
                  C1
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          false (_ : false = false)) ≤
    u (Nat.succ n)
[PROOFSTEP]
convert (h0 _ _ _).2.2.2
[GOAL]
case h.e'_4.h.e'_1.h.e'_1
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ n = List.length (PiNat.res x n)
[PROOFSTEP]
rw [PiNat.res_length]
[GOAL]
case hfh.intro.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ EMetric.diam
      ↑(Bool.rec (motive := fun t => true = t → { E // Perfect E ∧ Set.Nonempty E })
          (fun h =>
            (_ : false = true) ▸
              {
                val :=
                  C0
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C0
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          (fun h =>
            (_ : true = true) ▸
              {
                val :=
                  C1
                    (_ :
                      Perfect
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ :
                      Set.Nonempty
                        ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                            (fun a l ih =>
                              Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                (fun h =>
                                  (_ : false = a) ▸
                                    {
                                      val :=
                                        C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                (fun h =>
                                  (_ : true = a) ▸
                                    {
                                      val :=
                                        C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                          (_ : 0 < u (Nat.succ (List.length l))),
                                      property :=
                                        (_ :
                                          Perfect
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                            Set.Nonempty
                                              (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))))) })
                                a (_ : a = a))
                            (PiNat.res x n)))
                    (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))),
                property :=
                  (_ :
                    Perfect
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n))))) ∧
                      Set.Nonempty
                        (C1
                          (_ :
                            Perfect
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ :
                            Set.Nonempty
                              ↑(List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
                                  (fun a l ih =>
                                    Bool.rec (motive := fun t => a = t → { E // Perfect E ∧ Set.Nonempty E })
                                      (fun h =>
                                        (_ : false = a) ▸
                                          {
                                            val :=
                                              C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      (fun h =>
                                        (_ : true = a) ▸
                                          {
                                            val :=
                                              C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                (_ : 0 < u (Nat.succ (List.length l))),
                                            property :=
                                              (_ :
                                                Perfect
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l)))) ∧
                                                  Set.Nonempty
                                                    (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih)
                                                      (_ : 0 < u (Nat.succ (List.length l))))) })
                                      a (_ : a = a))
                                  (PiNat.res x n)))
                          (_ : 0 < u (Nat.succ (List.length (PiNat.res x n)))))) })
          true (_ : true = true)) ≤
    u (Nat.succ n)
[PROOFSTEP]
convert (h1 _ _ _).2.2.2
[GOAL]
case h.e'_4.h.e'_1.h.e'_1
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
x : ℕ → Bool
n : ℕ
hm : Nat.succ n ≠ 0
⊢ n = List.length (PiNat.res x n)
[PROOFSTEP]
rw [PiNat.res_length]
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
have hdisj' : CantorScheme.Disjoint D :=
  by
  rintro l (a | a) (b | b) hab <;> try contradiction
  · exact hdisj _ _ _
  exact (hdisj _ _ _).symm
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
⊢ CantorScheme.Disjoint D
[PROOFSTEP]
rintro l (a | a) (b | b) hab
[GOAL]
case false.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : false ≠ false
⊢ Disjoint (D (false :: l)) (D (false :: l))
[PROOFSTEP]
try contradiction
[GOAL]
case false.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : false ≠ false
⊢ Disjoint (D (false :: l)) (D (false :: l))
[PROOFSTEP]
contradiction
[GOAL]
case false.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : false ≠ true
⊢ Disjoint (D (false :: l)) (D (true :: l))
[PROOFSTEP]
try contradiction
[GOAL]
case false.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : false ≠ true
⊢ Disjoint (D (false :: l)) (D (true :: l))
[PROOFSTEP]
contradiction
[GOAL]
case true.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : true ≠ false
⊢ Disjoint (D (true :: l)) (D (false :: l))
[PROOFSTEP]
try contradiction
[GOAL]
case true.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : true ≠ false
⊢ Disjoint (D (true :: l)) (D (false :: l))
[PROOFSTEP]
contradiction
[GOAL]
case true.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : true ≠ true
⊢ Disjoint (D (true :: l)) (D (true :: l))
[PROOFSTEP]
try contradiction
[GOAL]
case true.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : true ≠ true
⊢ Disjoint (D (true :: l)) (D (true :: l))
[PROOFSTEP]
contradiction
[GOAL]
case false.true
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : false ≠ true
⊢ Disjoint (D (false :: l)) (D (true :: l))
[PROOFSTEP]
exact hdisj _ _ _
[GOAL]
case true.false
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
l : List Bool
hab : true ≠ false
⊢ Disjoint (D (true :: l)) (D (false :: l))
[PROOFSTEP]
exact (hdisj _ _ _).symm
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
have hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).1 := fun {x} =>
  by
  rw [hanti.map_of_vanishingDiam hdiam fun l => (DP l).property.2]
  apply mem_univ
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
x : ℕ → Bool
⊢ x ∈ (inducedMap D).fst
[PROOFSTEP]
rw [hanti.map_of_vanishingDiam hdiam fun l => (DP l).property.2]
[GOAL]
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
x : ℕ → Bool
⊢ x ∈ univ
[PROOFSTEP]
apply mem_univ
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Injective f
[PROOFSTEP]
refine' ⟨fun x => (inducedMap D).2 ⟨x, hdom⟩, _, _, _⟩
[GOAL]
case intro.intro.intro.refine'_1
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
⊢ (range fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }) ⊆ C
[PROOFSTEP]
rintro y ⟨x, rfl⟩
[GOAL]
case intro.intro.intro.refine'_1.intro
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
x : ℕ → Bool
⊢ (fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }) x ∈ C
[PROOFSTEP]
exact map_mem ⟨_, hdom⟩ 0
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
⊢ Continuous fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }
[PROOFSTEP]
apply hdiam.map_continuous.comp
[GOAL]
case intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
⊢ Continuous fun x => { val := x, property := (_ : x ∈ (inducedMap D).fst) }
[PROOFSTEP]
continuity
[GOAL]
case intro.intro.intro.refine'_3
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
⊢ Injective fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }
[PROOFSTEP]
intro x y hxy
[GOAL]
case intro.intro.intro.refine'_3
α : Type u_1
inst✝¹ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
hnonempty : Set.Nonempty C
inst✝ : CompleteSpace α
u : ℕ → ℝ≥0∞
upos' : ∀ (n : ℕ), u n ∈ Ioo 0 1
hu : Tendsto u atTop (𝓝 0)
upos : ∀ (n : ℕ), 0 < u n
P : Type u_1 := { E // Perfect E ∧ Set.Nonempty E }
C0 C1 : {C : Set α} → Perfect C → Set.Nonempty C → {ε : ℝ≥0∞} → 0 < ε → Set α
h0 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C0 hC hnonempty hε) ∧
      Set.Nonempty (C0 hC hnonempty hε) ∧ C0 hC hnonempty hε ⊆ C ∧ EMetric.diam (C0 hC hnonempty hε) ≤ ε
h1 :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Perfect (C1 hC hnonempty hε) ∧
      Set.Nonempty (C1 hC hnonempty hε) ∧ C1 hC hnonempty hε ⊆ C ∧ EMetric.diam (C1 hC hnonempty hε) ≤ ε
hdisj :
  ∀ {C : Set α} (hC : Perfect C) (hnonempty : Set.Nonempty C) {ε : ℝ≥0∞} (hε : 0 < ε),
    Disjoint (C0 hC hnonempty hε) (C1 hC hnonempty hε)
DP : List Bool → P :=
  fun l =>
    List.rec { val := C, property := (_ : Perfect C ∧ Set.Nonempty C) }
      (fun a l ih =>
        Bool.casesOn (motive := fun t => a = t → P) a
          (fun h =>
            (_ : false = a) ▸
              { val := C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C0 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (fun h =>
            (_ : true = a) ▸
              { val := C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))),
                property :=
                  (_ :
                    Perfect (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l)))) ∧
                      Set.Nonempty
                        (C1 (_ : Perfect ↑ih) (_ : Set.Nonempty ↑ih) (_ : 0 < u (Nat.succ (List.length l))))) })
          (_ : a = a))
      l
D : List Bool → Set α := fun l => ↑(DP l)
hanti : ClosureAntitone D
hdiam : VanishingDiam D
hdisj' : CantorScheme.Disjoint D
hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).fst
x y : ℕ → Bool
hxy :
  (fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }) x =
    (fun x => Sigma.snd (inducedMap D) { val := x, property := (_ : x ∈ (inducedMap D).fst) }) y
⊢ x = y
[PROOFSTEP]
simpa only [← Subtype.val_inj] using hdisj'.map_injective hxy
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f
[PROOFSTEP]
letI := upgradePolishSpace α
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f
[PROOFSTEP]
obtain ⟨D, hD, Dnonempty, hDC⟩ := exists_perfect_nonempty_of_isClosed_of_not_countable hC hunc
[GOAL]
case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
D : Set α
hD : Perfect D
Dnonempty : Set.Nonempty D
hDC : D ⊆ C
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f
[PROOFSTEP]
obtain ⟨f, hfD, hf⟩ := hD.exists_nat_bool_injection Dnonempty
[GOAL]
case intro.intro.intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
D : Set α
hD : Perfect D
Dnonempty : Set.Nonempty D
hDC : D ⊆ C
f : (ℕ → Bool) → α
hfD : range f ⊆ D
hf : Continuous f ∧ Function.Injective f
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f
[PROOFSTEP]
exact ⟨f, hfD.trans hDC, hf⟩
