|
132 | 132 | ### Min and max elements of a compact set
|
133 | 133 | -/
|
134 | 134 |
|
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 γ] |
137 | 137 |
|
138 | 138 | lemma is_compact.Inf_mem {s : set α} (hs : is_compact s) (ne_s : s.nonempty) :
|
139 | 139 | Inf s ∈ s :=
|
@@ -175,11 +175,22 @@ lemma is_compact.exists_is_lub {s : set α} (hs : is_compact s) (ne_s : s.nonemp
|
175 | 175 | ∃ x ∈ s, is_lub s x :=
|
176 | 176 | ⟨_, hs.Sup_mem ne_s, hs.is_lub_Sup ne_s⟩
|
177 | 177 |
|
| 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 | + |
178 | 190 | lemma is_compact.exists_Inf_image_eq {s : set β} (hs : is_compact s) (ne_s : s.nonempty)
|
179 | 191 | {f : β → α} (hf : continuous_on f s) :
|
180 | 192 | ∃ 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⟩ |
183 | 194 |
|
184 | 195 | lemma is_compact.exists_Sup_image_eq :
|
185 | 196 | ∀ {s : set β}, is_compact s → s.nonempty → ∀ {f : β → α}, continuous_on f s →
|
@@ -245,6 +256,23 @@ lemma continuous.exists_forall_ge [nonempty β] {f : β → α}
|
245 | 256 | ∃ x, ∀ y, f y ≤ f x :=
|
246 | 257 | @continuous.exists_forall_le (order_dual α) _ _ _ _ _ _ _ hf hlim
|
247 | 258 |
|
| 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 | + |
248 | 276 | /-- A continuous function with compact support has a global minimum. -/
|
249 | 277 | @[to_additive]
|
250 | 278 | 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 α]
|
285 | 313 | bdd_above (range f) :=
|
286 | 314 | @continuous.bdd_below_range_of_has_compact_mul_support (order_dual α) _ _ _ _ _ _ _ hf h
|
287 | 315 |
|
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)) := |
291 | 319 | 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')) } |
295 | 341 | end
|
296 | 342 |
|
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 |
301 | 347 |
|
302 | 348 | namespace continuous_on
|
303 | 349 | /-!
|
|
0 commit comments