Theorem: IsCompact.continuous_sSup
File: Mathlib/Topology/Algebra/Order/Compact.lean

tactic: rcases eq_empty_or_nonempty K with (rfl | h0K)
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
⊢ Continuous fun x => sSup (f x '' K)

tactic: rw [continuous_iff_continuousAt]
state_before: case inr
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
⊢ Continuous fun x => sSup (f x '' K)

tactic: intro x
state_before: case inr
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
⊢ ∀ (x : γ), ContinuousAt (fun x => sSup (f x '' K)) x

tactic: obtain ⟨y, hyK, h2y, hy⟩ :=
  hK.exists_sSup_image_eq_and_ge h0K
    (show Continuous fun y => f x y from hf.comp <| Continuous.Prod.mk x).continuousOn
state_before: case inr
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
⊢ ContinuousAt (fun x => sSup (f x '' K)) x

tactic: rw [ContinuousAt, h2y, tendsto_order]
state_before: case inr.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
⊢ ContinuousAt (fun x => sSup (f x '' K)) x

tactic: have := tendsto_order.mp ((show Continuous fun x => f x y
  from hf.comp <| continuous_id.prod_mk continuous_const).tendsto x)
state_before: case inr.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
⊢ (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < sSup (f b '' K)) ∧
    ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < a'

tactic: refine' ⟨fun z hz => _, fun z hz => _⟩
state_before: case inr.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
⊢ (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < sSup (f b '' K)) ∧
    ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < a'

tactic: simp_rw [image_empty]
state_before: case inl
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
hf : Continuous ↿f
hK : IsCompact ∅
⊢ Continuous fun x => sSup (f x '' ∅)

tactic: exact continuous_const
state_before: case inl
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
hf : Continuous ↿f
hK : IsCompact ∅
⊢ Continuous fun x => sSup ∅

tactic: refine' (this.1 z hz).mono fun x' hx' =>
  hx'.trans_le <| le_csSup _ <| mem_image_of_mem (f x') hyK
state_before: case inr.intro.intro.intro.refine'_1
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z < f x y
⊢ ∀ᶠ (b : γ) in 𝓝 x, z < sSup (f b '' K)

tactic: exact hK.bddAbove_image (hf.comp <| Continuous.Prod.mk x').continuousOn
state_before: case inr.intro.intro.intro.refine'_1
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z < f x y
x' : γ
hx' : z < f x' y
⊢ BddAbove (f x' '' K)

tactic: have h : ({x} : Set γ) ×ˢ K ⊆ ↿f ⁻¹' Iio z := by
  rintro ⟨x', y'⟩ ⟨(rfl : x' = x), hy'⟩
  exact (hy y' hy').trans_lt hz
state_before: case inr.intro.intro.intro.refine'_2
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z

tactic: obtain ⟨u, v, hu, _, hxu, hKv, huv⟩ :=
  generalized_tube_lemma isCompact_singleton hK (isOpen_Iio.preimage hf) h
state_before: case inr.intro.intro.intro.refine'_2
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z

tactic: refine' eventually_of_mem (hu.mem_nhds (singleton_subset_iff.mp hxu)) fun x' hx' => _
state_before: case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
⊢ ∀ᶠ (b : γ) in 𝓝 x, sSup (f b '' K) < z

tactic: rw [hK.sSup_lt_iff_of_continuous h0K
    (show Continuous (f x') from hf.comp <| Continuous.Prod.mk x').continuousOn]
state_before: case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
x' : γ
hx' : x' ∈ u
⊢ sSup (f x' '' K) < z

tactic: exact fun y' hy' => huv (mk_mem_prod hx' (hKv hy'))
state_before: case inr.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
h : {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z
u : Set γ
v : Set β
hu : IsOpen u
left✝ : IsOpen v
hxu : {x} ⊆ u
hKv : K ⊆ v
huv : u ×ˢ v ⊆ ↿f ⁻¹' Iio z
x' : γ
hx' : x' ∈ u
⊢ ∀ (x : β), x ∈ K → f x' x < z

tactic: rintro ⟨x', y'⟩ ⟨(rfl : x' = x), hy'⟩
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
x : γ
y : β
hyK : y ∈ K
h2y : sSup ((fun y => f x y) '' K) = f x y
hy : ∀ (y_1 : β), y_1 ∈ K → f x y_1 ≤ f x y
this : (∀ (a' : α), a' < f x y → ∀ᶠ (b : γ) in 𝓝 x, a' < f b y) ∧ ∀ (a' : α), a' > f x y → ∀ᶠ (b : γ) in 𝓝 x, f b y < a'
z : α
hz : z > f x y
⊢ {x} ×ˢ K ⊆ ↿f ⁻¹' Iio z

tactic: exact (hy y' hy').trans_lt hz
state_before: case mk.intro
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝⁴ : ConditionallyCompleteLinearOrder α
inst✝³ : TopologicalSpace α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : γ → β → α
K : Set β
hK : IsCompact K
hf : Continuous ↿f
h0K : Set.Nonempty K
y : β
hyK : y ∈ K
z : α
x' : γ
y' : β
hy' : (x', y').snd ∈ K
h2y : sSup ((fun y => f x' y) '' K) = f x' y
hy : ∀ (y_1 : β), y_1 ∈ K → f x' y_1 ≤ f x' y
this :
  (∀ (a' : α), a' < f x' y → ∀ᶠ (b : γ) in 𝓝 x', a' < f b y) ∧ ∀ (a' : α), a' > f x' y → ∀ᶠ (b : γ) in 𝓝 x', f b y < a'
hz : z > f x' y
⊢ (x', y') ∈ ↿f ⁻¹' Iio z