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

Commit 4555798

Browse files
committed
feat(topology/semicontinuous): semicontinuity of compositions (#7763)
1 parent 2af6912 commit 4555798

File tree

1 file changed

+146
-27
lines changed

1 file changed

+146
-27
lines changed

src/topology/semicontinuous.lean

Lines changed: 146 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ We build a basic API using dot notation around these notions, and we prove that
3434
* `indicator s (λ _, y)` is lower semicontinuous when `s` is open and `0 ≤ y`, or when `s` is closed
3535
and `y ≤ 0`;
3636
* continuous functions are lower semicontinuous;
37+
* composition with a continuous monotone functions maps lower semicontinuous functions to lower
38+
semicontinuous functions. If the function is anti-monotone, it instead maps lower semicontinuous
39+
functions to upper semicontinuous functions;
3740
* a sum of two (or finitely many) lower semicontinuous functions is lower semicontinuous;
3841
* a supremum of a family of lower semicontinuous functions is lower semicontinuous;
3942
* An infinite sum of `ℝ≥0∞`-valued lower semicontinuous functions is lower semicontinuous.
@@ -56,9 +59,7 @@ open set
5659
variables {α : Type*} [topological_space α] {β : Type*} [preorder β]
5760
{f g : α → β} {x : α} {s t : set α} {y z : β}
5861

59-
/-!
60-
### Lower semicontinuous functions
61-
-/
62+
/-! ### Main definitions -/
6263

6364
/-- A real function `f` is lower semicontinuous at `x` within a set `s` if, for any `ε > 0`, for all
6465
`x'` close enough to `x` in `s`, then `f x'` is at least `f x - ε`. We formulate this in a general
@@ -84,6 +85,34 @@ using an arbitrary `y < f x` instead of `f x - ε`. -/
8485
def lower_semicontinuous (f : α → β) :=
8586
∀ x, lower_semicontinuous_at f x
8687

88+
/-- A real function `f` is upper semicontinuous at `x` within a set `s` if, for any `ε > 0`, for all
89+
`x'` close enough to `x` in `s`, then `f x'` is at most `f x + ε`. We formulate this in a general
90+
preordered space, using an arbitrary `y > f x` instead of `f x + ε`. -/
91+
def upper_semicontinuous_within_at (f : α → β) (s : set α) (x : α) :=
92+
∀ y, f x < y → ∀ᶠ x' in 𝓝[s] x, f x' < y
93+
94+
/-- A real function `f` is upper semicontinuous on a set `s` if, for any `ε > 0`, for any `x ∈ s`,
95+
for all `x'` close enough to `x` in `s`, then `f x'` is at most `f x + ε`. We formulate this in a
96+
general preordered space, using an arbitrary `y > f x` instead of `f x + ε`.-/
97+
def upper_semicontinuous_on (f : α → β) (s : set α) :=
98+
∀ x ∈ s, upper_semicontinuous_within_at f s x
99+
100+
/-- A real function `f` is upper semicontinuous at `x` if, for any `ε > 0`, for all `x'` close
101+
enough to `x`, then `f x'` is at most `f x + ε`. We formulate this in a general preordered space,
102+
using an arbitrary `y > f x` instead of `f x + ε`. -/
103+
def upper_semicontinuous_at (f : α → β) (x : α) :=
104+
∀ y, f x < y → ∀ᶠ x' in 𝓝 x, f x' < y
105+
106+
/-- A real function `f` is upper semicontinuous if, for any `ε > 0`, for any `x`, for all `x'`
107+
close enough to `x`, then `f x'` is at most `f x + ε`. We formulate this in a general preordered
108+
space, using an arbitrary `y > f x` instead of `f x + ε`.-/
109+
def upper_semicontinuous (f : α → β) :=
110+
∀ x, upper_semicontinuous_at f x
111+
112+
/-!
113+
### Lower semicontinuous functions
114+
-/
115+
87116
/-! #### Basic dot notation interface for lower semicontinuity -/
88117

89118
lemma lower_semicontinuous_within_at.mono (h : lower_semicontinuous_within_at f s x)
@@ -227,6 +256,69 @@ lemma continuous.lower_semicontinuous {f : α → γ}
227256

228257
end
229258

259+
/-! ### Composition -/
260+
261+
section
262+
variables {γ : Type*} [linear_order γ] [topological_space γ] [order_topology γ]
263+
variables {δ : Type*} [linear_order δ] [topological_space δ] [order_topology δ]
264+
265+
lemma continuous_at.comp_lower_semicontinuous_within_at
266+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : lower_semicontinuous_within_at f s x)
267+
(gmon : monotone g) : lower_semicontinuous_within_at (g ∘ f) s x :=
268+
begin
269+
assume y hy,
270+
by_cases h : ∃ l, l < f x,
271+
{ obtain ⟨z, zlt, hz⟩ : ∃ z < f x, Ioc z (f x) ⊆ g ⁻¹' (Ioi y) :=
272+
exists_Ioc_subset_of_mem_nhds (hg (Ioi_mem_nhds hy)) h,
273+
filter_upwards [hf z zlt],
274+
assume a ha,
275+
calc y < g (min (f x) (f a)) : hz (by simp [zlt, ha, le_refl])
276+
... ≤ g (f a) : gmon (min_le_right _ _) },
277+
{ simp only [not_exists, not_lt] at h,
278+
exact filter.eventually_of_forall (λ a, hy.trans_le (gmon (h (f a)))) }
279+
end
280+
281+
lemma continuous_at.comp_lower_semicontinuous_at
282+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : lower_semicontinuous_at f x)
283+
(gmon : monotone g) : lower_semicontinuous_at (g ∘ f) x :=
284+
begin
285+
simp only [← lower_semicontinuous_within_at_univ_iff] at hf ⊢,
286+
exact hg.comp_lower_semicontinuous_within_at hf gmon
287+
end
288+
289+
lemma continuous.comp_lower_semicontinuous_on
290+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : lower_semicontinuous_on f s)
291+
(gmon : monotone g) : lower_semicontinuous_on (g ∘ f) s :=
292+
λ x hx, (hg.continuous_at).comp_lower_semicontinuous_within_at (hf x hx) gmon
293+
294+
lemma continuous.comp_lower_semicontinuous
295+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : lower_semicontinuous f)
296+
(gmon : monotone g) : lower_semicontinuous (g ∘ f) :=
297+
λ x, (hg.continuous_at).comp_lower_semicontinuous_at (hf x) gmon
298+
299+
lemma continuous_at.comp_lower_semicontinuous_within_at_antimono
300+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : lower_semicontinuous_within_at f s x)
301+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : upper_semicontinuous_within_at (g ∘ f) s x :=
302+
@continuous_at.comp_lower_semicontinuous_within_at α _ x s γ _ _ _ (order_dual δ) _ _ _
303+
g f hg hf gmon
304+
305+
lemma continuous_at.comp_lower_semicontinuous_at_antimono
306+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : lower_semicontinuous_at f x)
307+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : upper_semicontinuous_at (g ∘ f) x :=
308+
@continuous_at.comp_lower_semicontinuous_at α _ x γ _ _ _ (order_dual δ) _ _ _ g f hg hf gmon
309+
310+
lemma continuous.comp_lower_semicontinuous_on_antimono
311+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : lower_semicontinuous_on f s)
312+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : upper_semicontinuous_on (g ∘ f) s :=
313+
λ x hx, (hg.continuous_at).comp_lower_semicontinuous_within_at_antimono (hf x hx) gmon
314+
315+
lemma continuous.comp_lower_semicontinuous_antimono
316+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : lower_semicontinuous f)
317+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : upper_semicontinuous (g ∘ f) :=
318+
λ x, (hg.continuous_at).comp_lower_semicontinuous_at_antimono (hf x) gmon
319+
320+
end
321+
230322
/-! #### Addition -/
231323

