Theorem: Perfect.exists_nat_bool_injection
File: Mathlib/Topology/Perfect.lean

tactic: obtain ⟨u, -, upos', hu⟩ := exists_seq_strictAnti_tendsto' (zero_lt_one' ℝ≥0∞)
state_before: α : 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

tactic: have upos := fun n => (upos' n).1
state_before: 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

tactic: let P := Subtype fun E : Set α => Perfect E ∧ E.Nonempty
state_before: 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

tactic: 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ε
state_before: 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

tactic: let D : List Bool → Set α := fun l => (DP l).val
state_before: 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

tactic: 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
state_before: 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

tactic: refine' ⟨fun x => (inducedMap D).2 ⟨x, hdom⟩, _, _, _⟩
state_before: 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

tactic: intro x y hxy
state_before: 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) }

tactic: simpa only [← Subtype.val_inj] using hdisj'.map_injective hxy
state_before: 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

tactic: induction' l with a l ih
state_before: α : 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

tactic: cases a
state_before: 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

tactic: use C1 ih.property.1 ih.property.2 (upos l.length.succ)
state_before: 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

tactic: exact ⟨(h1 _ _ _).1, (h1 _ _ _).2.1⟩
state_before: 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
⊢ 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))))

tactic: exact ⟨C, ⟨hC, hnonempty⟩⟩
state_before: 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

tactic: use C0 ih.property.1 ih.property.2 (upos l.length.succ)
state_before: 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

tactic: exact ⟨(h0 _ _ _).1, (h0 _ _ _).2.1⟩
state_before: 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
⊢ 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))))

tactic: refine' Antitone.closureAntitone _ fun l => (DP l).property.1.closed
state_before: α : 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

tactic: intro l a
state_before: α : 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

tactic: cases a
state_before: α : 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

tactic: exact (h1 _ _ _).2.2.1
state_before: 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

tactic: exact (h0 _ _ _).2.2.1
state_before: 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

tactic: intro x
state_before: α : 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

tactic: apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hu
state_before: α : 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)

tactic: rw [eventually_atTop]
state_before: 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

tactic: refine' ⟨1, fun m (hm : 1 ≤ m) => _⟩
state_before: 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

tactic: rw [Nat.one_le_iff_ne_zero] at hm
state_before: 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

tactic: rcases Nat.exists_eq_succ_of_ne_zero hm with ⟨n, rfl⟩
state_before: 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

tactic: dsimp
state_before: 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)

tactic: cases x n
state_before: 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)

tactic: convert(h1 _ _ _).2.2.2
state_before: 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)

tactic: rw [PiNat.res_length]
state_before: 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)

tactic: simp
state_before: 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))

tactic: convert(h0 _ _ _).2.2.2
state_before: 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)

tactic: rw [PiNat.res_length]
state_before: 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)

tactic: rintro l (a | a) (b | b) hab <;> try contradiction
state_before: α : 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

tactic: exact (hdisj _ _ _).symm
state_before: 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))

tactic: contradiction
state_before: 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))

tactic: exact hdisj _ _ _
state_before: 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))

tactic: rw [hanti.map_of_vanishingDiam hdiam fun l => (DP l).property.2]
state_before: α : 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

tactic: apply mem_univ
state_before: α : 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

tactic: rintro y ⟨x, rfl⟩
state_before: 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

tactic: exact map_mem ⟨_, hdom⟩ 0
state_before: 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

tactic: apply hdiam.map_continuous.comp
state_before: 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) }

tactic: continuity
state_before: 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) }