(** * Continuity in Uniform Spaces *)
(** ** Continuity *)
Section Continuity.
Context {T U : UniformSpace}.
Definition continuous_on (D : T -> Prop) (f : T -> U) :=
forall x, D x -> filterlim f (within D (locally x)) (locally (f x)).
Definition continuous (f : T -> U) (x : T) :=
filterlim f (locally x) (locally (f x)).

(* Specifications: *)
Lemma continuous_continuous_on :
forall (D : T -> Prop) (f : T -> U) (x : T),
locally x D ->
continuous_on D f ->
continuous f x.
Lemma continuous_on_subset :
forall (D E : T -> Prop) (f : T -> U),
(forall x, E x -> D x) ->
continuous_on D f ->
continuous_on E f.
Lemma continuous_on_forall :
forall (D : T -> Prop) (f : T -> U),
(forall x, D x -> continuous f x) ->
continuous_on D f.
Lemma continuous_ext_loc (f g : T -> U) (x : T) :
locally x (fun y : T => g y = f y)
-> continuous g x -> continuous f x.
Lemma continuous_ext :
forall (f g : T -> U) (x : T),
(forall x, f x = g x) ->
continuous f x ->
continuous g x.
Lemma continuous_on_ext :
forall (D : T -> Prop) (f g : T -> U),
(forall x, D x -> f x = g x) ->
continuous_on D f ->
continuous_on D g.