End Linear_domin.
(** * Differentiability using filters *)
Section Diff.
Context {K : AbsRing} {U : NormedModule K} {V : NormedModule K}.
Definition filterdiff (f : U -> V) F (l : U -> V) :=
is_linear l /\ forall x, is_filter_lim F x ->
is_domin F (fun y : U => minus y x) (fun y => minus (minus (f y) (f x)) (l (minus y x))).
Definition ex_filterdiff (f : U -> V) F :=
exists (l : U -> V), filterdiff f F l.

(* Specifications: *)
Lemma filterdiff_continuous_aux {F} {FF : Filter F} (f : U -> V) :
ex_filterdiff f F -> forall x, is_filter_lim F x -> filterlim f F (locally (f x)).
Lemma filterdiff_continuous (f : U -> V) x :
ex_filterdiff f (locally x) -> continuous f x.
Lemma filterdiff_locally {F} {FF : ProperFilter F} (f : U -> V) x l :
is_filter_lim F x ->
filterdiff f (locally x) l ->
filterdiff f F l.
Lemma ex_filterdiff_locally {F} {FF : ProperFilter F} (f : U -> V) x :
is_filter_lim F x ->
ex_filterdiff f (locally x) ->
ex_filterdiff f F.