232324
section
@@ -482,30 +574,6 @@ end
482574
### Upper semicontinuous functions
483575
-/
484576

485-
/-- A real function `f` is upper semicontinuous at `x` within a set `s` if, for any `ε > 0`, for all
486-
`x'` close enough to `x` in `s`, then `f x'` is at most `f x + ε`. We formulate this in a general
487-
preordered space, using an arbitrary `y > f x` instead of `f x + ε`. -/
488-
def upper_semicontinuous_within_at (f : α → β) (s : set α) (x : α) :=
489-
∀ y, f x < y → ∀ᶠ x' in 𝓝[s] x, f x' < y
490-
491-
/-- A real function `f` is upper semicontinuous on a set `s` if, for any `ε > 0`, for any `x ∈ s`,
492-
for all `x'` close enough to `x` in `s`, then `f x'` is at most `f x + ε`. We formulate this in a
493-
general preordered space, using an arbitrary `y > f x` instead of `f x + ε`.-/
494-
def upper_semicontinuous_on (f : α → β) (s : set α) :=
495-
∀ x ∈ s, upper_semicontinuous_within_at f s x
496-
497-
/-- A real function `f` is upper semicontinuous at `x` if, for any `ε > 0`, for all `x'` close
498-
enough to `x`, then `f x'` is at most `f x + ε`. We formulate this in a general preordered space,
499-
using an arbitrary `y > f x` instead of `f x + ε`. -/
500-
def upper_semicontinuous_at (f : α → β) (x : α) :=
501-
∀ y, f x < y → ∀ᶠ x' in 𝓝 x, f x' < y
502-
503-
/-- A real function `f` is upper semicontinuous if, for any `ε > 0`, for any `x`, for all `x'`
504-
close enough to `x`, then `f x'` is at most `f x + ε`. We formulate this in a general preordered
505-
space, using an arbitrary `y > f x` instead of `f x + ε`.-/
506-
def upper_semicontinuous (f : α → β) :=
507-
∀ x, upper_semicontinuous_at f x
508-
509577
/-! #### Basic dot notation interface for upper semicontinuity -/
510578

