(** Restriction of a filter to a domain *)
Definition within {T : Type} D (F : (T -> Prop) -> Prop) (P : T -> Prop) :=
F (fun x => D x -> P x).
Global Instance within_filter :
forall T D F, Filter F -> Filter (@within T D F).

Lemma filterlim_within_ext :
forall {T U F G} {FF : Filter F} D (f g : T -> U),
(forall x, D x -> f x = g x) ->
filterlim f (within D F) G ->
filterlim g (within D F) G.