Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit adfe9c7

Browse files
committed
feat(topology/algebra/order/compact): Sup is continuous (#13347)
* Prove that the `Sup` of a binary function over a compact set is continuous in the second variable * Some other lemmas about `Sup` * Move and generalize `is_compact.bdd_[above|below]_image` * from the sphere eversion project
1 parent 936eb7e commit adfe9c7

File tree

2 files changed

+72
-14
lines changed

2 files changed

+72
-14
lines changed

src/topology/algebra/order/basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,6 +2188,18 @@ lemma is_compact.bdd_above {α : Type u} [topological_space α] [linear_order α
21882188
[order_closed_topology α] : Π [nonempty α] {s : set α}, is_compact s → bdd_above s :=
21892189
@is_compact.bdd_below (order_dual α) _ _ _
21902190

2191+
/-- A continuous function is bounded below on a compact set. -/
2192+
lemma is_compact.bdd_below_image {α : Type u} [topological_space α] [linear_order α]
2193+
[order_closed_topology α] [nonempty α] [topological_space γ] {f : γ → α} {K : set γ}
2194+
(hK : is_compact K) (hf : continuous_on f K) : bdd_below (f '' K) :=
2195+
(hK.image_of_continuous_on hf).bdd_below
2196+
2197+
/-- A continuous function is bounded above on a compact set. -/
2198+
lemma is_compact.bdd_above_image {α : Type u} [topological_space α] [linear_order α]
2199+
[order_closed_topology α] [nonempty α] [topological_space γ] {f : γ → α} {K : set γ}
2200+
(hK : is_compact K) (hf : continuous_on f K) : bdd_above (f '' K) :=
2201+
@is_compact.bdd_below_image _ (order_dual α) _ _ _ _ _ _ _ hK hf
2202+
21912203
end order_topology
21922204

21932205
section densely_ordered

src/topology/algebra/order/compact.lean

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ end
132132
### Min and max elements of a compact set
133133
-/
134134

135-
variables {α β : Type*} [conditionally_complete_linear_order α] [topological_space α]
136-
[order_topology α] [topological_space β]
135+
variables {α β γ : Type*} [conditionally_complete_linear_order α] [topological_space α]
136+
[order_topology α] [topological_space β] [topological_space γ]
137137

138138
lemma is_compact.Inf_mem {s : set α} (hs : is_compact s) (ne_s : s.nonempty) :
139139
Inf s ∈ s :=
@@ -175,11 +175,22 @@ lemma is_compact.exists_is_lub {s : set α} (hs : is_compact s) (ne_s : s.nonemp
175175
∃ x ∈ s, is_lub s x :=
176176
⟨_, hs.Sup_mem ne_s, hs.is_lub_Sup ne_s⟩
177177

178+
lemma is_compact.exists_Inf_image_eq_and_le {s : set β} (hs : is_compact s) (ne_s : s.nonempty)
179+
{f : β → α} (hf : continuous_on f s) :
180+
∃ x ∈ s, Inf (f '' s) = f x ∧ ∀ y ∈ s, f x ≤ f y :=
181+
let ⟨x, hxs, hx⟩ := (hs.image_of_continuous_on hf).Inf_mem (ne_s.image f)
182+
in ⟨x, hxs, hx.symm, λ y hy,
183+
hx.trans_le $ cInf_le (hs.image_of_continuous_on hf).bdd_below $ mem_image_of_mem f hy⟩
184+
185+
lemma is_compact.exists_Sup_image_eq_and_ge {s : set β} (hs : is_compact s) (ne_s : s.nonempty)
186+
{f : β → α} (hf : continuous_on f s) :
187+
∃ x ∈ s, Sup (f '' s) = f x ∧ ∀ y ∈ s, f y ≤ f x :=
188+
@is_compact.exists_Inf_image_eq_and_le (order_dual α) _ _ _ _ _ _ hs ne_s _ hf
189+
178190
lemma is_compact.exists_Inf_image_eq {s : set β} (hs : is_compact s) (ne_s : s.nonempty)
179191
{f : β → α} (hf : continuous_on f s) :
180192
∃ x ∈ s, Inf (f '' s) = f x :=
181-
let ⟨x, hxs, hx⟩ := (hs.image_of_continuous_on hf).Inf_mem (ne_s.image f)
182-
in ⟨x, hxs, hx.symm⟩
193+
let ⟨x, hxs, hx, _⟩ := hs.exists_Inf_image_eq_and_le ne_s hf in ⟨x, hxs, hx⟩
183194

184195
lemma is_compact.exists_Sup_image_eq :
185196
∀ {s : set β}, is_compact s → s.nonempty → ∀ {f : β → α}, continuous_on f s →
@@ -245,6 +256,23 @@ lemma continuous.exists_forall_ge [nonempty β] {f : β → α}
245256
∃ x, ∀ y, f y ≤ f x :=
246257
@continuous.exists_forall_le (order_dual α) _ _ _ _ _ _ _ hf hlim
247258

259+
lemma is_compact.Sup_lt_iff_of_continuous {f : β → α}
260+
{K : set β} (hK : is_compact K) (h0K : K.nonempty) (hf : continuous_on f K) (y : α) :
261+
Sup (f '' K) < y ↔ ∀ x ∈ K, f x < y :=
262+
begin
263+
refine ⟨λ h x hx, (le_cSup (hK.bdd_above_image hf) $ mem_image_of_mem f hx).trans_lt h, λ h, _⟩,
264+
obtain ⟨x, hx, h2x⟩ := hK.exists_forall_ge h0K hf,
265+
refine (cSup_le (h0K.image f) _).trans_lt (h x hx),
266+
rintro _ ⟨x', hx', rfl⟩, exact h2x x' hx'
267+
end
268+
269+
lemma is_compact.lt_Inf_iff_of_continuous {α β : Type*}
270+
[conditionally_complete_linear_order α] [topological_space α]
271+
[order_topology α] [topological_space β] {f : β → α}
272+
{K : set β} (hK : is_compact K) (h0K : K.nonempty) (hf : continuous_on f K) (y : α) :
273+
y < Inf (f '' K) ↔ ∀ x ∈ K, y < f x :=
274+
@is_compact.Sup_lt_iff_of_continuous (order_dual α) β _ _ _ _ _ _ hK h0K hf y
275+
248276
/-- A continuous function with compact support has a global minimum. -/
249277
@[to_additive]
250278
lemma _root_.continuous.exists_forall_le_of_has_compact_mul_support [nonempty β] [has_one α]
@@ -285,19 +313,37 @@ lemma continuous.bdd_above_range_of_has_compact_mul_support [has_one α]
285313
bdd_above (range f) :=
286314
@continuous.bdd_below_range_of_has_compact_mul_support (order_dual α) _ _ _ _ _ _ _ hf h
287315

288-
/-- A continuous function is bounded below on a compact set. -/
289-
lemma is_compact.bdd_below_image {f : β → α} {K : set β}
290-
(hK : is_compact K) (hf : continuous_on f K) : bdd_below (f '' K) :=
316+
lemma is_compact.continuous_Sup {f : γ → β → α}
317+
{K : set β} (hK : is_compact K) (hf : continuous ↿f) :
318+
continuous (λ x, Sup (f x '' K)) :=
291319
begin
292-
rcases eq_empty_or_nonempty K with rfl|h, { rw [image_empty], exact bdd_below_empty },
293-
obtain ⟨c, -, hc⟩ := hK.exists_forall_le h hf,
294-
refine ⟨f c, _⟩, rintro _ ⟨x, hx, rfl⟩, exact hc x hx
320+
rcases eq_empty_or_nonempty K with rfl|h0K,
321+
{ simp_rw [image_empty], exact continuous_const },
322+
rw [continuous_iff_continuous_at],
323+
intro x,
324+
obtain ⟨y, hyK, h2y, hy⟩ :=
325+
hK.exists_Sup_image_eq_and_ge h0K
326+
(show continuous (λ y, f x y), from hf.comp $ continuous.prod.mk x).continuous_on,
327+
rw [continuous_at, h2y, tendsto_order],
328+
have := tendsto_order.mp ((show continuous (λ x, f x y), from
329+
hf.comp $ continuous_id.prod_mk continuous_const).tendsto x),
330+
refine ⟨λ z hz, _, λ z hz, _⟩,
331+
{ refine (this.1 z hz).mono (λ x' hx', hx'.trans_le $ le_cSup _ $ mem_image_of_mem (f x') hyK),
332+
exact hK.bdd_above_image (hf.comp $ continuous.prod.mk x').continuous_on },
333+
{ have h : ({x} : set γ) ×ˢ K ⊆ ↿f ⁻¹' (Iio z),
334+
{ rintro ⟨x', y'⟩ ⟨hx', hy'⟩, cases hx', exact (hy y' hy').trans_lt hz },
335+
obtain ⟨u, v, hu, hv, hxu, hKv, huv⟩ :=
336+
generalized_tube_lemma is_compact_singleton hK (is_open_Iio.preimage hf) h,
337+
refine eventually_of_mem (hu.mem_nhds (singleton_subset_iff.mp hxu)) (λ x' hx', _),
338+
rw [hK.Sup_lt_iff_of_continuous h0K
339+
(show continuous (f x'), from (hf.comp $ continuous.prod.mk x')).continuous_on],
340+
exact λ y' hy', huv (mk_mem_prod hx' (hKv hy')) }
295341
end
296342

297-
/-- A continuous function is bounded above on a compact set. -/
298-
lemma is_compact.bdd_above_image {f : β → α} {K : set β}
299-
(hK : is_compact K) (hf : continuous_on f K) : bdd_above (f '' K) :=
300-
@is_compact.bdd_below_image (order_dual α) _ _ _ _ _ _ _ hK hf
343+
lemma is_compact.continuous_Inf {f : γ → β → α}
344+
{K : set β} (hK : is_compact K) (hf : continuous ↿f) :
345+
continuous (λ x, Inf (f x '' K)) :=
346+
@is_compact.continuous_Sup (order_dual α) β γ _ _ _ _ _ _ _ hK hf
301347

302348
namespace continuous_on
303349
/-!

0 commit comments

Comments
 (0)