End ext_C0.
(** ** C1 extension *)
Section ext_C1.
Context {V : NormedModule R_AbsRing}.
Definition extension_C1 (f df : R -> V) (a b : Rbar) (x : R) : V :=
match Rbar_le_dec a x with
| left _ => match Rbar_le_dec x b with
| left _ => f x
| right _ => plus (f (real b)) (scal (x - real b) (df (real b)))
end
| right _ => plus (f (real a)) (scal (x - real a) (df (real a)))
end.

(* Specifications: *)
Lemma extension_C1_ext (f df : R -> V) (a b : Rbar) :
forall (x : R), Rbar_le a x -> Rbar_le x b -> (extension_C1 f df a b) x = f x.
Lemma extension_C1_is_derive (f df : R -> V) (a b : Rbar) :
Rbar_le a b
-> (forall x : R, Rbar_le a x -> Rbar_le x b -> is_derive f x (df x))
-> forall x : R, is_derive (extension_C1 f df a b) x (extension_C0 df a b x).