511579
lemma upper_semicontinuous_within_at.mono (h : upper_semicontinuous_within_at f s x)
@@ -634,6 +702,57 @@ lemma continuous.upper_semicontinuous {f : α → γ}
634702

635703
end
636704

705+
/-! ### Composition -/
706+
707+
section
708+
variables {γ : Type*} [linear_order γ] [topological_space γ] [order_topology γ]
709+
variables {δ : Type*} [linear_order δ] [topological_space δ] [order_topology δ]
710+
711+
lemma continuous_at.comp_upper_semicontinuous_within_at
712+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : upper_semicontinuous_within_at f s x)
713+
(gmon : monotone g) : upper_semicontinuous_within_at (g ∘ f) s x :=
714+
@continuous_at.comp_lower_semicontinuous_within_at α _ x s (order_dual γ) _ _ _
715+
(order_dual δ) _ _ _ g f hg hf (λ x y hxy, gmon hxy)
716+
717+
lemma continuous_at.comp_upper_semicontinuous_at
718+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : upper_semicontinuous_at f x)
719+
(gmon : monotone g) : upper_semicontinuous_at (g ∘ f) x :=
720+
@continuous_at.comp_lower_semicontinuous_at α _ x (order_dual γ) _ _ _
721+
(order_dual δ) _ _ _ g f hg hf (λ x y hxy, gmon hxy)
722+
723+
lemma continuous.comp_upper_semicontinuous_on
724+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : upper_semicontinuous_on f s)
725+
(gmon : monotone g) : upper_semicontinuous_on (g ∘ f) s :=
726+
λ x hx, (hg.continuous_at).comp_upper_semicontinuous_within_at (hf x hx) gmon
727+
728+
lemma continuous.comp_upper_semicontinuous
729+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : upper_semicontinuous f)
730+
(gmon : monotone g) : upper_semicontinuous (g ∘ f) :=
731+
λ x, (hg.continuous_at).comp_upper_semicontinuous_at (hf x) gmon
732+
733+
lemma continuous_at.comp_upper_semicontinuous_within_at_antimono
734+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : upper_semicontinuous_within_at f s x)
735+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : lower_semicontinuous_within_at (g ∘ f) s x :=
736+
@continuous_at.comp_upper_semicontinuous_within_at α _ x s γ _ _ _ (order_dual δ) _ _ _
737+
g f hg hf gmon
738+
739+
lemma continuous_at.comp_upper_semicontinuous_at_antimono
740+
{g : γ → δ} {f : α → γ} (hg : continuous_at g (f x)) (hf : upper_semicontinuous_at f x)
741+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : lower_semicontinuous_at (g ∘ f) x :=
742+
@continuous_at.comp_upper_semicontinuous_at α _ x γ _ _ _ (order_dual δ) _ _ _ g f hg hf gmon
743+
744+
lemma continuous.comp_upper_semicontinuous_on_antimono
745+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : upper_semicontinuous_on f s)
746+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : lower_semicontinuous_on (g ∘ f) s :=
747+
λ x hx, (hg.continuous_at).comp_upper_semicontinuous_within_at_antimono (hf x hx) gmon
748+
749+
lemma continuous.comp_upper_semicontinuous_antimono
750+
{g : γ → δ} {f : α → γ} (hg : continuous g) (hf : upper_semicontinuous f)
751+
(gmon : ∀ x y, x ≤ y → g y ≤ g x) : lower_semicontinuous (g ∘ f) :=
752+
λ x, (hg.continuous_at).comp_upper_semicontinuous_at_antimono (hf x) gmon
753+
754+
end
755+
637756
/-! #### Addition -/
638757

639758
section

0 commit comments

Comments
 (0)