import Mathlib
import Optlib


open Set Bornology Filter BigOperators Topology BCD

open BCD

theorem extracted_formal_statement_28.{u_2, u_1} {E : Type u_1} {F : Type u_2} [inst : NormedAddCommGroup E]
  [inst_1 : InnerProductSpace ℝ E] [inst_2 : CompleteSpace E] [inst_3 : NormedAddCommGroup F]
  [inst_4 : InnerProductSpace ℝ F] [inst_5 : CompleteSpace F] {f : E → ℝ} {g : F → ℝ} {H : WithLp 2 (E × F) → ℝ}
  {x0 : E} {y0 : F} {l : NNReal} {alg : BCD f g H l x0 y0} [inst_6 : ProperSpace E] [inst_7 : ProperSpace F]
  (bd : Bornology.IsBounded (z '' univ)) (ε : ℝ) (epos : 0 < ε)
  (h :
    ∀ (x : ℕ),
      ∃ x_1,
        x ≤ x_1 ∧
          (-ε < (EMetric.infEdist (z x_1) (limit_set z)).toReal →
            ε ≤ (EMetric.infEdist (z x_1) (limit_set z)).toReal)) :
  let W := fun n => Nat.recOn n (Classical.choose (h 0)) fun n p => Classical.choose (h (p + 1));
  StrictMono W →
    ∀ z_ ∈ closure (z ∘ W '' univ),
      ∀ (α : ℕ → ℕ),
        StrictMono α →
          Tendsto (fun n => (z ∘ W) (α n)) atTop (𝓝 z_) →
            z_ ∈ limit_set z →
              (EMetric.infEdist z_ (limit_set z)).toReal ≥ ε →
                ∀ (b : ℕ), 1 ≤ b → ε ≤ Metric.infDist (z (W (α b))) (limit_set z) := sorry

Tactic state before:
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace ℝ E
inst✝⁵ : CompleteSpace E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : CompleteSpace F
f : E → ℝ
g : F → ℝ
H : WithLp 2 (E × F) → ℝ
x0 : E
y0 : F
l : NNReal
alg : BCD f g H l x0 y0
inst✝¹ : ProperSpace E
inst✝ : ProperSpace F
bd : Bornology.IsBounded (z '' univ)
ε : ℝ
epos : 0 < ε
h :
  ∀ (x : ℕ),
    ∃ x_1,
      x ≤ x_1 ∧
        (-ε < (EMetric.infEdist (z x_1) (limit_set z)).toReal → ε ≤ (EMetric.infEdist (z x_1) (limit_set z)).toReal)
W : ℕ → ℕ := fun n => Nat.recOn n (Classical.choose ⋯) fun n p => Classical.choose ⋯
monoW : StrictMono W
z_ : WithLp 2 (E × F)
left✝ : z_ ∈ closure (z ∘ W '' univ)
α : ℕ → ℕ
monoa : StrictMono α
conv : Tendsto (fun n => (z ∘ W) (α n)) atTop (𝓝 z_)
z_in : z_ ∈ limit_set z
⊢ (EMetric.infEdist z_ (limit_set z)).toReal ≥ ε

Tactic:
apply
  ge_of_tendsto (continuous_iff_seqContinuous.mp (Metric.continuous_infDist_pt (limit_set alg.z)) conv)
    simp
    use 1

Tactic state after:
[case h
 E : Type u_1
 F : Type u_2
 inst✝⁷ : NormedAddCommGroup E
 inst✝⁶ : InnerProductSpace ℝ E
 inst✝⁵ : CompleteSpace E
 inst✝⁴ : NormedAddCommGroup F
 inst✝³ : InnerProductSpace ℝ F
 inst✝² : CompleteSpace F
 f : E → ℝ
 g : F → ℝ
 H : WithLp 2 (E × F) → ℝ
 x0 : E
 y0 : F
 l : NNReal
 alg : BCD f g H l x0 y0
 inst✝¹ : ProperSpace E
 inst✝ : ProperSpace F
 bd : Bornology.IsBounded (z '' univ)
 ε : ℝ
 epos : 0 < ε
 h :
   ∀ (x : ℕ),
     ∃ x_1,
       x ≤ x_1 ∧
         (-ε < (EMetric.infEdist (z x_1) (limit_set z)).toReal → ε ≤ (EMetric.infEdist (z x_1) (limit_set z)).toReal)
 W : ℕ → ℕ := fun n => Nat.recOn n (Classical.choose ⋯) fun n p => Classical.choose ⋯
 monoW : StrictMono W
 z_ : WithLp 2 (E × F)
 left✝ : z_ ∈ closure (z ∘ W '' univ)
 α : ℕ → ℕ
 monoa : StrictMono α
 conv : Tendsto (fun n => (z ∘ W) (α n)) atTop (𝓝 z_)
 z_in : z_ ∈ limit_set z
 ⊢ ∀ (b : ℕ), 1 ≤ b → ε ≤ Metric.infDist (z (W (α b))) (limit_set z)]