[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have h3 : (0 : ℝ) < 3 := by norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
⊢ 0 < 3
[PROOFSTEP]
norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have h23 : 0 < (2 / 3 : ℝ) := by
  norm_num1
    -- In the trivial case `f = 0`, we take `g = 0`
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
⊢ 0 < 2 / 3
[PROOFSTEP]
norm_num1
  -- In the trivial case `f = 0`, we take `g = 0`
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
rcases eq_or_ne f 0 with (rfl | hf)
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
⊢ ∃ g, ‖g‖ ≤ ‖0‖ / 3 ∧ dist (compContinuous g e) 0 ≤ 2 / 3 * ‖0‖
[PROOFSTEP]
use 0
[GOAL]
case h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
⊢ ‖0‖ ≤ ‖0‖ / 3 ∧ dist (compContinuous 0 e) 0 ≤ 2 / 3 * ‖0‖
[PROOFSTEP]
simp
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : f ≠ 0
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
replace hf : 0 < ‖f‖ := norm_pos_iff.2 hf
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have hf3 : -‖f‖ / 3 < ‖f‖ / 3 := (div_lt_div_right h3).2 (Left.neg_lt_self hf)
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have hc₁ : IsClosed (e '' (f ⁻¹' Iic (-‖f‖ / 3))) := he.isClosedMap _ (isClosed_Iic.preimage f.continuous)
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have hc₂ : IsClosed (e '' (f ⁻¹' Ici (‖f‖ / 3))) := he.isClosedMap _ (isClosed_Ici.preimage f.continuous)
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have hd : Disjoint (e '' (f ⁻¹' Iic (-‖f‖ / 3))) (e '' (f ⁻¹' Ici (‖f‖ / 3))) :=
  by
  refine' disjoint_image_of_injective he.inj (Disjoint.preimage _ _)
  rwa [Iic_disjoint_Ici, not_le]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
⊢ Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
[PROOFSTEP]
refine' disjoint_image_of_injective he.inj (Disjoint.preimage _ _)
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
⊢ Disjoint (Iic (-‖f‖ / 3)) (Ici (‖f‖ / 3))
[PROOFSTEP]
rwa [Iic_disjoint_Ici, not_le]
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
rcases exists_bounded_mem_Icc_of_closed_of_le hc₁ hc₂ hd hf3.le with ⟨g, hg₁, hg₂, hgf⟩
[GOAL]
case inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
refine' ⟨g, _, _⟩
[GOAL]
case inr.intro.intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
⊢ ‖g‖ ≤ ‖f‖ / 3
[PROOFSTEP]
refine' (norm_le <| div_nonneg hf.le h3.le).mpr fun y => _
[GOAL]
case inr.intro.intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
y : Y
⊢ ‖↑g y‖ ≤ ‖f‖ / 3
[PROOFSTEP]
simpa [abs_le, neg_div] using hgf y
[GOAL]
case inr.intro.intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
⊢ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
refine' (dist_le <| mul_nonneg h23.le hf.le).mpr fun x => _
[GOAL]
case inr.intro.intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
have hfx : -‖f‖ ≤ f x ∧ f x ≤ ‖f‖ := by simpa only [Real.norm_eq_abs, abs_le] using f.norm_coe_le_norm x
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
⊢ -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
[PROOFSTEP]
simpa only [Real.norm_eq_abs, abs_le] using f.norm_coe_le_norm x
[GOAL]
case inr.intro.intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
cases' le_total (f x) (-‖f‖ / 3) with hle₁ hle₁
[GOAL]
case inr.intro.intro.intro.refine'_2.inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : ↑f x ≤ -‖f‖ / 3
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
calc
  |g (e x) - f x| = -‖f‖ / 3 - f x := by
    rw [hg₁ (mem_image_of_mem _ hle₁), Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₁)]
  _ ≤ 2 / 3 * ‖f‖ := by linarith
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : ↑f x ≤ -‖f‖ / 3
⊢ |↑g (↑e x) - ↑f x| = -‖f‖ / 3 - ↑f x
[PROOFSTEP]
rw [hg₁ (mem_image_of_mem _ hle₁), Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₁)]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : ↑f x ≤ -‖f‖ / 3
⊢ -‖f‖ / 3 - ↑f x ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
linarith
[GOAL]
case inr.intro.intro.intro.refine'_2.inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : -‖f‖ / 3 ≤ ↑f x
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
cases' le_total (f x) (‖f‖ / 3) with hle₂ hle₂
[GOAL]
case inr.intro.intro.intro.refine'_2.inr.inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : -‖f‖ / 3 ≤ ↑f x
hle₂ : ↑f x ≤ ‖f‖ / 3
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
simp only [neg_div] at *
[GOAL]
case inr.intro.intro.intro.refine'_2.inr.inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
g : Y →ᵇ ℝ
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₂ : ↑f x ≤ ‖f‖ / 3
hf3 : -(‖f‖ / 3) < ‖f‖ / 3
hc₁ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))
hc₂ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3)))) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hg₁ : EqOn (↑g) (Function.const Y (-(‖f‖ / 3))) ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-(‖f‖ / 3)) (‖f‖ / 3)
hle₁ : -(‖f‖ / 3) ≤ ↑f x
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
calc
  dist (g (e x)) (f x) ≤ |g (e x)| + |f x| := dist_le_norm_add_norm _ _
  _ ≤ ‖f‖ / 3 + ‖f‖ / 3 := (add_le_add (abs_le.2 <| hgf _) (abs_le.2 ⟨hle₁, hle₂⟩))
  _ = 2 / 3 * ‖f‖ := by linarith
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
g : Y →ᵇ ℝ
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₂ : ↑f x ≤ ‖f‖ / 3
hf3 : -(‖f‖ / 3) < ‖f‖ / 3
hc₁ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))
hc₂ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3)))) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hg₁ : EqOn (↑g) (Function.const Y (-(‖f‖ / 3))) ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-(‖f‖ / 3)) (‖f‖ / 3)
hle₁ : -(‖f‖ / 3) ≤ ↑f x
⊢ ‖f‖ / 3 + ‖f‖ / 3 = 2 / 3 * ‖f‖
[PROOFSTEP]
linarith
[GOAL]
case inr.intro.intro.intro.refine'_2.inr.inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : -‖f‖ / 3 ≤ ↑f x
hle₂ : ‖f‖ / 3 ≤ ↑f x
⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
calc
  |g (e x) - f x| = f x - ‖f‖ / 3 := by
    rw [hg₂ (mem_image_of_mem _ hle₂), abs_sub_comm, Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₂)]
  _ ≤ 2 / 3 * ‖f‖ := by linarith
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : -‖f‖ / 3 ≤ ↑f x
hle₂ : ‖f‖ / 3 ≤ ↑f x
⊢ |↑g (↑e x) - ↑f x| = ↑f x - ‖f‖ / 3
[PROOFSTEP]
rw [hg₂ (mem_image_of_mem _ hle₂), abs_sub_comm, Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₂)]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
h3 : 0 < 3
h23 : 0 < 2 / 3
hf : 0 < ‖f‖
hf3 : -‖f‖ / 3 < ‖f‖ / 3
hc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
g : Y →ᵇ ℝ
hg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))
hg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))
hgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)
x : X
hfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖
hle₁ : -‖f‖ / 3 ≤ ↑f x
hle₂ : ‖f‖ / 3 ≤ ↑f x
⊢ ↑f x - ‖f‖ / 3 ≤ 2 / 3 * ‖f‖
[PROOFSTEP]
linarith
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
choose F hF_norm hF_dist using fun f : X →ᵇ ℝ => tietze_extension_step f e he
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
set g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - g.compContinuous e))^[n] 0
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have g0 : g 0 = 0 := rfl
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have g_succ : ∀ n, g (n + 1) = g n + F (f - (g n).compContinuous e) := fun n => Function.iterate_succ_apply' _ _ _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have hgf : ∀ n, dist ((g n).compContinuous e) f ≤ (2 / 3) ^ n * ‖f‖ :=
  by
  intro n
  induction' n with n ihn
  · simp [g0]
  · rw [g_succ n, add_compContinuous, ← dist_sub_right, add_sub_cancel', pow_succ, mul_assoc]
    refine' (hF_dist _).trans (mul_le_mul_of_nonneg_left _ (by norm_num1))
    rwa [← dist_eq_norm']
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
⊢ ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
[PROOFSTEP]
intro n
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
n : ℕ
⊢ dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
[PROOFSTEP]
induction' n with n ihn
[GOAL]
case zero
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
⊢ dist (compContinuous (g Nat.zero) e) f ≤ (2 / 3) ^ Nat.zero * ‖f‖
[PROOFSTEP]
simp [g0]
[GOAL]
case succ
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
n : ℕ
ihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ dist (compContinuous (g (Nat.succ n)) e) f ≤ (2 / 3) ^ Nat.succ n * ‖f‖
[PROOFSTEP]
rw [g_succ n, add_compContinuous, ← dist_sub_right, add_sub_cancel', pow_succ, mul_assoc]
[GOAL]
case succ
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
n : ℕ
ihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ dist (compContinuous (F (f - compContinuous (g n) e)) e) (f - compContinuous (g n) e) ≤ 2 / 3 * ((2 / 3) ^ n * ‖f‖)
[PROOFSTEP]
refine' (hF_dist _).trans (mul_le_mul_of_nonneg_left _ (by norm_num1))
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
n : ℕ
ihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ 0 ≤ 2 / 3
[PROOFSTEP]
norm_num1
[GOAL]
case succ
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
n : ℕ
ihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ ‖f - compContinuous (g n) e‖ ≤ (2 / 3) ^ n * ‖f‖
[PROOFSTEP]
rwa [← dist_eq_norm']
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have hg_dist : ∀ n, dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n :=
  by
  intro n
  calc
    dist (g n) (g (n + 1)) = ‖F (f - (g n).compContinuous e)‖ := by rw [g_succ, dist_eq_norm', add_sub_cancel']
    _ ≤ ‖f - (g n).compContinuous e‖ / 3 := (hF_norm _)
    _ = 1 / 3 * dist ((g n).compContinuous e) f := by rw [dist_eq_norm', one_div, div_eq_inv_mul]
    _ ≤ 1 / 3 * ((2 / 3) ^ n * ‖f‖) := (mul_le_mul_of_nonneg_left (hgf n) (by norm_num1))
    _ = 1 / 3 * ‖f‖ * (2 / 3) ^ n := by ac_rfl
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
⊢ ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
[PROOFSTEP]
intro n
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
n : ℕ
⊢ dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
[PROOFSTEP]
calc
  dist (g n) (g (n + 1)) = ‖F (f - (g n).compContinuous e)‖ := by rw [g_succ, dist_eq_norm', add_sub_cancel']
  _ ≤ ‖f - (g n).compContinuous e‖ / 3 := (hF_norm _)
  _ = 1 / 3 * dist ((g n).compContinuous e) f := by rw [dist_eq_norm', one_div, div_eq_inv_mul]
  _ ≤ 1 / 3 * ((2 / 3) ^ n * ‖f‖) := (mul_le_mul_of_nonneg_left (hgf n) (by norm_num1))
  _ = 1 / 3 * ‖f‖ * (2 / 3) ^ n := by ac_rfl
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
n : ℕ
⊢ dist (g n) (g (n + 1)) = ‖F (f - compContinuous (g n) e)‖
[PROOFSTEP]
rw [g_succ, dist_eq_norm', add_sub_cancel']
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
n : ℕ
⊢ ‖f - compContinuous (g n) e‖ / 3 = 1 / 3 * dist (compContinuous (g n) e) f
[PROOFSTEP]
rw [dist_eq_norm', one_div, div_eq_inv_mul]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
n : ℕ
⊢ 0 ≤ 1 / 3
[PROOFSTEP]
norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
n : ℕ
⊢ 1 / 3 * ((2 / 3) ^ n * ‖f‖) = 1 / 3 * ‖f‖ * (2 / 3) ^ n
[PROOFSTEP]
ac_rfl
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have hg_cau : CauchySeq g := cauchySeq_of_le_geometric _ _ (by norm_num1) hg_dist
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
⊢ 2 / 3 < 1
[PROOFSTEP]
norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have : Tendsto (fun n => (g n).compContinuous e) atTop (𝓝 <| (limUnder atTop g).compContinuous e) :=
  ((continuous_compContinuous e).tendsto _).comp hg_cau.tendsto_limUnder
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
have hge : (limUnder atTop g).compContinuous e = f :=
  by
  refine' tendsto_nhds_unique this (tendsto_iff_dist_tendsto_zero.2 _)
  refine' squeeze_zero (fun _ => dist_nonneg) hgf _
  rw [← zero_mul ‖f‖]
  refine' (tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds <;> norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ compContinuous (limUnder atTop g) e = f
[PROOFSTEP]
refine' tendsto_nhds_unique this (tendsto_iff_dist_tendsto_zero.2 _)
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ Tendsto (fun b => dist (compContinuous (g b) e) f) atTop (𝓝 0)
[PROOFSTEP]
refine' squeeze_zero (fun _ => dist_nonneg) hgf _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ Tendsto (fun t => (2 / 3) ^ t * ‖f‖) atTop (𝓝 0)
[PROOFSTEP]
rw [← zero_mul ‖f‖]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ Tendsto (fun t => (2 / 3) ^ t * ‖f‖) atTop (𝓝 (0 * ‖f‖))
[PROOFSTEP]
refine' (tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ 0 ≤ 2 / 3
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
⊢ 2 / 3 < 1
[PROOFSTEP]
norm_num1
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f
[PROOFSTEP]
refine' ⟨limUnder atTop g, le_antisymm _ _, hge⟩
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ ‖limUnder atTop g‖ ≤ ‖f‖
[PROOFSTEP]
rw [← dist_zero_left, ← g0]
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ dist (g 0) (limUnder atTop g) ≤ ‖f‖
[PROOFSTEP]
refine' (dist_le_of_le_geometric_of_tendsto₀ _ _ (by norm_num1) hg_dist hg_cau.tendsto_limUnder).trans_eq _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ 2 / 3 < 1
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ 1 / 3 * ‖f‖ / (1 - 2 / 3) = ‖f‖
[PROOFSTEP]
field_simp [show (3 - 2 : ℝ) = 1 by norm_num1]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ 3 - 2 = 1
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ ‖f‖ ≤ ‖limUnder atTop g‖
[PROOFSTEP]
rw [← hge]
[GOAL]
case refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : C(X, Y)
he : ClosedEmbedding ↑e
F : (X →ᵇ ℝ) → Y →ᵇ ℝ
hF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3
hF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖
g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0
g0 : g 0 = 0
g_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)
hgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖
hg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n
hg_cau : CauchySeq g
this : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))
hge : compContinuous (limUnder atTop g) e = f
⊢ ‖compContinuous (limUnder atTop g) e‖ ≤ ‖limUnder atTop g‖
[PROOFSTEP]
exact norm_compContinuous_le _ _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
⊢ ∃ g, ‖g‖ = ‖f‖ ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_extension_norm_eq_of_closedEmbedding' f ⟨e, he.continuous⟩ he with ⟨g, hg, rfl⟩
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
e : X → Y
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hg : ‖g‖ = ‖compContinuous g (ContinuousMap.mk e)‖
⊢ ∃ g_1, ‖g_1‖ = ‖compContinuous g (ContinuousMap.mk e)‖ ∧ ↑g_1 ∘ e = ↑(compContinuous g (ContinuousMap.mk e))
[PROOFSTEP]
exact ⟨g, hg, rfl⟩
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ Icc a b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_extension_norm_eq_of_closedEmbedding (f - const X ((a + b) / 2)) he with ⟨g, hgf, hge⟩
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ Icc a b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨const Y ((a + b) / 2) + g, fun y => _, _⟩
[GOAL]
case intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
y : Y
⊢ ↑(const Y ((a + b) / 2) + g) y ∈ Icc a b
[PROOFSTEP]
suffices ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2 by
  simpa [Real.Icc_eq_closedBall, add_mem_closedBall_iff_norm] using (norm_coe_le_norm g y).trans (hgf.trans_le this)
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
y : Y
this : ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2
⊢ ↑(const Y ((a + b) / 2) + g) y ∈ Icc a b
[PROOFSTEP]
simpa [Real.Icc_eq_closedBall, add_mem_closedBall_iff_norm] using (norm_coe_le_norm g y).trans (hgf.trans_le this)
[GOAL]
case intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
y : Y
⊢ ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2
[PROOFSTEP]
refine' (norm_le <| div_nonneg (sub_nonneg.2 hle) zero_le_two).2 fun x => _
[GOAL]
case intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
y : Y
x : X
⊢ ‖↑(f - const X ((a + b) / 2)) x‖ ≤ (b - a) / 2
[PROOFSTEP]
simpa only [Real.Icc_eq_closedBall] using hf x
[GOAL]
case intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
⊢ ↑(const Y ((a + b) / 2) + g) ∘ e = ↑f
[PROOFSTEP]
ext x
[GOAL]
case intro.intro.refine'_2.h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
x : X
⊢ (↑(const Y ((a + b) / 2) + g) ∘ e) x = ↑f x
[PROOFSTEP]
have : g (e x) = f x - (a + b) / 2 := congr_fun hge x
[GOAL]
case intro.intro.refine'_2.h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
a b : ℝ
e : X → Y
hf : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
he : ClosedEmbedding e
g : Y →ᵇ ℝ
hgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖
hge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))
x : X
this : ↑g (e x) = ↑f x - (a + b) / 2
⊢ (↑(const Y ((a + b) / 2) + g) ∘ e) x = ↑f x
[PROOFSTEP]
simp [this]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
inhabit X
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
obtain ⟨a, ha⟩ : ∃ a, IsGLB (range f) a
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
⊢ ∃ a, IsGLB (range ↑f) a
case intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
exact ⟨_, isGLB_ciInf (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1⟩
[GOAL]
case intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
obtain ⟨b, hb⟩ : ∃ b, IsLUB (range f) b
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
⊢ ∃ b, IsLUB (range ↑f) b
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
exact
  ⟨_, isLUB_ciSup (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2⟩
    -- Then `f x ∈ [a, b]` for all `x`
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hmem : ∀ x, f x ∈ Icc a b := fun x =>
  ⟨ha.1 ⟨x, rfl⟩, hb.1 ⟨x, rfl⟩⟩
    -- Rule out the trivial case `a = b`
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hle : a ≤ b := (hmem default).1.trans (hmem default).2
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases hle.eq_or_lt with (rfl | hlt)
[GOAL]
case intro.intro.inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
hb : IsLUB (range ↑f) a
hmem : ∀ (x : X), ↑f x ∈ Icc a a
hle : a ≤ a
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have : ∀ x, f x = a := by simpa using hmem
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
hb : IsLUB (range ↑f) a
hmem : ∀ (x : X), ↑f x ∈ Icc a a
hle : a ≤ a
⊢ ∀ (x : X), ↑f x = a
[PROOFSTEP]
simpa using hmem
[GOAL]
case intro.intro.inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
hb : IsLUB (range ↑f) a
hmem : ∀ (x : X), ↑f x ∈ Icc a a
hle : a ≤ a
this : ∀ (x : X), ↑f x = a
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
use const Y a
[GOAL]
case h
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
hb : IsLUB (range ↑f) a
hmem : ∀ (x : X), ↑f x ∈ Icc a a
hle : a ≤ a
this : ∀ (x : X), ↑f x = a
⊢ (∀ (y : Y), ∃ x₁ x₂, ↑(const Y a) y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑(const Y a) ∘ e = ↑f
[PROOFSTEP]
simp [this, Function.funext_iff]
  -- Put `c = (a + b) / 2`. Then `a < c < b` and `c - a = b - c`.
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
set c := (a + b) / 2
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hac : a < c := left_lt_add_div_two.2 hlt
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hcb : c < b := add_div_two_lt_right.2 hlt
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hsub : c - a = b - c := by
  field_simp
  ring
    /- Due to `exists_extension_forall_mem_Icc_of_closedEmbedding`, there exists an extension `g`
        such that `g y ∈ [a, b]` for all `y`. However, if `a` and/or `b` do not belong to the range of
        `f`, then we need to ensure that these points do not belong to the range of `g`. This is done
        in two almost identical steps. First we deal with the case `∀ x, f x ≠ a`. -/
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
⊢ c - a = b - c
[PROOFSTEP]
field_simp
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
⊢ a + b - 2 * a = b * 2 - (a + b)
[PROOFSTEP]
ring
  /- Due to `exists_extension_forall_mem_Icc_of_closedEmbedding`, there exists an extension `g`
      such that `g y ∈ [a, b]` for all `y`. However, if `a` and/or `b` do not belong to the range of
      `f`, then we need to ensure that these points do not belong to the range of `g`. This is done
      in two almost identical steps. First we deal with the case `∀ x, f x ≠ a`. -/
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
obtain ⟨g, hg_mem, hgf⟩ : ∃ g : Y →ᵇ ℝ, (∀ y, ∃ x, g y ∈ Icc (f x) b) ∧ g ∘ e = f :=
  by
  rcases exists_extension_forall_mem_Icc_of_closedEmbedding f hmem hle he with
    ⟨g, hg_mem, hgf⟩
      -- If `a ∈ range f`, then we are done.
  rcases em (∃ x, f x = a) with (⟨x, rfl⟩ | ha')
  ·
    exact
      ⟨g, fun y => ⟨x, hg_mem _⟩, hgf⟩
        /- Otherwise, `g ⁻¹' {a}` is disjoint with `range e ∪ g ⁻¹' (Ici c)`, hence there exists a
                function `dg : Y → ℝ` such that `dg ∘ e = 0`, `dg y = 0` whenever `c ≤ g y`, `dg y = c - a`
                whenever `g y = a`, and `0 ≤ dg y ≤ c - a` for all `y`.  -/
  have hd : Disjoint (range e ∪ g ⁻¹' Ici c) (g ⁻¹' { a }) :=
    by
    refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩
    · rw [Set.disjoint_left]
      rintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)
      exact ha' ⟨x, (congr_fun hgf x).symm⟩
    · exact Set.disjoint_singleton_right.2 hac.not_le
  rcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Ici.preimage g.continuous)
      (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hac.le) with
    ⟨dg, dg0, dga, dgmem⟩
  replace hgf : ∀ x, (g + dg) (e x) = f x
  · intro x
    simp [dg0 (Or.inl <| mem_range_self _), ← hgf]
  refine' ⟨g + dg, fun y => _, funext hgf⟩
  · have hay : a < (g + dg) y := by
      rcases(hg_mem y).1.eq_or_lt with (rfl | hlt)
      · refine' (lt_add_iff_pos_right _).2 _
        calc
          0 < c - g y := sub_pos.2 hac
          _ = dg y := (dga rfl).symm
      · exact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)
    rcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩
    refine' ⟨x, hxy.le, _⟩
    cases' le_total c (g y) with hc hc
    · simp [dg0 (Or.inr hc), (hg_mem y).2]
    ·
      calc
        g y + dg y ≤ c + (c - a) := add_le_add hc (dgmem _).2
        _ = b := by
          rw [hsub, add_sub_cancel'_right]
            /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with
                minor modifications that make it hard to deduplicate code. -/
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_extension_forall_mem_Icc_of_closedEmbedding f hmem hle he with
  ⟨g, hg_mem, hgf⟩
    -- If `a ∈ range f`, then we are done.
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases em (∃ x, f x = a) with (⟨x, rfl⟩ | ha')
[GOAL]
case intro.intro.inl.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
x : X
ha : IsGLB (range ↑f) (↑f x)
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b
hle : ↑f x ≤ b
hlt : ↑f x < b
c : ℝ := (↑f x + b) / 2
hac : ↑f x < c
hcb : c < b
hsub : c - ↑f x = b - c
hg_mem : ∀ (y : Y), ↑g y ∈ Icc (↑f x) b
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
exact
  ⟨g, fun y => ⟨x, hg_mem _⟩, hgf⟩
    /- Otherwise, `g ⁻¹' {a}` is disjoint with `range e ∪ g ⁻¹' (Ici c)`, hence there exists a
            function `dg : Y → ℝ` such that `dg ∘ e = 0`, `dg y = 0` whenever `c ≤ g y`, `dg y = c - a`
            whenever `g y = a`, and `0 ≤ dg y ≤ c - a` for all `y`.  -/
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hd : Disjoint (range e ∪ g ⁻¹' Ici c) (g ⁻¹' { a }) :=
  by
  refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩
  · rw [Set.disjoint_left]
    rintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)
    exact ha' ⟨x, (congr_fun hgf x).symm⟩
  · exact Set.disjoint_singleton_right.2 hac.not_le
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
⊢ Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
[PROOFSTEP]
refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
⊢ Disjoint (range e) (↑g ⁻¹' {a})
[PROOFSTEP]
rw [Set.disjoint_left]
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
⊢ ∀ ⦃a_1 : Y⦄, a_1 ∈ range e → ¬a_1 ∈ ↑g ⁻¹' {a}
[PROOFSTEP]
rintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)
[GOAL]
case refine'_1.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
x : X
ha : IsGLB (range ↑f) (↑g (e x))
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑g (e x)) b
hle : ↑g (e x) ≤ b
hlt : ↑g (e x) < b
c : ℝ := (↑g (e x) + b) / 2
hac : ↑g (e x) < c
hcb : c < b
hsub : c - ↑g (e x) = b - c
hg_mem : ∀ (y : Y), ↑g y ∈ Icc (↑g (e x)) b
ha' : ¬∃ x_1, ↑f x_1 = ↑g (e x)
⊢ False
[PROOFSTEP]
exact ha' ⟨x, (congr_fun hgf x).symm⟩
[GOAL]
case refine'_2
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
⊢ Disjoint (Ici c) {a}
[PROOFSTEP]
exact Set.disjoint_singleton_right.2 hac.not_le
[GOAL]
case intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Ici.preimage g.continuous)
    (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hac.le) with
  ⟨dg, dg0, dga, dgmem⟩
[GOAL]
case intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
replace hgf : ∀ x, (g + dg) (e x) = f x
[GOAL]
case hgf
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
⊢ ∀ (x : X), ↑(g + dg) (e x) = ↑f x
[PROOFSTEP]
intro x
[GOAL]
case hgf
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
hgf : ↑g ∘ e = ↑f
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
x : X
⊢ ↑(g + dg) (e x) = ↑f x
[PROOFSTEP]
simp [dg0 (Or.inl <| mem_range_self _), ← hgf]
[GOAL]
case intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨g + dg, fun y => _, funext hgf⟩
[GOAL]
case intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b
[PROOFSTEP]
have hay : a < (g + dg) y := by
  rcases(hg_mem y).1.eq_or_lt with (rfl | hlt)
  · refine' (lt_add_iff_pos_right _).2 _
    calc
      0 < c - g y := sub_pos.2 hac
      _ = dg y := (dga rfl).symm
  · exact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
⊢ a < ↑(g + dg) y
[PROOFSTEP]
rcases(hg_mem y).1.eq_or_lt with (rfl | hlt)
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
ha : IsGLB (range ↑f) (↑g y)
hmem : ∀ (x : X), ↑f x ∈ Icc (↑g y) b
hle : ↑g y ≤ b
hlt : ↑g y < b
c : ℝ := (↑g y + b) / 2
hac : ↑g y < c
hcb : c < b
hsub : c - ↑g y = b - c
hg_mem : ∀ (y_1 : Y), ↑g y_1 ∈ Icc (↑g y) b
ha' : ¬∃ x, ↑f x = ↑g y
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {↑g y})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - ↑g y)) (↑g ⁻¹' {↑g y})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - ↑g y)
⊢ ↑g y < ↑(g + dg) y
[PROOFSTEP]
refine' (lt_add_iff_pos_right _).2 _
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
ha : IsGLB (range ↑f) (↑g y)
hmem : ∀ (x : X), ↑f x ∈ Icc (↑g y) b
hle : ↑g y ≤ b
hlt : ↑g y < b
c : ℝ := (↑g y + b) / 2
hac : ↑g y < c
hcb : c < b
hsub : c - ↑g y = b - c
hg_mem : ∀ (y_1 : Y), ↑g y_1 ∈ Icc (↑g y) b
ha' : ¬∃ x, ↑f x = ↑g y
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {↑g y})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - ↑g y)) (↑g ⁻¹' {↑g y})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - ↑g y)
⊢ 0 < ↑dg.toContinuousMap y
[PROOFSTEP]
calc
  0 < c - g y := sub_pos.2 hac
  _ = dg y := (dga rfl).symm
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt✝ : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hlt : a < ↑g y
⊢ a < ↑(g + dg) y
[PROOFSTEP]
exact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)
[GOAL]
case intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b
[PROOFSTEP]
rcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩
[GOAL]
case intro.intro.inr.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g + dg) y
⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b
[PROOFSTEP]
refine' ⟨x, hxy.le, _⟩
[GOAL]
case intro.intro.inr.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g + dg) y
⊢ ↑(g + dg) y ≤ b
[PROOFSTEP]
cases' le_total c (g y) with hc hc
[GOAL]
case intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g + dg) y
hc : c ≤ ↑g y
⊢ ↑(g + dg) y ≤ b
[PROOFSTEP]
simp [dg0 (Or.inr hc), (hg_mem y).2]
[GOAL]
case intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g + dg) y
hc : ↑g y ≤ c
⊢ ↑(g + dg) y ≤ b
[PROOFSTEP]
calc
  g y + dg y ≤ c + (c - a) := add_le_add hc (dgmem _).2
  _ = b := by
    rw [hsub, add_sub_cancel'_right]
      /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with
          minor modifications that make it hard to deduplicate code. -/
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ↑g y ∈ Icc a b
ha' : ¬∃ x, ↑f x = a
hd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)
dga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)
hgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x
y : Y
hay : a < ↑(g + dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g + dg) y
hc : ↑g y ≤ c
⊢ c + (c - a) = b
[PROOFSTEP]
rw [hsub, add_sub_cancel'_right]
  /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with
      minor modifications that make it hard to deduplicate code. -/
[GOAL]
case intro.intro.inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hg_mem : ∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b
hgf : ↑g ∘ e = ↑f
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
choose xl hxl hgb using hg_mem
[GOAL]
case intro.intro.inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases em (∃ x, f x = b) with (⟨x, rfl⟩ | hb')
[GOAL]
case intro.intro.inr.intro.intro.inl.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
x : X
hb : IsLUB (range ↑f) (↑f x)
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc a (↑f x)
hle : a ≤ ↑f x
hlt : a < ↑f x
c : ℝ := (a + ↑f x) / 2
hac : a < c
hcb : c < ↑f x
hsub : c - a = ↑f x - c
hgb : ∀ (y : Y), ↑g y ≤ ↑f x
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
exact ⟨g, fun y => ⟨xl y, x, hxl y, hgb y⟩, hgf⟩
[GOAL]
case intro.intro.inr.intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hd : Disjoint (range e ∪ g ⁻¹' Iic c) (g ⁻¹' { b }) :=
  by
  refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩
  · rw [Set.disjoint_left]
    rintro _ ⟨x, rfl⟩ (rfl : g (e x) = b)
    exact hb' ⟨x, (congr_fun hgf x).symm⟩
  · exact Set.disjoint_singleton_right.2 hcb.not_le
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
⊢ Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
[PROOFSTEP]
refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
⊢ Disjoint (range e) (↑g ⁻¹' {b})
[PROOFSTEP]
rw [Set.disjoint_left]
[GOAL]
case refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
⊢ ∀ ⦃a : Y⦄, a ∈ range e → ¬a ∈ ↑g ⁻¹' {b}
[PROOFSTEP]
rintro _ ⟨x, rfl⟩ (rfl : g (e x) = b)
[GOAL]
case refine'_1.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
x : X
hb : IsLUB (range ↑f) (↑g (e x))
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc a (↑g (e x))
hle : a ≤ ↑g (e x)
hlt : a < ↑g (e x)
c : ℝ := (a + ↑g (e x)) / 2
hac : a < c
hcb : c < ↑g (e x)
hsub : c - a = ↑g (e x) - c
hgb : ∀ (y : Y), ↑g y ≤ ↑g (e x)
hb' : ¬∃ x_1, ↑f x_1 = ↑g (e x)
⊢ False
[PROOFSTEP]
exact hb' ⟨x, (congr_fun hgf x).symm⟩
[GOAL]
case refine'_2
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
⊢ Disjoint (Iic c) {b}
[PROOFSTEP]
exact Set.disjoint_singleton_right.2 hcb.not_le
[GOAL]
case intro.intro.inr.intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Iic.preimage g.continuous)
    (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hcb.le) with
  ⟨dg, dg0, dgb, dgmem⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
replace hgf : ∀ x, (g - dg) (e x) = f x
[GOAL]
case hgf
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
⊢ ∀ (x : X), ↑(g - dg) (e x) = ↑f x
[PROOFSTEP]
intro x
[GOAL]
case hgf
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
hgf : ↑g ∘ e = ↑f
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
x : X
⊢ ↑(g - dg) (e x) = ↑f x
[PROOFSTEP]
simp [dg0 (Or.inl <| mem_range_self _), ← hgf]
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨g - dg, fun y => _, funext hgf⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
have hyb : (g - dg) y < b := by
  rcases(hgb y).eq_or_lt with (rfl | hlt)
  · refine' (sub_lt_self_iff _).2 _
    calc
      0 < g y - c := sub_pos.2 hcb
      _ = dg y := (dgb rfl).symm
  · exact ((sub_le_self_iff _).2 (dgmem _).1).trans_lt hlt
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
⊢ ↑(g - dg) y < b
[PROOFSTEP]
rcases(hgb y).eq_or_lt with (rfl | hlt)
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hb : IsLUB (range ↑f) (↑g y)
hmem : ∀ (x : X), ↑f x ∈ Icc a (↑g y)
hle : a ≤ ↑g y
hlt : a < ↑g y
c : ℝ := (a + ↑g y) / 2
hac : a < c
hcb : c < ↑g y
hsub : c - a = ↑g y - c
hgb : ∀ (y_1 : Y), ↑g y_1 ≤ ↑g y
hb' : ¬∃ x, ↑f x = ↑g y
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {↑g y})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (↑g y - c)) (↑g ⁻¹' {↑g y})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (↑g y - c)
⊢ ↑(g - dg) y < ↑g y
[PROOFSTEP]
refine' (sub_lt_self_iff _).2 _
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hb : IsLUB (range ↑f) (↑g y)
hmem : ∀ (x : X), ↑f x ∈ Icc a (↑g y)
hle : a ≤ ↑g y
hlt : a < ↑g y
c : ℝ := (a + ↑g y) / 2
hac : a < c
hcb : c < ↑g y
hsub : c - a = ↑g y - c
hgb : ∀ (y_1 : Y), ↑g y_1 ≤ ↑g y
hb' : ¬∃ x, ↑f x = ↑g y
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {↑g y})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (↑g y - c)) (↑g ⁻¹' {↑g y})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (↑g y - c)
⊢ 0 < ↑dg y
[PROOFSTEP]
calc
  0 < g y - c := sub_pos.2 hcb
  _ = dg y := (dgb rfl).symm
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt✝ : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hlt : ↑g y < b
⊢ ↑(g - dg) y < b
[PROOFSTEP]
exact ((sub_le_self_iff _).2 (dgmem _).1).trans_lt hlt
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
rcases hb.exists_between hyb with ⟨_, ⟨xu, rfl⟩, hyxu, _⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
cases' lt_or_le c (g y) with hc hc
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
rcases em (a ∈ range f) with (⟨x, rfl⟩ | _)
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inl.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
x : X
ha : IsGLB (range ↑f) (↑f x)
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b
hle : ↑f x ≤ b
hlt : ↑f x < b
c : ℝ := (↑f x + b) / 2
hac : ↑f x < c
hcb : c < b
hsub : c - ↑f x = b - c
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hc : c < ↑g y
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
refine' ⟨x, xu, _, hyxu.le⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inl.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
x : X
ha : IsGLB (range ↑f) (↑f x)
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b
hle : ↑f x ≤ b
hlt : ↑f x < b
c : ℝ := (↑f x + b) / 2
hac : ↑f x < c
hcb : c < b
hsub : c - ↑f x = b - c
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hc : c < ↑g y
⊢ ↑f x ≤ ↑(g - dg) y
[PROOFSTEP]
calc
  f x = c - (b - c) := by rw [← hsub, sub_sub_cancel]
  _ ≤ g y - dg y := sub_le_sub hc.le (dgmem _).2
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
b : ℝ
hb : IsLUB (range ↑f) b
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
dg : Y →ᵇ ℝ
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
x : X
ha : IsGLB (range ↑f) (↑f x)
hmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b
hle : ↑f x ≤ b
hlt : ↑f x < b
c : ℝ := (↑f x + b) / 2
hac : ↑f x < c
hcb : c < b
hsub : c - ↑f x = b - c
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hc : c < ↑g y
⊢ ↑f x = c - (b - c)
[PROOFSTEP]
rw [← hsub, sub_sub_cancel]
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
h✝ : ¬a ∈ range ↑f
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
have hay : a < (g - dg) y := by
  calc
    a = c - (b - c) := by rw [← hsub, sub_sub_cancel]
    _ < g y - (b - c) := (sub_lt_sub_right hc _)
    _ ≤ g y - dg y := sub_le_sub_left (dgmem _).2 _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
h✝ : ¬a ∈ range ↑f
⊢ a < ↑(g - dg) y
[PROOFSTEP]
calc
  a = c - (b - c) := by rw [← hsub, sub_sub_cancel]
  _ < g y - (b - c) := (sub_lt_sub_right hc _)
  _ ≤ g y - dg y := sub_le_sub_left (dgmem _).2 _
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
h✝ : ¬a ∈ range ↑f
⊢ a = c - (b - c)
[PROOFSTEP]
rw [← hsub, sub_sub_cancel]
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
h✝ : ¬a ∈ range ↑f
hay : a < ↑(g - dg) y
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
rcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : c < ↑g y
h✝ : ¬a ∈ range ↑f
hay : a < ↑(g - dg) y
x : X
left✝ : a ≤ ↑f x
hxy : ↑f x < ↑(g - dg) y
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
exact ⟨x, xu, hxy.le, hyxu.le⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : ↑g y ≤ c
⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)
[PROOFSTEP]
refine' ⟨xl y, xu, _, hyxu.le⟩
[GOAL]
case intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
inst✝ : Nonempty X
f : X →ᵇ ℝ
e : X → Y
he : ClosedEmbedding e
inhabited_h : Inhabited X
a : ℝ
ha : IsGLB (range ↑f) a
b : ℝ
hb : IsLUB (range ↑f) b
hmem : ∀ (x : X), ↑f x ∈ Icc a b
hle : a ≤ b
hlt : a < b
c : ℝ := (a + b) / 2
hac : a < c
hcb : c < b
hsub : c - a = b - c
g : Y →ᵇ ℝ
xl : Y → X
hxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y
hgb : ∀ (y : Y), ↑g y ≤ b
hb' : ¬∃ x, ↑f x = b
hd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})
dg : Y →ᵇ ℝ
dg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)
dgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})
dgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)
hgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x
y : Y
hyb : ↑(g - dg) y < b
xu : X
hyxu : ↑(g - dg) y < ↑f xu
right✝ : ↑f xu ≤ b
hc : ↑g y ≤ c
⊢ ↑f (xl y) ≤ ↑(g - dg) y
[PROOFSTEP]
simp [dg0 (Or.inr hc), hxl]
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
cases isEmpty_or_nonempty X
[GOAL]
case inl
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : IsEmpty X
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases hne with ⟨c, hc⟩
[GOAL]
case inl.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
he : ClosedEmbedding e
h✝ : IsEmpty X
c : ℝ
hc : c ∈ t
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨const Y c, fun _ => hc, funext fun x => isEmptyElim x⟩
[GOAL]
case inr
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases exists_extension_forall_exists_le_ge_of_closedEmbedding f he with ⟨g, hg, hgf⟩
[GOAL]
case inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨g, fun y => _, hgf⟩
[GOAL]
case inr.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
y : Y
⊢ ↑g y ∈ t
[PROOFSTEP]
rcases hg y with ⟨xl, xu, h⟩
[GOAL]
case inr.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X →ᵇ ℝ
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h✝ : Nonempty X
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)
hgf : ↑g ∘ e = ↑f
y : Y
xl xu : X
h : ↑g y ∈ Icc (↑f xl) (↑f xu)
⊢ ↑g y ∈ t
[PROOFSTEP]
exact hs.out (hf _) (hf _) h
[GOAL]
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
s : Set Y
f : ↑s →ᵇ ℝ
hs : IsClosed s
t : Set ℝ
inst✝ : OrdConnected t
hf : ∀ (x : ↑s), ↑f x ∈ t
hne : Set.Nonempty t
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ restrict g s = f
[PROOFSTEP]
rcases exists_extension_forall_mem_of_closedEmbedding f hf hne (closedEmbedding_subtype_val hs) with ⟨g, hg, hgf⟩
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : NormalSpace Y
s : Set Y
f : ↑s →ᵇ ℝ
hs : IsClosed s
t : Set ℝ
inst✝ : OrdConnected t
hf : ∀ (x : ↑s), ↑f x ∈ t
hne : Set.Nonempty t
g : Y →ᵇ ℝ
hg : ∀ (y : Y), ↑g y ∈ t
hgf : ↑g ∘ Subtype.val = ↑f
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ restrict g s = f
[PROOFSTEP]
exact ⟨g, hg, FunLike.coe_injective hgf⟩
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have h : ℝ ≃o Ioo (-1 : ℝ) 1 := orderIsoIooNegOneOne ℝ
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
let F : X →ᵇ ℝ :=
  { toFun := (↑) ∘ h ∘ f
    continuous_toFun := continuous_subtype_val.comp (h.continuous.comp f.continuous)
    map_bounded' := bounded_range_iff.1 ((bounded_Ioo (-1 : ℝ) 1).mono <| forall_range_iff.2 fun x => (h (f x)).2) }
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
let t' : Set ℝ := (↑) ∘ h '' t
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have ht_sub : t' ⊆ Ioo (-1 : ℝ) 1 := image_subset_iff.2 fun x _ => (h x).2
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have : OrdConnected t' := by
  constructor
  rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ z hz
  lift z to Ioo (-1 : ℝ) 1 using Icc_subset_Ioo (h x).2.1 (h y).2.2 hz
  change z ∈ Icc (h x) (h y) at hz 
  rw [← h.image_Icc] at hz 
  rcases hz with ⟨z, hz, rfl⟩
  exact ⟨z, hs.out hx hy hz, rfl⟩
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
⊢ OrdConnected t'
[PROOFSTEP]
constructor
[GOAL]
case out'
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
⊢ ∀ ⦃x : ℝ⦄, x ∈ t' → ∀ ⦃y : ℝ⦄, y ∈ t' → Icc x y ⊆ t'
[PROOFSTEP]
rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ z hz
[GOAL]
case out'.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
x : ℝ
hx : x ∈ t
y : ℝ
hy : y ∈ t
z : ℝ
hz : z ∈ Icc ((Subtype.val ∘ ↑h) x) ((Subtype.val ∘ ↑h) y)
⊢ z ∈ t'
[PROOFSTEP]
lift z to Ioo (-1 : ℝ) 1 using Icc_subset_Ioo (h x).2.1 (h y).2.2 hz
[GOAL]
case out'.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
x : ℝ
hx : x ∈ t
y : ℝ
hy : y ∈ t
z : { x // x ∈ Ioo (-1) 1 }
hz : ↑z ∈ Icc ((Subtype.val ∘ ↑h) x) ((Subtype.val ∘ ↑h) y)
⊢ ↑z ∈ t'
[PROOFSTEP]
change z ∈ Icc (h x) (h y) at hz 
[GOAL]
case out'.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
x : ℝ
hx : x ∈ t
y : ℝ
hy : y ∈ t
z : { x // x ∈ Ioo (-1) 1 }
hz : z ∈ Icc (↑h x) (↑h y)
⊢ ↑z ∈ t'
[PROOFSTEP]
rw [← h.image_Icc] at hz 
[GOAL]
case out'.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
x : ℝ
hx : x ∈ t
y : ℝ
hy : y ∈ t
z : { x // x ∈ Ioo (-1) 1 }
hz : z ∈ ↑h '' Icc x y
⊢ ↑z ∈ t'
[PROOFSTEP]
rcases hz with ⟨z, hz, rfl⟩
[GOAL]
case out'.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
x : ℝ
hx : x ∈ t
y : ℝ
hy : y ∈ t
z : ℝ
hz : z ∈ Icc x y
⊢ ↑(↑h z) ∈ t'
[PROOFSTEP]
exact ⟨z, hs.out hx hy hz, rfl⟩
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hFt : ∀ x, F x ∈ t' := fun x => mem_image_of_mem _ (hf x)
[GOAL]
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
rcases F.exists_extension_forall_mem_of_closedEmbedding hFt (hne.image _) he with ⟨G, hG, hGF⟩
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
let g : C(Y, ℝ) :=
  ⟨h.symm ∘ codRestrict G _ fun y => ht_sub (hG y), h.symm.continuous.comp <| G.continuous.subtype_mk _⟩
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
have hgG : ∀ {y a}, g y = a ↔ G y = h a := @fun y a => h.toEquiv.symm_apply_eq.trans Subtype.ext_iff
[GOAL]
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f
[PROOFSTEP]
refine' ⟨g, fun y => _, _⟩
[GOAL]
case intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
y : Y
⊢ ↑g y ∈ t
[PROOFSTEP]
rcases hG y with ⟨a, ha, hay⟩
[GOAL]
case intro.intro.refine'_1.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
y : Y
a : ℝ
ha : a ∈ t
hay : (Subtype.val ∘ ↑h) a = ↑G y
⊢ ↑g y ∈ t
[PROOFSTEP]
convert ha
[GOAL]
case h.e'_4
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
y : Y
a : ℝ
ha : a ∈ t
hay : (Subtype.val ∘ ↑h) a = ↑G y
⊢ ↑g y = a
[PROOFSTEP]
exact hgG.2 hay.symm
[GOAL]
case intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
⊢ ↑g ∘ e = ↑f
[PROOFSTEP]
ext x
[GOAL]
case intro.intro.refine'_2.h
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : C(X, ℝ)
t : Set ℝ
e : X → Y
hs : OrdConnected t
hf : ∀ (x : X), ↑f x ∈ t
hne : Set.Nonempty t
he : ClosedEmbedding e
h : ℝ ≃o ↑(Ioo (-1) 1)
F : X →ᵇ ℝ :=
  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),
    map_bounded' :=
      (_ :
        ∃ C,
          ∀ (x y : X),
            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)
                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤
              C) }
t' : Set ℝ := Subtype.val ∘ ↑h '' t
ht_sub : t' ⊆ Ioo (-1) 1
this : OrdConnected t'
hFt : ∀ (x : X), ↑F x ∈ t'
G : Y →ᵇ ℝ
hG : ∀ (y : Y), ↑G y ∈ t'
hGF : ↑G ∘ e = ↑F
g : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))
hgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)
x : X
⊢ (↑g ∘ e) x = ↑f x
[PROOFSTEP]
exact hgG.2 (congr_fun hGF _)
