Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2020 Anatole Dedecker. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Patrick Massot, Anatole Dedecker | |
-/ | |
import topology.separation | |
/-! | |
# Extending a function from a subset | |
The main definition of this file is `extend_from A f` where `f : X β Y` | |
and `A : set X`. This defines a new function `g : X β Y` which maps any | |
`xβ : X` to the limit of `f` as `x` tends to `xβ`, if such a limit exists. | |
This is analoguous to the way `dense_inducing.extend` "extends" a function | |
`f : X β Z` to a function `g : Y β Z` along a dense inducing `i : X β Y`. | |
The main theorem we prove about this definition is `continuous_on_extend_from` | |
which states that, for `extend_from A f` to be continuous on a set `B β closure A`, | |
it suffices that `f` converges within `A` at any point of `B`, provided that | |
`f` is a function to a Tβ space. | |
-/ | |
noncomputable theory | |
open_locale topological_space | |
open filter set | |
variables {X Y : Type*} [topological_space X] [topological_space Y] | |
/-- Extend a function from a set `A`. The resulting function `g` is such that | |
at any `xβ`, if `f` converges to some `y` as `x` tends to `xβ` within `A`, | |
then `g xβ` is defined to be one of these `y`. Else, `g xβ` could be anything. -/ | |
def extend_from (A : set X) (f : X β Y) : X β Y := | |
Ξ» x, @@lim _ β¨f xβ© (π[A] x) f | |
/-- If `f` converges to some `y` as `x` tends to `xβ` within `A`, | |
then `f` tends to `extend_from A f x` as `x` tends to `xβ`. -/ | |
lemma tendsto_extend_from {A : set X} {f : X β Y} {x : X} | |
(h : β y, tendsto f (π[A] x) (π y)) : tendsto f (π[A] x) (π $ extend_from A f x) := | |
tendsto_nhds_lim h | |
lemma extend_from_eq [t2_space Y] {A : set X} {f : X β Y} {x : X} {y : Y} (hx : x β closure A) | |
(hf : tendsto f (π[A] x) (π y)) : extend_from A f x = y := | |
begin | |
haveI := mem_closure_iff_nhds_within_ne_bot.mp hx, | |
exact tendsto_nhds_unique (tendsto_nhds_lim β¨y, hfβ©) hf, | |
end | |
lemma extend_from_extends [t2_space Y] {f : X β Y} {A : set X} (hf : continuous_on f A) : | |
β x β A, extend_from A f x = f x := | |
Ξ» x x_in, extend_from_eq (subset_closure x_in) (hf x x_in) | |
/-- If `f` is a function to a Tβ space `Y` which has a limit within `A` at any | |
point of a set `B β closure A`, then `extend_from A f` is continuous on `B`. -/ | |
lemma continuous_on_extend_from [t3_space Y] {f : X β Y} {A B : set X} (hB : B β closure A) | |
(hf : β x β B, β y, tendsto f (π[A] x) (π y)) : continuous_on (extend_from A f) B := | |
begin | |
set Ο := extend_from A f, | |
intros x x_in, | |
suffices : β V' β π (Ο x), is_closed V' β Ο β»ΒΉ' V' β π[B] x, | |
by simpa [continuous_within_at, (closed_nhds_basis _).tendsto_right_iff], | |
intros V' V'_in V'_closed, | |
obtain β¨V, V_in, V_op, hVβ© : β V β π x, is_open V β§ V β© A β f β»ΒΉ' V', | |
{ have := tendsto_extend_from (hf x x_in), | |
rcases (nhds_within_basis_open x A).tendsto_left_iff.mp this V' V'_in with β¨V, β¨hxV, V_opβ©, hVβ©, | |
use [V, is_open.mem_nhds V_op hxV, V_op, hV] }, | |
suffices : β y β V β© B, Ο y β V', | |
from mem_of_superset (inter_mem_inf V_in $ mem_principal_self B) this, | |
rintros y β¨hyV, hyBβ©, | |
haveI := mem_closure_iff_nhds_within_ne_bot.mp (hB hyB), | |
have limy : tendsto f (π[A] y) (π $ Ο y) := tendsto_extend_from (hf y hyB), | |
have hVy : V β π y := is_open.mem_nhds V_op hyV, | |
have : V β© A β (π[A] y), | |
by simpa [inter_comm] using inter_mem_nhds_within _ hVy, | |
exact V'_closed.mem_of_tendsto limy (mem_of_superset this hV) | |
end | |
/-- If a function `f` to a Tβ space `Y` has a limit within a | |
dense set `A` for any `x`, then `extend_from A f` is continuous. -/ | |
lemma continuous_extend_from [t3_space Y] {f : X β Y} {A : set X} (hA : dense A) | |
(hf : β x, β y, tendsto f (π[A] x) (π y)) : continuous (extend_from A f) := | |
begin | |
rw continuous_iff_continuous_on_univ, | |
exact continuous_on_extend_from (Ξ» x _, hA x) (by simpa using hf) | |
end | |