-- Mathlib/Topology/UrysohnsLemma.lean
theorem continuous_lim (c : CU P) : Continuous c.lim

Proof state:
case neg
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
hxl : x ∈ c.left.right.Cᶜ
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Tactic:
filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
  ihn c.left.right, ihn c.right] with y hyl hydl hydr

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
hxl : x ∈ c.left.right.Cᶜ
y : X
hyl : y ∈ c.left.right.Cᶜ
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Proof state:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Tactic:
simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
  c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ dist (midpoint ℝ (midpoint ℝ 1 (c.left.right.lim y)) (c.right.lim y))
      (midpoint ℝ (midpoint ℝ 1 (c.left.right.lim x)) (c.right.lim x)) ≤
    (3 / 4) ^ n * (3 / 4)

Proof state:
case intro.intro.zero
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
c : CU P
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ 0

Tactic:
filter_upwards with y

Result:
case intro.intro.zero.h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
c : CU P
y : X
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ 0

Proof state:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ ((dist 1 1 + dist (c.left.right.lim y) (c.left.right.lim x)) / 2 + dist (c.right.lim y) (c.right.lim x)) / 2 ≤
    (3 / 4) ^ n * (3 / 4)

Tactic:
rw [dist_self, zero_add]

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ (dist (c.left.right.lim y) (c.left.right.lim x) / 2 + dist (c.right.lim y) (c.right.lim x)) / 2 ≤
    (3 / 4) ^ n * (3 / 4)

Proof state:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hyl : y ∈ c.left.right.Cᶜ
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Tactic:
replace hyl : y ∉ c.left.left.U :=
  compl_subset_compl.2 c.left.left_U_subset_right_C hyl

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Proof state:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
⊢ (dist (c.left.right.lim y) (c.left.right.lim x) / 2 + dist (c.right.lim y) (c.right.lim x)) / 2 ≤
    (3 / 4) ^ n * (3 / 4)

Tactic:
set r := (3 / 4 : ℝ) ^ n

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
c : CU P
y : X
hxl : x ∉ c.left.left.U
hyl : y ∉ c.left.left.U
r : ℝ := (3 / 4) ^ n
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ r
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ r
hydr : dist (c.right.lim y) (c.right.lim x) ≤ r
⊢ (dist (c.left.right.lim y) (c.left.right.lim x) / 2 + dist (c.right.lim y) (c.right.lim x)) / 2 ≤ r * (3 / 4)

Proof state:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
hxl : x ∈ c.left.right.Cᶜ
y : X
hyl : y ∈ c.left.right.Cᶜ
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Tactic:
replace hxl : x ∉ c.left.left.U :=
  compl_subset_compl.2 c.left.left_U_subset_right_C hxl

Result:
case h
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU P), ∀ᶠ (x_1 : X) in 𝓝 x, dist (c.lim x_1) (c.lim x) ≤ (3 / 4) ^ n
c : CU P
y : X
hyl : y ∈ c.left.right.Cᶜ
hydl : dist (c.left.right.lim y) (c.left.right.lim x) ≤ (3 / 4) ^ n
hydr : dist (c.right.lim y) (c.right.lim x) ≤ (3 / 4) ^ n
hxl : x ∉ c.left.left.U
⊢ dist (c.lim y) (c.lim x) ≤ (3 / 4) ^ (n + 1)

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
c : CU P
⊢ Continuous c.lim

Tactic:
obtain ⟨h0, h1234, h1⟩ : 0 < (2⁻¹ : ℝ) ∧ (2⁻¹ : ℝ) < 3 / 4 ∧ (3 / 4 : ℝ) < 1 := by norm_num

Result:
case intro.intro
X : Type u_1
inst✝ : TopologicalSpace X
P : Set X → Prop
c : CU P
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
⊢ Continuous c.lim