(** Subtraction of functions *)

(* Specifications: *)
Lemma Derive_n_minus (f g : R -> R) (n : nat) (x : R) :
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n f k y) ->
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n g k y) ->
Derive_n (fun x => f x - g x) n x = Derive_n f n x - Derive_n g n x.
Lemma ex_derive_n_minus (f g : R -> R) (n : nat) (x : R) :
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n f k y) ->
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n g k y) ->
ex_derive_n (fun x => f x - g x) n x.
Lemma is_derive_n_minus (f g : R -> R) (n : nat) (x lf lg : R) :
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n f k y) ->
locally x (fun y => forall k, (k <= n)%nat -> ex_derive_n g k y) ->
is_derive_n f n x lf -> is_derive_n g n x lg ->
is_derive_n (fun x => f x - g x) n x (lf - lg).