(****************************************************)
(** *   Value of the derivative of the reciprocal function        *)
(****************************************************)

(* Specifications: *)
Lemma derive_pt_recip_interv_prelim0 (f g:R->R) (lb ub x:R)
(Prf:derivable_pt f (g x)) (Prg:derivable_pt g x)
: lb < ub ->
lb < x < ub ->
(forall x, lb < x < ub -> (comp f g) x = id x) ->
derive_pt f (g x) Prf <> 0 ->
derive_pt g x Prg = 1 / (derive_pt f (g x) Prf).
Lemma derive_pt_recip_interv_prelim1_0 : forall (f g:R->R) (lb ub x:R),
lb < ub ->
f lb < x < f ub ->
(forall x y : R, lb <= x -> x < y -> y <= ub -> f x < f y) ->
(forall x : R, f lb <= x -> x <= f ub -> lb <= g x <= ub) ->
(forall x, f lb <= x -> x <= f ub -> (comp f g) x = id x) ->
lb < g x < ub.
Lemma derive_pt_recip_interv_prelim1_1 : forall (f g:R->R) (lb ub x:R),
lb < ub ->
f lb < x < f ub ->
(forall x y : R, lb <= x -> x < y -> y <= ub -> f x < f y) ->
(forall x : R, f lb <= x -> x <= f ub -> lb <= g x <= ub) ->
(forall x, f lb <= x -> x <= f ub -> (comp f g) x = id x) ->
lb <= g x <= ub.
Lemma derive_pt_recip_interv_prelim1_1_decr : forall (f g:R->R) (lb ub x:R),
lb < ub ->
f ub < x < f lb ->
(forall x y : R, lb <= x -> x < y -> y <= ub -> f y < f x) ->
(forall x : R, f ub <= x -> x <= f lb -> lb <= g x <= ub) ->
(forall x, f ub <= x -> x <= f lb -> (comp f g) x = id x) ->
lb <= g x <= ub.
Lemma derive_pt_recip_interv : forall (f g:R->R) (lb ub x:R)
(lb_lt_ub:lb < ub) (x_encad:f lb < x < f ub)
(f_incr:forall x y : R, lb <= x -> x < y -> y <= ub -> f x < f y)
(g_wf:forall x : R, f lb <= x -> x <= f ub -> lb <= g x <= ub)
(Prf:forall a : R, lb <= a <= ub -> derivable_pt f a)
(f_eq_g:forall x, f lb <= x -> x <= f ub -> (comp f g) x = id x)
(Df_neq:derive_pt f (g x) (derivable_pt_recip_interv_prelim1 f g lb ub x
lb_lt_ub x_encad g_wf Prf) <> 0),
derive_pt g x (derivable_pt_recip_interv f g lb ub x lb_lt_ub x_encad f_eq_g
g_wf f_incr Prf Df_neq)
=
1 / (derive_pt f (g x) (Prf (g x) (derive_pt_recip_interv_prelim1_1 f g lb ub x
lb_lt_ub x_encad f_incr g_wf f_eq_g))).
Lemma derive_pt_recip_interv_decr : forall (f g:R->R) (lb ub x:R)
(lb_lt_ub:lb < ub)
(x_encad:f ub < x < f lb)
(f_decr:forall x y : R, lb <= x -> x < y -> y <= ub -> f y < f x)
(g_wf:forall x : R, f ub <= x -> x <= f lb -> lb <= g x <= ub)
(Prf:forall a : R, lb <= a <= ub -> derivable_pt f a)
(f_eq_g:forall x, f ub <= x -> x <= f lb -> (comp f g) x = id x)
(Df_neq:derive_pt f (g x) (derivable_pt_recip_interv_prelim1_decr f g lb ub x
lb_lt_ub x_encad g_wf Prf) <> 0),
derive_pt g x (derivable_pt_recip_interv_decr f g lb ub x lb_lt_ub x_encad f_eq_g
g_wf f_decr Prf Df_neq)
=
1 / (derive_pt f (g x) (Prf (g x) (derive_pt_recip_interv_prelim1_1_decr f g lb ub x
lb_lt_ub x_encad f_decr g_wf f_eq_g))).